Commit c7cf3e92 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

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: default avatarJakub Kicinski <kuba@kernel.org>
parents 825199bf 9f59eccd
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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
=======================

+4 −1
Original line number Diff line number Diff line
@@ -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;