From nobody Fri Jul 19 08:10:37 2024 X-Original-To: dev-commits-src-main@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 4WQMmt0KwMz5RCFb; Fri, 19 Jul 2024 08:10:38 +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 4WQMms5LZGz4Cd6; Fri, 19 Jul 2024 08:10:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721376637; 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=tIGGFAQE+N/w1ZogRX0Q9aRIxvb7MUHUTgiyMGSPL4w=; b=mt1xrnRZAvKpGOq0kFNU7tRt8d3wFV0CDvG1yCKFfNLHjt2Hp3S1q8EIOBLyqoQOcYTRx+ XDKIpnc+GL4I9+v1FxiCepw9Z6GnI1LNXN7LIXCWAhEgYQY3QfOf7pMs/7M3VsURCkd9Vv 6XynUxPShFW9+FYOLu7gyXjoY6antIyNlnM8zDIuf+DbXmwKB3W2R5ITuePddr2DHllzU4 eV8PBMcKKjOFVVQOBG40gGRgbb6mt8l2VQompH5sIYE7eSm3xSO9aasKkOZJupmV+jDQxt Qkd59ALQQX9H/MdyViRsBJCotflWAG4kCD+R7ZfDqGOhFMtXwZkkKpIwnAzr+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721376637; a=rsa-sha256; cv=none; b=kuOCveEB4dAMmcADIeVWu6b6xeaExQ1SFyNd9XN00CGUynNgpRaVrhoimaMn2lRUti9m97 wf0eKW41yLlq7EPRI2kfYzPaILvpKkFIkwuVBzraY2V/I+sX4KNiVXAu1/yRPRHBW/2sMm wgRR4jByl7kG2Fs93feTmfXBP/DgUn3yBs6Drcju/Xms6CBeiHGMip/AXFH0vA3NAu+XcA d/eH6li6JTgXY59/l36mFp7lp0arxmhAfp2Q8fSDbEce2gTtBSghwf9ueM//hKxdxw6x0o jTkKI60naNQ7zKNnyVlXiQfHPVL/n1+8jFbik0Im66VcCZqCI+6vdNIrzCFdZg== 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=1721376637; 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=tIGGFAQE+N/w1ZogRX0Q9aRIxvb7MUHUTgiyMGSPL4w=; b=uabos6DtpuBYVo+AuMcCWD0P3q7/a3NhF4wBRFJ8wWSameDUO2U+q8VMmJHlXn/X+M/enF /nZGFujLezVAP1r95NIBf/WWWbSYA9iiGWV4SOvw2O2lkRUGw3M0kA0rtwjH7KOKCh3Lsh gYztzqM0CBmUXA038ijknnUEf0ODM62HztFNJmIi5Zw1vrGlBjh2Ke50Vv5e9RSpDcL6QT YC0f8fpjf6YLOVJuEQ3ePiqgLwoatlWw4Cv276IOEO76sbCMPzkVx0YNyvVu7MRcoufoV5 CibaGR1ip4IvNHv+6Ut9W1RRcM2+FlTKQWyEyYkSAlmED1f71cAnOGM+606TKw== 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 4WQMms4rsCzNhK; Fri, 19 Jul 2024 08:10:37 +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 46J8Ab3w022715; Fri, 19 Jul 2024 08:10:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46J8Abup022712; Fri, 19 Jul 2024 08:10:37 GMT (envelope-from git) Date: Fri, 19 Jul 2024 08:10:37 GMT Message-Id: <202407190810.46J8Abup022712@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: fb05f761ac0b - main - siftr: remove the shutdown_pre_sync event handler on unload List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: fb05f761ac0b28b03eb057e36fe118f007d43d73 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=fb05f761ac0b28b03eb057e36fe118f007d43d73 commit fb05f761ac0b28b03eb057e36fe118f007d43d73 Author: Kristof Provost AuthorDate: 2024-07-19 06:08:14 +0000 Commit: Kristof Provost CommitDate: 2024-07-19 06:09:58 +0000 siftr: remove the shutdown_pre_sync event handler on unload PR: 280351 MFC after: 2 weeks --- 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 bf0cdc2ac4cc..ea1fbc8ff394 100644 --- a/sys/netinet/siftr.c +++ b/sys/netinet/siftr.c @@ -273,6 +273,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); @@ -1310,6 +1311,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); @@ -1324,8 +1326,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,