aboutsummaryrefslogtreecommitdiffstats
path: root/net/xdp/xdp_umem.c
diff options
context:
space:
mode:
authorJakub Kicinski <jakub.kicinski@netronome.com>2018-10-01 14:51:36 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2018-10-05 09:31:01 +0200
commit1661d346628115c364e2b7d5b15a64ca3bd0dbd4 (patch)
tree858d4d16a1a04bcb862f0e0a92150f88d5b44f13 /net/xdp/xdp_umem.c
parentethtool: rename local variable max -> curr (diff)
downloadlinux-dev-1661d346628115c364e2b7d5b15a64ca3bd0dbd4.tar.xz
linux-dev-1661d346628115c364e2b7d5b15a64ca3bd0dbd4.zip
ethtool: don't allow disabling queues with umem installed
We already check the RSS indirection table does not use queues which would be disabled by channel reconfiguration. Make sure user does not try to disable queues which have a UMEM and zero-copy AF_XDP socket installed. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to '')
-rw-r--r--net/xdp/xdp_umem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/xdp/xdp_umem.c b/net/xdp/xdp_umem.c
index 4d6c6652f5d1..773326f682b1 100644
--- a/net/xdp/xdp_umem.c
+++ b/net/xdp/xdp_umem.c
@@ -55,8 +55,8 @@ static void xdp_reg_umem_at_qid(struct net_device *dev, struct xdp_umem *umem,
dev->_tx[queue_id].umem = umem;
}
-static struct xdp_umem *xdp_get_umem_from_qid(struct net_device *dev,
- u16 queue_id)
+struct xdp_umem *xdp_get_umem_from_qid(struct net_device *dev,
+ u16 queue_id)
{
if (queue_id < dev->real_num_rx_queues)
return dev->_rx[queue_id].umem;