Re: [PATCH net v3 v3 1/3] macsec: introduce dedicated workqueue for SA crypto cleanup

From: Sabrina Dubroca

Date: Mon May 11 2026 - 09:38:32 EST


Thanks for the updated patch. A few minor comments:

2026-05-09, 11:33:45 +0800, alexjlzheng@xxxxxxxxx wrote:
> @@ -4450,25 +4452,35 @@ static int __init macsec_init(void)
> {
> int err;
>
> + macsec_wq = alloc_ordered_workqueue("macsec", 0);
> + if (!macsec_wq)
> + return -ENOMEM;

Why did you pick an ordered workqueue instead of a normal one?

[...]
> -rtnl:
> +err_rtnl:
> rtnl_link_unregister(&macsec_link_ops);
> -notifier:
> +err_notifier:
> unregister_netdevice_notifier(&macsec_notifier);
> +err_destroy_wq:
> + /* Precautionary, mirrors macsec_exit() to stay safe if work
> + * ever becomes queueable before this point in the future.
> + */

I don't think this comment is really necessary, but ok.

(I missed the discussion on v2, it's not possible to create SAs at
this point, but it's reasonable to add the rcu_barrier here)

> + rcu_barrier();
> + destroy_workqueue(macsec_wq);
> return err;
> }

--
Sabrina