From: Nikolay Aleksandrov <razor@blackwall.org>
To: Hangbin Liu <liuhangbin@gmail.com>, netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Jesper Dangaard Brouer <hawk@kernel.org>,
John Fastabend <john.fastabend@gmail.com>,
Jiri Pirko <jiri@resnulli.us>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Lorenzo Bianconi <lorenzo@kernel.org>,
Andrii Nakryiko <andriin@fb.com>, Jussi Maki <joamaki@gmail.com>,
Jay Vosburgh <jv@jvosburgh.net>,
Andy Gospodarek <andy@greyhouse.net>,
Jonathan Corbet <corbet@lwn.net>,
Andrew Lunn <andrew+netdev@lunn.ch>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
bpf@vger.kernel.org
Subject: Re: [PATCH net-next 1/3] bonding: return detailed error when loading native XDP fails
Date: Wed, 16 Oct 2024 10:30:57 +0300 [thread overview]
Message-ID: <4accc34d-77f2-46d4-bf66-c10fe5e8f372@blackwall.org> (raw)
In-Reply-To: <20241016031649.880-2-liuhangbin@gmail.com>
On 16/10/2024 06:16, Hangbin Liu wrote:
> 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.
>
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.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 b1bffd8e9a95..f0f76b6ac8be 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;
I guess this is based on our discussion earlier?
Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
next prev parent reply other threads:[~2024-10-16 7:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-16 3:16 [PATCH net-next 0/3] Bonding: return detailed error about XDP failures Hangbin Liu
2024-10-16 3:16 ` [PATCH net-next 1/3] bonding: return detailed error when loading native XDP fails Hangbin Liu
2024-10-16 7:30 ` Nikolay Aleksandrov [this message]
2024-10-16 7:59 ` Daniel Borkmann
2024-10-16 8:13 ` Nikolay Aleksandrov
2024-10-16 8:24 ` Daniel Borkmann
2024-10-16 8:17 ` Hangbin Liu
2024-10-16 3:16 ` [PATCH net-next 2/3] bonding: use correct return value Hangbin Liu
2024-10-16 7:32 ` Nikolay Aleksandrov
2024-10-16 3:16 ` [PATCH net-next 3/3] Documentation: bonding: add XDP support explanation Hangbin Liu
2024-10-16 7:38 ` Nikolay Aleksandrov
2024-10-16 8:13 ` Hangbin Liu
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=4accc34d-77f2-46d4-bf66-c10fe5e8f372@blackwall.org \
--to=razor@blackwall.org \
--cc=andrew+netdev@lunn.ch \
--cc=andriin@fb.com \
--cc=andy@greyhouse.net \
--cc=ast@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=bpf@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=jiri@resnulli.us \
--cc=joamaki@gmail.com \
--cc=john.fastabend@gmail.com \
--cc=jv@jvosburgh.net \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liuhangbin@gmail.com \
--cc=lorenzo@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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