diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2025-03-25 10:04:55 -0700 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-03-25 10:06:49 -0700 |
| commit | 7bd2e6b74ad56a49459ba84e8d4fa3730055ab5e (patch) | |
| tree | f3a934ee1001a31e62f38e7cef6c014efa7f6f56 /net/core/netdev_rx_queue.c | |
| parent | 51068769cc8c699eaba7d411f214bc969b35708b (diff) | |
| parent | b52458652eca5a551ddb55605201b136f091b04d (diff) | |
Merge branch 'net-skip-taking-rtnl_lock-for-queue-get'
Jakub Kicinski says:
====================
net: skip taking rtnl_lock for queue GET (prep)
Skip taking rtnl_lock for queue GET ops on devices which opt
into running all ops under the instance lock. In preparating
for performing queue ops without rtnl lock clarify the protection
of queue-related fields.
v1: https://lore.kernel.org/20250312223507.805719-1-kuba@kernel.org
====================
Link: https://patch.msgid.link/20250324224537.248800-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/netdev_rx_queue.c')
| -rw-r--r-- | net/core/netdev_rx_queue.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/core/netdev_rx_queue.c b/net/core/netdev_rx_queue.c index a5b234b33cd5..3af716f77a13 100644 --- a/net/core/netdev_rx_queue.c +++ b/net/core/netdev_rx_queue.c @@ -92,6 +92,9 @@ static int __net_mp_open_rxq(struct net_device *dev, unsigned ifq_idx, struct netdev_rx_queue *rxq; int ret; + if (!netdev_need_ops_lock(dev)) + return -EOPNOTSUPP; + if (ifq_idx >= dev->real_num_rx_queues) return -EINVAL; ifq_idx = array_index_nospec(ifq_idx, dev->real_num_rx_queues); |
