diff options
| author | Jakub Kicinski <[email protected]> | 2025-04-08 19:59:52 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-04-10 00:01:52 +0000 |
| commit | 03df156dd3a6d5992f17682cd5c3b11e5ffdae02 (patch) | |
| tree | bae9c0980d13aaec830ddfc17a5605068db1d6df /net/unix/af_unix.h | |
| parent | netdev: don't hold rtnl_lock over nl queue info get when possible (diff) | |
| download | kernel-03df156dd3a6d5992f17682cd5c3b11e5ffdae02.tar.gz kernel-03df156dd3a6d5992f17682cd5c3b11e5ffdae02.zip | |
xdp: double protect netdev->xdp_flags with netdev->lock
Protect xdp_features with netdev->lock. This way pure readers
no longer have to take rtnl_lock to access the field.
This includes calling NETDEV_XDP_FEAT_CHANGE under the lock.
Looks like that's fine for bonding, the only "real" listener,
it's the same as ethtool feature change.
In terms of normal drivers - only GVE need special consideration
(other drivers don't use instance lock or don't support XDP).
It calls xdp_set_features_flag() helper from gve_init_priv() which
in turn is called from gve_reset_recovery() (locked), or prior
to netdev registration. So switch to _locked.
Reviewed-by: Joe Damato <[email protected]>
Acked-by: Stanislav Fomichev <[email protected]>
Acked-by: Harshitha Ramamurthy <[email protected]>
Acked-by: Martin KaFai Lau <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/unix/af_unix.h')
0 files changed, 0 insertions, 0 deletions
