ixgbe: XDP: fix checker warning from rcu pointer
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): Y3OPUMJ3iBqmsK8P@boxer
Rout, ChandanX
Tested-by-----Original Message-----
From: [email protected] <[email protected]> On Behalf Of Fijalkowski, Maciej
Sent: 15 November 2022 18:39
To: Brandeburg, Jesse <[email protected]>
Cc: [email protected]
Subject: Re: [e1000-patches] [PATCH net-next v1] ixgbe: XDP: fix checker warning from rcu pointer
Quoted 4 lines · Jesse Brandeburg
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).
Quoted 8 lines
$ 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.
Quoted 6 lines
Also, update the "copy the pointer" logic to use
WRITE_ONCEas many/all the other drivers do.The code here was modeled after the code in i40e/i40e_xdp_setup().
Quoted 8 lines
NOTE: Compile-tested only.
CC Maciej Fijalkowski <[email protected]>Signed-off-by Jesse Brandeburg <[email protected]>--- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan