Re: [PATCH net] bpf: xdp: fallback to SKB mode if DRV flag is absent.

From
Nikolay Aleksandrov <razor@blackwall.org>
Date
2024-10-15 10:55:33
Also in
bpf, lkml
Reply to
Nikolay Aleksandrov, 2024-10-15
On 15/10/2024 13:46, Nikolay Aleksandrov wrote:
On 15/10/2024 13:38, Hangbin Liu wrote:
quoted
On Tue, Oct 15, 2024 at 12:53:08PM +0300, Nikolay Aleksandrov wrote:
quoted
On 15/10/2024 11:17, Daniel Borkmann wrote:
quoted
On 10/15/24 5:36 AM, Hangbin Liu wrote:
quoted
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.
So behaviour changed once, now it's changing again.. 
This should not be a behaviour change, it just follow the fallback rules.
hm, what fallback rules? I see dev_xdp_attach() exits on many errors
with proper codes and extack messages, am I missing something, where's the
fallback?
Oh did you mean dev_xdp_mode()'s ndo_bpf check to decide which mode to use ?

So you'd like to do that for the unsupported bond modes as well, then I'd go
with Daniel's suggestion in that case and keep it in the bonding until
something else needs it.

Thread (8 messages) 8 messages, 4 authors, last reply 2024-10-15
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help