[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241015085121.5f22e96f@kernel.org>
Date: Tue, 15 Oct 2024 08:51:21 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Hangbin Liu <liuhangbin@...il.com>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>, Eric
Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Alexei
Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>,
Jesper Dangaard Brouer <hawk@...nel.org>, John Fastabend
<john.fastabend@...il.com>, Jiri Pirko <jiri@...nulli.us>, Sebastian
Andrzej Siewior <bigeasy@...utronix.de>, Lorenzo Bianconi
<lorenzo@...nel.org>, Andrii Nakryiko <andriin@...com>, Jussi Maki
<joamaki@...il.com>, Jay Vosburgh <jv@...sburgh.net>,
linux-kernel@...r.kernel.org, bpf@...r.kernel.org, Liang Li
<liali@...hat.com>
Subject: Re: [PATCH net] bpf: xdp: fallback to SKB mode if DRV flag is
absent.
On Tue, 15 Oct 2024 03:36:32 +0000 Hangbin Liu wrote:
> After commit c8a36f1945b2 ("bpf: xdp: Fix XDP mode when no mode flags
> specified"), the mode is automatically set to XDP_MODE_DRV if the driver
> implements the .ndo_bpf function. However, for drivers like bonding, which
> only support native XDP for specific modes, this may result in an
> "unsupported" response.
>
> In such cases, let's fall back to SKB mode if the user did not explicitly
> request DRV mode.
Looks like the issue is reported by QA rather than a real user.
A weak -1 from me on building such unreliable heuristics into
the kernel. As BPF CI's failure points out the ops can return
EOPNOTSUPP for multiple reasons while dev_xdp_mode() only checks
if the driver *has* ndo_bpf, not if it fails.
Powered by blists - more mailing lists