From: Rajani Kantha <681739313@139.com>
To: liuhangbin@gmail.com, razor@blackwall.org, toke@redhat.com,
kuba@kernel.org, wangliang74@huawei.com, joamaki@gmail.com,
stable@vger.kernel.org
Subject: [PATCH 6.1.y 1/2] bonding: return detailed error when loading native XDP fails
Date: Wed, 15 Apr 2026 17:12:31 +0800 [thread overview]
Message-ID: <20260415091232.3244-2-681739313@139.com> (raw)
In-Reply-To: <20260415091232.3244-1-681739313@139.com>
From: Hangbin Liu <liuhangbin@gmail.com>
[ Upstream commit 22ccb684c1cae37411450e6e86a379cd3c29cb8f ]
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.
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Link: https://patch.msgid.link/20241021031211.814-2-liuhangbin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Rajani Kantha <681739313@139.com>
---
drivers/net/bonding/bond_main.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 7fe7485fbb16..c6b4f681c70d 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -5636,8 +5636,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;
--
2.35.3
next prev parent reply other threads:[~2026-04-15 9:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-15 9:12 [PATCH 6.1.y 0/2] Backport 2 commits to 6.1.y to fix bond issue Rajani Kantha
2026-04-15 9:12 ` Rajani Kantha [this message]
2026-04-15 9:12 ` [PATCH 6.1.y 2/2] bonding: check xdp prog when set bond mode Rajani Kantha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260415091232.3244-2-681739313@139.com \
--to=681739313@139.com \
--cc=joamaki@gmail.com \
--cc=kuba@kernel.org \
--cc=liuhangbin@gmail.com \
--cc=razor@blackwall.org \
--cc=stable@vger.kernel.org \
--cc=toke@redhat.com \
--cc=wangliang74@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox