summaryrefslogtreecommitdiffstats
path: root/drivers/net/hyperv
diff options
context:
space:
mode:
authorMina Almasry <almasrymina@google.com>2024-08-22 05:51:54 +0000
committerDavid S. Miller <davem@davemloft.net>2024-08-24 15:27:22 +0100
commit7d3aed652d090508990d245f9d80dcc481910d02 (patch)
tree9659be1ae50c1baf88a35bfc492e3abee902d038 /drivers/net/hyperv
parentf9db28bb09f46087580f2a8da54bb0aab59a8024 (diff)
downloadlinux-7d3aed652d090508990d245f9d80dcc481910d02.tar.gz
linux-7d3aed652d090508990d245f9d80dcc481910d02.tar.bz2
linux-7d3aed652d090508990d245f9d80dcc481910d02.zip
net: refactor ->ndo_bpf calls into dev_xdp_propagate
When net devices propagate xdp configurations to slave devices, we will need to perform a memory provider check to ensure we're not binding xdp to a device using unreadable netmem. Currently the ->ndo_bpf calls in a few places. Adding checks to all these places would not be ideal. Refactor all the ->ndo_bpf calls into one place where we can add this check in the future. Suggested-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Mina Almasry <almasrymina@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv')
-rw-r--r--drivers/net/hyperv/netvsc_bpf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/hyperv/netvsc_bpf.c b/drivers/net/hyperv/netvsc_bpf.c
index 4a9522689fa4..e01c5997a551 100644
--- a/drivers/net/hyperv/netvsc_bpf.c
+++ b/drivers/net/hyperv/netvsc_bpf.c
@@ -183,7 +183,7 @@ int netvsc_vf_setxdp(struct net_device *vf_netdev, struct bpf_prog *prog)
xdp.command = XDP_SETUP_PROG;
xdp.prog = prog;
- ret = vf_netdev->netdev_ops->ndo_bpf(vf_netdev, &xdp);
+ ret = dev_xdp_propagate(vf_netdev, &xdp);
if (ret && prog)
bpf_prog_put(prog);