Netdev List
 help / color / mirror / Atom feed
From: Sabrina Dubroca <sd@queasysnail.net>
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 <alexjlzheng@tencent.com>
Subject: Re: [PATCH net v4 v4 1/3] macsec: introduce dedicated workqueue for SA crypto cleanup
Date: Tue, 12 May 2026 10:16:57 +0200	[thread overview]
Message-ID: <agLh-SUJqwZ8XF_n@krikkit> (raw)
In-Reply-To: <20260511153102.2640368-2-alexjlzheng@tencent.com>

2026-05-11, 23:30:58 +0800, alexjlzheng@gmail.com wrote:
> From: Jinliang Zheng <alexjlzheng@tencent.com>
> 
> 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 <alexjlzheng@tencent.com>
> ---
>  drivers/net/macsec.c | 23 ++++++++++++++++++-----
>  1 file changed, 18 insertions(+), 5 deletions(-)

Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>

Thanks for the fixes!

-- 
Sabrina

  reply	other threads:[~2026-05-12  8:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-11 15:30 [PATCH net v4 0/3] macsec: use rcu_work to fix crypto cleanup in softirq context alexjlzheng
2026-05-11 15:30 ` [PATCH net v4 v4 1/3] macsec: introduce dedicated workqueue for SA crypto cleanup alexjlzheng
2026-05-12  8:16   ` Sabrina Dubroca [this message]
2026-05-11 15:30 ` [PATCH net v4 v4 2/3] macsec: use rcu_work to defer RX SA crypto cleanup out of softirq alexjlzheng
2026-05-11 15:31 ` [PATCH net v4 v4 3/3] macsec: use rcu_work to defer TX " alexjlzheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=agLh-SUJqwZ8XF_n@krikkit \
    --to=sd@queasysnail.net \
    --cc=albinwyang@tencent.com \
    --cc=alexjlzheng@gmail.com \
    --cc=alexjlzheng@tencent.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hannes@stressinduktion.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuniyu@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shenyangyang4@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox