Re: [PATCH net 0/2] bond: fix xfrm offload feature during init

Cosmin Ratiu
2025-02-20T11:33:37Z

On Thu, 2025-02-20 at 11:18 +0000, Hangbin Liu wrote:
>
> Thanks for the feedback and confirmation. Let me try it first. Hope
> unregistering bond doesn't affect the gc works.

I think this should be handled naturally as part of the bond device
tear down. A quick peek shows:
bond_uninit -> (for each slave) __bond_release_one ->
bond_change_active_slave (_, NULL) -> bond_ipsec_del_sa_all deletes all
matching xfrm_state entries from bond->ipsec_list, with the mutex held.

Presumably, a new step after all slaves are deleted should call
drain_workqueue on the new workqueue to wait for any scheduled work to
be done before finally destroying the workqueue.

Cosmin.