diff options
author | Jakub Kicinski <kuba@kernel.org> | 2024-10-29 02:09:43 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-10-29 02:09:44 +0300 |
commit | c7cf3e928e636332489228510c5d0e56ef06a6d5 (patch) | |
tree | 200cd6fcc6a1a145a655d15ae3f293d4e3aa8aaf | |
parent | 825199bf2017e4549586f038ede9acec68de883d (diff) | |
parent | 9f59eccd9dd5a4c6a974e02e70b9eed0d3b14245 (diff) | |
download | linux-c7cf3e928e636332489228510c5d0e56ef06a6d5.tar.xz |
Merge branch 'bonding-returns-detailed-error-about-xdp-failures'
Hangbin Liu says:
====================
Bonding: returns detailed error about XDP failures
Based on discussion[1], this patch set returns detailed error about XDP
failures. And update bonding document about XDP supports.
https://lore.kernel.org/8088f2a7-3ab1-4a1e-996d-c15703da13cc@blackwall.org
====================
Link: https://patch.msgid.link/20241021031211.814-1-liuhangbin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | Documentation/networking/bonding.rst | 11 | ||||
-rw-r--r-- | drivers/net/bonding/bond_main.c | 5 |
2 files changed, 15 insertions, 1 deletions
diff --git a/Documentation/networking/bonding.rst b/Documentation/networking/bonding.rst index e774b48de9f5..7c8d22d68682 100644 --- a/Documentation/networking/bonding.rst +++ b/Documentation/networking/bonding.rst @@ -2916,6 +2916,17 @@ from the bond (``ifenslave -d bond0 eth0``). The bonding driver will then restore the MAC addresses that the slaves had before they were enslaved. +9. What bonding modes support native XDP? +------------------------------------------ + + * balance-rr (0) + * active-backup (1) + * balance-xor (2) + * 802.3ad (4) + +Note that the vlan+srcmac hash policy does not support native XDP. +For other bonding modes, the XDP program must be loaded with generic mode. + 16. Resources and Links ======================= diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 3928287f5865..5812e8eaccf1 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -5676,8 +5676,11 @@ static int bond_xdp_set(struct net_device *dev, struct bpf_prog *prog, ASSERT_RTNL(); - if (!bond_xdp_check(bond)) + if (!bond_xdp_check(bond)) { + BOND_NL_ERR(dev, extack, + "No native XDP support for the current bonding mode"); return -EOPNOTSUPP; + } old_prog = bond->xdp_prog; bond->xdp_prog = prog; |