summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMina Almasry <almasrymina@google.com>2024-08-22 08:51:54 +0300
committerDavid S. Miller <davem@davemloft.net>2024-08-24 17:27:22 +0300
commit7d3aed652d090508990d245f9d80dcc481910d02 (patch)
tree9659be1ae50c1baf88a35bfc492e3abee902d038 /include/linux
parentf9db28bb09f46087580f2a8da54bb0aab59a8024 (diff)
downloadlinux-7d3aed652d090508990d245f9d80dcc481910d02.tar.xz
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 'include/linux')
-rw-r--r--include/linux/netdevice.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 289a6133769c..7dfa836d9dbf 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -3925,6 +3925,7 @@ struct sk_buff *dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
int bpf_xdp_link_attach(const union bpf_attr *attr, struct bpf_prog *prog);
u8 dev_xdp_prog_count(struct net_device *dev);
+int dev_xdp_propagate(struct net_device *dev, struct netdev_bpf *bpf);
u32 dev_xdp_prog_id(struct net_device *dev, enum bpf_xdp_mode mode);
int __dev_forward_skb(struct net_device *dev, struct sk_buff *skb);