From nobody Fri Aug 02 16:39:45 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WbBPt1qTHz5S1yf; Fri, 02 Aug 2024 16:39:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WbBPs6tQ0z41xX; Fri, 2 Aug 2024 16:39:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722616786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3vS6oerBj+G5J8QVAsCXtsDD5pRdY60m4+AJlkeYORE=; b=KNxm0chrpcLijFfdUjJIZzFD0hmBb+1I4wzJSt1+RkvEcmLFb6M+pVtYTBkiWCDHGJwyNa MtGHytyPfIyIkyEhYHgF2TxvTnArnlFfT+XPQbpmnITv+J73BZfxMaHOq55dlt/3y8vKpl Xi777ggtnPrrZ8lpExDJzBYm2HT5CB8BNufMZWIkmhsYYFUXSC6VgXjENUDaybbz36teQU dDD6VdZl3dx4n6fVGcK5b95VBGQDuNEKeoFiIV/MBHF9DKGZdMhnLhNZVYShH3wQQl15io lt8qT+j/myzqv3E3O4ZWZGjS2fBGLWjaOsYyZ3mtBId/USBZPPzoTpMfG4jDYQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722616786; a=rsa-sha256; cv=none; b=vXlNp30EFtJ7XsUn8SBmqLTYBcQoaKC9WqQFxsG5THEJhcm4elAsbYvEPaiQ1oNdzCUQjv Km3RblvCLWIYwtjDJU+hgES4+mnz2uEop30eC+YqyQ2eHZ81/uaS5mJa82u/WITFEFhatR Al1BimG/e0mP+bgGYnTfIV3cLWa+Cii1TSJDu6gELl7M32SBlXCMAM5AAmoodbf4z3fsZd sazTdP6Nm++eDV5A3TUddYdTA3faUNAhbT8RdhcORGHKc/aonMAihUpYUs1UhrXdnMUwIn DYITAP4F72/AQRovI6esZ1/WwDjpRvFb8YkHqnQGk0UBRNswfg48P2sgpQITkA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722616786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3vS6oerBj+G5J8QVAsCXtsDD5pRdY60m4+AJlkeYORE=; b=YftZcJkjX52vAroZ6MLIcMwFuS5wLRmnRkaoyxmbeRImUwsr6JJrRDmWfCnRPeM3NXn8d/ GeA+MVvcyy0lmrkulr6G4m6Wzb1hLEYZtUA92drDgGUb06k+UkxWI3jRlv5sT1vavgTrXc jEyVdBDtzgWZJ9RMzQY9csdoY/lkRDAlVvZCCiCjERkMbiH9kJHQDSfwTP7oEjqsxFcpuc pvnTBYsQavH4avsOEe2OevnXZ7Vm0oVD0kTZsuL0bk7U7Kza5gu+Q7U53N6IESeh2RabeU 8tfXHpZq/oxhQiBLJXC4SJcWTv0ZmKXUZbCg+TJFrwFCEFnY71JTWV4iI5D4Zg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WbBPs6NG1zbnV; Fri, 2 Aug 2024 16:39:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 472GdjFj071955; Fri, 2 Aug 2024 16:39:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 472Gdjej071952; Fri, 2 Aug 2024 16:39:45 GMT (envelope-from git) Date: Fri, 2 Aug 2024 16:39:45 GMT Message-Id: <202408021639.472Gdjej071952@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 8448df88fdb4 - stable/13 - siftr: remove the shutdown_pre_sync event handler on unload List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8448df88fdb4ed880b43e3fe91691d37b3940fe8 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8448df88fdb4ed880b43e3fe91691d37b3940fe8 commit 8448df88fdb4ed880b43e3fe91691d37b3940fe8 Author: Kristof Provost AuthorDate: 2024-07-19 06:08:14 +0000 Commit: Kristof Provost CommitDate: 2024-08-02 07:30:41 +0000 siftr: remove the shutdown_pre_sync event handler on unload PR: 280351 MFC after: 2 weeks (cherry picked from commit fb05f761ac0b28b03eb057e36fe118f007d43d73) --- sys/netinet/siftr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/netinet/siftr.c b/sys/netinet/siftr.c index 7ec19ecc875a..c6c47eb9da83 100644 --- a/sys/netinet/siftr.c +++ b/sys/netinet/siftr.c @@ -288,6 +288,7 @@ static struct mtx siftr_pkt_queue_mtx; static struct mtx siftr_pkt_mgr_mtx; static struct thread *siftr_pkt_manager_thr = NULL; static char direction[2] = {'i','o'}; +static eventhandler_tag siftr_shutdown_tag; /* Required function prototypes. */ static int siftr_sysctl_enabled_handler(SYSCTL_HANDLER_ARGS); @@ -1507,6 +1508,7 @@ static int deinit_siftr(void) { /* Cleanup. */ + EVENTHANDLER_DEREGISTER(shutdown_pre_sync, siftr_shutdown_tag); siftr_manage_ops(SIFTR_DISABLE); hashdestroy(counter_hash, M_SIFTR, siftr_hashmask); mtx_destroy(&siftr_pkt_queue_mtx); @@ -1521,8 +1523,8 @@ deinit_siftr(void) static int init_siftr(void) { - EVENTHANDLER_REGISTER(shutdown_pre_sync, siftr_shutdown_handler, NULL, - SHUTDOWN_PRI_FIRST); + siftr_shutdown_tag = EVENTHANDLER_REGISTER(shutdown_pre_sync, + siftr_shutdown_handler, NULL, SHUTDOWN_PRI_FIRST); /* Initialise our flow counter hash table. */ counter_hash = hashinit(SIFTR_EXPECTED_MAX_TCP_FLOWS, M_SIFTR,