Skip to content

Commit 0da5d94

Browse files
spikehaxboe
authored andcommitted
net: export netdev_get_by_index_lock()
Need to call netdev_get_by_index_lock() from io_uring/zcrx.c, but it is currently private to net. Export the function in linux/netdevice.h. Signed-off-by: David Wei <[email protected]> Acked-by: Jakub Kicinski <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 749ec9a commit 0da5d94

2 files changed

Lines changed: 1 addition & 1 deletion

File tree

include/linux/netdevice.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3401,6 +3401,7 @@ struct net_device *dev_get_by_index(struct net *net, int ifindex);
34013401
struct net_device *__dev_get_by_index(struct net *net, int ifindex);
34023402
struct net_device *netdev_get_by_index(struct net *net, int ifindex,
34033403
netdevice_tracker *tracker, gfp_t gfp);
3404+
struct net_device *netdev_get_by_index_lock(struct net *net, int ifindex);
34043405
struct net_device *netdev_get_by_name(struct net *net, const char *name,
34053406
netdevice_tracker *tracker, gfp_t gfp);
34063407
struct net_device *netdev_get_by_flags_rcu(struct net *net, netdevice_tracker *tracker,

net/core/dev.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ struct napi_struct *
2929
netdev_napi_by_id_lock(struct net *net, unsigned int napi_id);
3030
struct net_device *dev_get_by_napi_id(unsigned int napi_id);
3131

32-
struct net_device *netdev_get_by_index_lock(struct net *net, int ifindex);
3332
struct net_device *__netdev_put_lock(struct net_device *dev, struct net *net);
3433
struct net_device *
3534
netdev_xa_find_lock(struct net *net, struct net_device *dev,

0 commit comments

Comments
 (0)