Received: by mail.netbsd.org (Postfix, from userid 605) id 051EA84F7B; Fri, 2 Sep 2022 05:50:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 35B7084F75 for ; Fri, 2 Sep 2022 05:50:37 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 1ZwHxImisPb5 for ; Fri, 2 Sep 2022 05:50:36 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id B92A884DA5 for ; Fri, 2 Sep 2022 05:50:36 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id AA4ABFA8C; Fri, 2 Sep 2022 05:50:36 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Fri, 2 Sep 2022 05:50:36 +0000 From: "Jason R Thorpe" Subject: CVS commit: src/sys/net To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20220902055036.AA4ABFA8C@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Jason R Thorpe" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: thorpej Date: Fri Sep 2 05:50:36 UTC 2022 Modified Files: src/sys/net: if.c pktqueue.c pktqueue.h Log Message: Re-factor how pktq_barrier() is issued by if_detach(). Rather than excplicitly referencing ip_pktq and ip6_pktq in if_detach(), instead add all pktqueues to a global list. This list is then used in the new pktq_ifdetach() function to issue a barrier on all pktqueues. Note that the performance of this list is not critical; it will seldom be accessed (then pktqueues are created/destroyed and when network interfaces are detached), and so a simple synchronization strategy using a rwlock is sufficient. To generate a diff of this commit: cvs rdiff -u -r1.522 -r1.523 src/sys/net/if.c cvs rdiff -u -r1.19 -r1.20 src/sys/net/pktqueue.c cvs rdiff -u -r1.7 -r1.8 src/sys/net/pktqueue.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.