Netdev List
 help / color / mirror / Atom feed
From: alexjlzheng@gmail.com
To: kuba@kernel.org
Cc: albinwyang@tencent.com, alexjlzheng@gmail.com,
	alexjlzheng@tencent.com, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com,
	hannes@stressinduktion.org, horms@kernel.org, kuniyu@google.com,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	pabeni@redhat.com, sd@queasysnail.net, shenyangyang4@huawei.com
Subject: Re: [PATCH net v2 1/3] macsec: introduce dedicated workqueue for SA crypto cleanup
Date: Sat,  9 May 2026 10:50:22 +0800	[thread overview]
Message-ID: <20260509025022.1804166-1-alexjlzheng@tencent.com> (raw)
In-Reply-To: <20260508191923.3978b8fa@kernel.org>

From: Jinliang Zheng <alexjlzheng@tencent.com>

On Thu, 8 May 2026 19:19:23 -0700, Jakub Kicinski wrote:
> > Regarding the label name: "wq:" follows the existing naming convention
> > in macsec_init(), where the other error labels are also named after the
> > resource they clean up ("rtnl:", "notifier:") rather than using the
> > "err_xxx:" style.
>
> I can see that, but we have to start somewhere.

Good point, will rename to err_destroy_wq: in v3.

> > Regarding rcu_barrier(): in the error path of macsec_init(), the
> > workqueue has just been created and no MACsec interface has been
> > registered yet. [...]
>
> TBH I didn't check the code, you may be right that until the genl
> family is registered there's no way to an SA to exist (even tho
> macsec devices may have already gotten created).
>
> Either way, I'd just add that barrier. We're basically leaving
> a trap for whoever tries to add another piece of code to this function.
> The error unwind path and the remove path should generally be kept
> the same.

Agreed, that's a good point. Keeping the error unwind consistent with
the remove path avoids subtle future bugs. Will add rcu_barrier() before
destroy_workqueue() in the error path in v3.

Thanks for the review!

Jinliang

  reply	other threads:[~2026-05-09  2:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07  2:04 [PATCH net v2 0/3] macsec: use rcu_work to fix crypto cleanup in softirq context alexjlzheng
2026-05-07  2:04 ` [PATCH net v2 v2 1/3] macsec: introduce dedicated workqueue for SA crypto cleanup alexjlzheng
2026-05-08 22:42   ` Jakub Kicinski
2026-05-09  2:00     ` [PATCH net " alexjlzheng
2026-05-09  2:19       ` Jakub Kicinski
2026-05-09  2:50         ` alexjlzheng [this message]
2026-05-07  2:04 ` [PATCH net v2 v2 2/3] macsec: use rcu_work to defer RX SA crypto cleanup out of softirq alexjlzheng
2026-05-08 22:42   ` Jakub Kicinski
2026-05-07  2:04 ` [PATCH net v2 v2 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=20260509025022.1804166-1-alexjlzheng@tencent.com \
    --to=alexjlzheng@gmail.com \
    --cc=albinwyang@tencent.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=sd@queasysnail.net \
    --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