All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Intel-wired-lan] [e1000-patches] [PATCH net-next v1] ixgbe: XDP: fix checker warning from rcu pointer
       [not found] ` <Y3OPUMJ3iBqmsK8P@boxer>
@ 2022-12-07  7:38   ` Rout, ChandanX
  0 siblings, 0 replies; only message in thread
From: Rout, ChandanX @ 2022-12-07  7:38 UTC (permalink / raw)
  To: intel-wired-lan



-----Original Message-----
From: e1000-patches-request@eclists.intel.com <e1000-patches-request@eclists.intel.com> On Behalf Of Fijalkowski, Maciej
Sent: 15 November 2022 18:39
To: Brandeburg, Jesse <jesse.brandeburg@intel.com>
Cc: e1000-patches@eclists.intel.com
Subject: Re: [e1000-patches] [PATCH net-next v1] ixgbe: XDP: fix checker warning from rcu pointer

On Mon, Nov 14, 2022 at 03:16:23PM -0800, Jesse Brandeburg wrote:
> The ixgbe driver uses an older style failure mode when initializing 
> the XDP program and the queues. It causes some warnings when running 
> C=2 checking builds (and it's the last one in the ethernet/intel tree).
> 
> $ make W=1 C=2 M=drivers/net/ethernet/intel modules
> .../ixgbe_main.c:10301:25: error: incompatible types in comparison expression (different address spaces):
> .../ixgbe_main.c:10301:25:    struct bpf_prog [noderef] __rcu *
> .../ixgbe_main.c:10301:25:    struct bpf_prog *
> 
> Fix the problem by removing the line that tried to restore "the old 
> prog pointer" if there was an error, to make this driver act like the 
> other drivers which return the error code without "pointer restoration."

I think we could just remove the pointer restoration as there is a high chance that driver will misbehave if setting up resources failed. It won't work correctly with old prog.

> 
> Also, update the "copy the pointer" logic to use WRITE_ONCE as 
> many/all the other drivers do.
> 
> The code here was modeled after the code in i40e/i40e_xdp_setup().
> 
> NOTE: Compile-tested only.
> 
> CC: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> ---
>  drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
> 
Tested-by: Chandan Kumar Rout <chandanx.rout@intel.com> (A Contingent Worker at Intel)
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-07  7:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20221114231623.1666767-1-jesse.brandeburg@intel.com>
     [not found] ` <Y3OPUMJ3iBqmsK8P@boxer>
2022-12-07  7:38   ` [Intel-wired-lan] [e1000-patches] [PATCH net-next v1] ixgbe: XDP: fix checker warning from rcu pointer Rout, ChandanX

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.