Commit b7c57d48 authored by Jussi Maki's avatar Jussi Maki Committed by Zhengchao Shao
Browse files

net, core: Add support for XDP redirection to slave device

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: default avatarJussi Maki <joamaki@gmail.com>
Signed-off-by: default avatarDaniel 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: default avatarZhengchao Shao <shaozhengchao@huawei.com>
parent 082537b2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment