]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: remove the netif_get_rx_queue_lease_locked() helpers
authorJakub Kicinski <kuba@kernel.org>
Wed, 8 Apr 2026 22:12:51 +0000 (15:12 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 10 Apr 2026 01:26:28 +0000 (18:26 -0700)
commit581d28606cdd51c5da06330e8fb97476503cd74d
treeeba52e9464f59db123a99813a9f1381c8994967a
parent15089225889ba4b29f0263757cd66932fa676cb0
net: remove the netif_get_rx_queue_lease_locked() helpers

The netif_get_rx_queue_lease_locked() API hides the locking
and the descend onto the leased queue. Making the code
harder to follow (at least to me). Remove the API and open
code the descend a bit. Most of the code now looks like:

 if (!leased)
     return __helper(x);

 hw_rxq = ..
 netdev_lock(hw_rxq->dev);
 ret = __helper(x);
 netdev_unlock(hw_rxq->dev);

 return ret;

Of course if we have more code paths that need the wrapping
we may need to revisit. For now, IMHO, having to know what
netif_get_rx_queue_lease_locked() does is not worth the 20LoC
it saves.

Link: https://patch.msgid.link/20260408151251.72bd2482@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/netdev_rx_queue.h
net/core/dev.h
net/core/netdev-genl.c
net/core/netdev_queues.c
net/core/netdev_rx_queue.c
net/xdp/xsk.c