BPF List
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	edumazet@google.com, netdev@vger.kernel.org
Cc: Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
	anthony.l.nguyen@intel.com, magnus.karlsson@intel.com,
	aleksander.lobakin@intel.com, ast@kernel.org,
	daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com,
	bpf@vger.kernel.org, Shannon Nelson <shannon.nelson@amd.com>,
	Chandan Kumar Rout <chandanx.rout@intel.com>
Subject: [PATCH net 7/8] ice: add missing WRITE_ONCE when clearing ice_rx_ring::xdp_prog
Date: Mon,  8 Jul 2024 15:14:13 -0700	[thread overview]
Message-ID: <20240708221416.625850-8-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20240708221416.625850-1-anthony.l.nguyen@intel.com>

From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>

It is read by data path and modified from process context on remote cpu
so it is needed to use WRITE_ONCE to clear the pointer.

Fixes: efc2214b6047 ("ice: Add support for XDP")
Reviewed-by: Shannon Nelson <shannon.nelson@amd.com>
Tested-by: Chandan Kumar Rout <chandanx.rout@intel.com> (A Contingent Worker at Intel)
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_txrx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c b/drivers/net/ethernet/intel/ice/ice_txrx.c
index f4b2b1bca234..4c115531beba 100644
--- a/drivers/net/ethernet/intel/ice/ice_txrx.c
+++ b/drivers/net/ethernet/intel/ice/ice_txrx.c
@@ -456,7 +456,7 @@ void ice_free_rx_ring(struct ice_rx_ring *rx_ring)
 	if (rx_ring->vsi->type == ICE_VSI_PF)
 		if (xdp_rxq_info_is_reg(&rx_ring->xdp_rxq))
 			xdp_rxq_info_unreg(&rx_ring->xdp_rxq);
-	rx_ring->xdp_prog = NULL;
+	WRITE_ONCE(rx_ring->xdp_prog, NULL);
 	if (rx_ring->xsk_pool) {
 		kfree(rx_ring->xdp_buf);
 		rx_ring->xdp_buf = NULL;
-- 
2.41.0


  parent reply	other threads:[~2024-07-08 22:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-08 22:14 [PATCH net 0/8][pull request] ice: fix AF_XDP ZC timeout and concurrency issues Tony Nguyen
2024-07-08 22:14 ` [PATCH net 1/8] ice: respect netif readiness in AF_XDP ZC related ndo's Tony Nguyen
2024-07-08 22:14 ` [PATCH net 2/8] ice: don't busy wait for Rx queue disable in ice_qp_dis() Tony Nguyen
2024-07-08 22:14 ` [PATCH net 3/8] ice: replace synchronize_rcu with synchronize_net Tony Nguyen
2024-07-08 22:14 ` [PATCH net 4/8] ice: modify error handling when setting XSK pool in ndo_bpf Tony Nguyen
2024-07-08 22:14 ` [PATCH net 5/8] ice: toggle netif_carrier when setting up XSK pool Tony Nguyen
2024-07-08 22:14 ` [PATCH net 6/8] ice: improve updating ice_{t, r}x_ring::xsk_pool Tony Nguyen
2024-07-10  1:45   ` Jakub Kicinski
2024-07-23 23:46     ` Maciej Fijalkowski
2024-07-24 14:57       ` Jakub Kicinski
2024-07-24 15:49         ` Maciej Fijalkowski
2024-07-25 13:38           ` Jakub Kicinski
2024-07-25 18:31             ` Maciej Fijalkowski
2024-07-25 23:07               ` Jakub Kicinski
2024-07-26 13:43                 ` Maciej Fijalkowski
2024-07-26 14:37                   ` Jakub Kicinski
2024-07-08 22:14 ` Tony Nguyen [this message]
2024-07-08 22:14 ` [PATCH net 8/8] ice: xsk: fix txq interrupt mapping Tony Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240708221416.625850-8-anthony.l.nguyen@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=aleksander.lobakin@intel.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=chandanx.rout@intel.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shannon.nelson@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox