From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b1-smtp.messagingengine.com (fhigh-b1-smtp.messagingengine.com [202.12.124.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4DA948C8C7; Tue, 12 May 2026 08:17:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.152 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778573826; cv=none; b=PcA/VNgxKZAWN31HSvmVzDBPOQyJjxTy3fNfNpGiTsbNwUROHmENsZ/N4Mqo/rEHit0k9gIEpfeCd8DSIaKrLuKcxKTVEGwocuLe/NUJrVYE+Tw4nnF8pCgJry+2b1J63u2hcyjAJ9F3Nze1mWwPtPKZZEyWE6ZykkR5yR91wsI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778573826; c=relaxed/simple; bh=tI/lGNkIuja9ajGxoyDmTYN2O82oKg71izMcMng78FA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=upjP8kPKpkry8tN0cgJruwsQELcVwU4qLDKHFocpLmjjyI2xijKBTgmwqWwrY/tIOhnEUOt4SbcGm+LCYeIaQvA1dZXz0iUCXn/Xw/4p4qLDrobBx1U6YCOdfY6D/djkayPHvjmly5QbRT1KcxvHR0i6gv/4yVS3s5eIpKrh3E0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=queasysnail.net; spf=pass smtp.mailfrom=queasysnail.net; dkim=pass (2048-bit key) header.d=queasysnail.net header.i=@queasysnail.net header.b=XT0MkHvQ; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=j9LZw+4R; arc=none smtp.client-ip=202.12.124.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=queasysnail.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=queasysnail.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=queasysnail.net header.i=@queasysnail.net header.b="XT0MkHvQ"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="j9LZw+4R" Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id 35E4E7A00FB; Tue, 12 May 2026 04:17:01 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-03.internal (MEProxy); Tue, 12 May 2026 04:17:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=queasysnail.net; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm1; t=1778573820; x= 1778660220; bh=kcKh2gyMp7VEH9jihouElpFQws/Ywu5UdBi3fT/ZVuc=; b=X T0MkHvQOyKIMTDwArqiH72Imdoi1gVGv3e8/vAe6y/80WW3/1S2pfX22GlJlyBJp VDJ1ZE8Sc1Z+QUJTD9xg641n8b+aypQgv5GLr23NVkub5Ch5HORSvoKAYBvf0Cqo OZwGs4Q1ecAVsl6bOXnPG0g+U+5Q1HYiVuOubKgbWFP0oWBsmyCU5+Y9CYm0z1lo luDVflVl0Kr6eVQQaPdE3qYdZv25M4s3EnZWYpgTdaTNo+ZoZ7W5hnoQx4hSzRNm 13AymYf5rMi9eh4Wt5MmpVorPSUDOa4B8vSgKbqT09SNNKiwda7dEEDdpAuMIr04 poqPstleyIV8AjUqvLBRg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1778573820; x=1778660220; bh=kcKh2gyMp7VEH9jihouElpFQws/Ywu5UdBi 3fT/ZVuc=; b=j9LZw+4RW+KuQR8WsCO6P/PIayNeKLJXUbLmmAC7lFmAp4IRndK j/Mai/xcx7OcJKaZfO02I6KnWkaZgeQ1+4SWYDE/WWvm4CtUDPt8syrE8sxX0u6R Sb33qfMmIHUlc5ocgBvKMkc1qOsl94UAhqRgSzQshySZimRPram25G+8N4vzpl3n GfvH9Vq2XPJR71Cx+M640qef1WJtDewpzFdjmY4brcqQnnSxoVYr6meHJUhPmFOr a/ayLqFSQJXEE4W2j3qJcqO84JDX0nqaSvFEJsyyOt7dUef6tMwvdnRy40OuH2hk ZeZechjeLEvcY7XaUY6fwcbC2oYE6u1TTDg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdduvddufedtucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkfhggtggujgesthdtredttddtjeenucfhrhhomhepufgrsghrihhn rgcuffhusghrohgtrgcuoehsugesqhhuvggrshihshhnrghilhdrnhgvtheqnecuggftrf grthhtvghrnhepuefhhfffgfffhfefueeiudegtdefhfekgeetheegheeifffguedvueff fefgudffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epshgusehquhgvrghshihsnhgrihhlrdhnvghtpdhnsggprhgtphhtthhopedugedpmhho uggvpehsmhhtphhouhhtpdhrtghpthhtoheprghlvgigjhhliihhvghnghesghhmrghilh drtghomhdprhgtphhtthhopegrnhgurhgvfidonhgvthguvghvsehluhhnnhdrtghhpdhr tghpthhtohepuggrvhgvmhesuggrvhgvmhhlohhfthdrnhgvthdprhgtphhtthhopegvug humhgriigvthesghhoohhglhgvrdgtohhmpdhrtghpthhtohepkhhusggrsehkvghrnhgv lhdrohhrghdprhgtphhtthhopehprggsvghnihesrhgvughhrghtrdgtohhmpdhrtghpth htohephhhorhhmsheskhgvrhhnvghlrdhorhhgpdhrtghpthhtohephhgrnhhnvghssehs thhrvghsshhinhguuhhkthhiohhnrdhorhhgpdhrtghpthhtoheprghlsghinhifhigrnh hgsehtvghntggvnhhtrdgtohhm X-ME-Proxy: Feedback-ID: i934648bf:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 12 May 2026 04:16:59 -0400 (EDT) Date: Tue, 12 May 2026 10:16:57 +0200 From: Sabrina Dubroca To: alexjlzheng@gmail.com Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, hannes@stressinduktion.org, albinwyang@tencent.com, shenyangyang4@huawei.com, kuniyu@google.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jinliang Zheng Subject: Re: [PATCH net v4 v4 1/3] macsec: introduce dedicated workqueue for SA crypto cleanup Message-ID: References: <20260511153102.2640368-1-alexjlzheng@tencent.com> <20260511153102.2640368-2-alexjlzheng@tencent.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20260511153102.2640368-2-alexjlzheng@tencent.com> 2026-05-11, 23:30:58 +0800, alexjlzheng@gmail.com wrote: > From: Jinliang Zheng > > Introduce a dedicated ordered workqueue, macsec_wq, which will be used > by subsequent patches to defer SA crypto cleanup (crypto_free_aead and > related teardown) out of softirq context. > > Using a dedicated workqueue instead of system_wq allows macsec_exit() > to drain exactly the work items belonging to this module via > destroy_workqueue(), without interfering with unrelated work items on > system_wq or causing unexpected delays elsewhere. > > rcu_barrier() in macsec_exit() ensures all in-flight rcu_work callbacks > have enqueued their work items before destroy_workqueue() drains and > destroys the queue, making the two-step teardown correct and complete. > The same sequence is kept in the error path of macsec_init() as a > precaution, to mirror macsec_exit() and stay safe if work ever becomes > queueable before this point in the future. > > While at it, rename the error labels in macsec_init() from the > resource-named style (rtnl:, notifier:, wq:) to the err_xxx: style > (err_rtnl:, err_notifier:, err_destroy_wq:) to align with the broader > kernel convention. > > Signed-off-by: Jinliang Zheng > --- > drivers/net/macsec.c | 23 ++++++++++++++++++----- > 1 file changed, 18 insertions(+), 5 deletions(-) Reviewed-by: Sabrina Dubroca Thanks for the fixes! -- Sabrina