Bonding: returns detailed error about XDP failures
Subsystems (5)
v3 cover 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.
v3: drop patch that modified the return value (Toke Høiland-Jørgensen)
drop the sentence that repeat title (Nikolay Aleksandrov)
v2: update the title in the doc (Nikolay Aleksandrov)
[1]
https://lore.kernel.org/netdev/[email protected]/o
Hangbin Liu (2):
bonding: return detailed error when loading native XDP fails
Documentation: bonding: add XDP support explanation
Documentation/networking/bonding.rst | 11 +++++++++++ drivers/net/bonding/bond_main.c | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-)
Signature · 1 line
2.46.0
PATCH v3 1/2 bonding: return detailed error when loading native XDP fails
Bonding only supports native XDP for specific modes, which can lead to confusion for users regarding why XDP loads successfully at times and fails at others. This patch enhances error handling by returning detailed error messages, providing users with clearer insights into the specific reasons for the failure when loading native XDP.
--- drivers/net/bonding/bond_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/bonding/bond_main.c +4 -1
@@ -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;
Signature · 1 line
2.46.0
PATCH v3 2/2 Documentation: bonding: add XDP support explanation
In reply to Hangbin LiuAdd document about which modes have native XDP support.
--- Documentation/networking/bonding.rst | 11 +++++++++++ 1 file changed, 11 insertions(+)
Documentation/networking/bonding.rst +11 -0
@@ -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 =======================
Signature · 1 line
2.46.0
Re: [PATCHv3 net-next 2/2] Documentation: bonding: add XDP support explanation
Quoted 4 lines · Hangbin Liu
Add document about which modes have native XDP support.
Reviewed-by Nikolay Aleksandrov <[email protected]>Signed-off-by Hangbin Liu <[email protected]>
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Mon, 21 Oct 2024 03:12:09 +0000 you wrote:
Based on discussion[1], this patch set returns detailed error about XDP failures. And update bonding document about XDP supports.
v3: drop patch that modified the return value (Toke Høiland-Jørgensen)
drop the sentence that repeat title (Nikolay Aleksandrov)
v2: update the title in the doc (Nikolay Aleksandrov)[...]
Here is the summary with links:
- [PATCHv3,net-next,1/2] bonding: return detailed error when loading native XDP fails
https://git.kernel.org/netdev/net-next/c/22ccb684c1ca - [PATCHv3,net-next,2/2] Documentation: bonding: add XDP support explanation https://git.kernel.org/netdev/net-next/c/9f59eccd9dd5
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html