Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <dw@davidwei.uk>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

David Wei and committed by
Jens Axboe
c07a491c 93e197e5

+1 -1
+1
include/linux/netdevice.h
··· 3401 3401 struct net_device *__dev_get_by_index(struct net *net, int ifindex); 3402 3402 struct net_device *netdev_get_by_index(struct net *net, int ifindex, 3403 3403 netdevice_tracker *tracker, gfp_t gfp); 3404 + struct net_device *netdev_get_by_index_lock(struct net *net, int ifindex); 3404 3405 struct net_device *netdev_get_by_name(struct net *net, const char *name, 3405 3406 netdevice_tracker *tracker, gfp_t gfp); 3406 3407 struct net_device *netdev_get_by_flags_rcu(struct net *net, netdevice_tracker *tracker,
-1
net/core/dev.h
··· 29 29 netdev_napi_by_id_lock(struct net *net, unsigned int napi_id); 30 30 struct net_device *dev_get_by_napi_id(unsigned int napi_id); 31 31 32 - struct net_device *netdev_get_by_index_lock(struct net *net, int ifindex); 33 32 struct net_device *__netdev_put_lock(struct net_device *dev, struct net *net); 34 33 struct net_device * 35 34 netdev_xa_find_lock(struct net *net, struct net_device *dev,