-
由 Jussi Maki 提交于
mainline inclusion from mainline-v5.15-rc1 commit 879af96f category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I7NDRB CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=879af96ffd72706c6e3278ea6b45b0b0e37ec5d7 ---------------------------------------- This adds the ndo_xdp_get_xmit_slave hook for transforming XDP_TX into XDP_REDIRECT after BPF program run when the ingress device is a bond slave. The dev_xdp_prog_count is exposed so that slave devices can be checked for loaded XDP programs in order to avoid the situation where both bond master and slave have programs loaded according to xdp_state. Signed-off-by: NJussi Maki <joamaki@gmail.com> Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net> Cc: Jay Vosburgh <j.vosburgh@gmail.com> Cc: Veaceslav Falico <vfalico@gmail.com> Cc: Andy Gospodarek <andy@greyhouse.net> Link: https://lore.kernel.org/bpf/20210731055738.16820-3-joamaki@gmail.com Conflicts: include/linux/filter.h include/linux/netdevice.h net/core/dev.c net/core/filter.c Signed-off-by: NZhengchao Shao <shaozhengchao@huawei.com>
b7c57d48