Subject: Re: [PATCH net v2 7/8] net/mlx5e: take into account device reconfiguration for xdp_features flag

From: Jakub Kicinski <[email-masked]>
Date: Wed, 15 Mar 2023 22:37:15 -0700

On Wed, 15 Mar 2023 22:03:27 -0700 Saeed Mahameed wrote:
> Yes, completely different, Tariq's fix is in mlx5 only.
> He splits the xdp  feature setting into two functions, 
> one to initialize the netdev's xdp before registration,
> and another one to update xpd features and call the notifier in the
> "after" registration set_features flows.
> 
> I like our solution more, since it's more explicit and doesn't require
> patching xdp stack because mlx5 abused xdp_set_features_flag, unless other
> drivers have the same issue.

I reckon there's nothing wrong with calling xdp_set_features_flag()
before registration, I didn't do much research, but
netif_set_real_num_*x_queues() come to mind, and they can be called
at any time. The stack should act accordingly.

Many drivers may need to work around an issue which can be handled
centrally.

Let's see if Lorenzo disagrees.

> >https://patchwork.kernel.org/project/netdevbpf/patch/[email-masked]/
> >  
> 
> I don't see anything wrong with your patch though.. it also looks more
> elegant, i dunno, I will let you decide, here's our patch:
> https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git/commit/?h=testing/xdp-features-fix&id=72e2266525948ba1498e6a3f2d63ea10d5ee86f5