From patchwork Mon Jul 29 20:07:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Nguyen X-Patchwork-Id: 13745658 X-Patchwork-Delegate: kuba@kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 79C2818A951; Mon, 29 Jul 2024 20:07:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722283650; cv=none; b=LJTaK9Q9VqeS/Z0ULiftvbw8KPZg2K0ggMXt85toE1EvgGpfnsnf3wBePFVxvTzv29Xr/iikcZ160HAmgZAPu11uKitiuKqSA1P6HBYvPKw9ztKVyXEyGW6Yp4abeg4eDVJzyJKSW/G18E+Bbqjh1BIi5X7+9+tEXpWWsMfAE8M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722283650; c=relaxed/simple; bh=n7ANfRKum6afoJJa4U7py2dwNaCRzE2vIh6HSC/8KQM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mb5Oo68lcMy3cx91YOh35U3qdOL5elfTY5FHp5WU4sxv5fOArhCxw9Ampu+cV0ubAKfxxRk/mYDYIV0aOgxymgbi2MCSEcfZDLa2/y7Lj6rsMaBFibTgZuuYACVml/zKtSGH0xfvcu2afMIuKwsJkAfGD9v5YERAFIk5jsa+6Fc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=WZcST0ez; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="WZcST0ez" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1722283648; x=1753819648; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=n7ANfRKum6afoJJa4U7py2dwNaCRzE2vIh6HSC/8KQM=; b=WZcST0ez25ay/ISrtO9HWUehNe0PVhjiZQk4fHLnXtBDH3HucGIzPiVy Si53FUAQOaYdd3MwpQJwunRyLovBFUjfxPAL3lun8L0Ae1jEO1iXwlL20 KGvtlalVwAGWR2YuPjYbGzFKau8wbBu/uBGRIxX4xotjgmmfoGwE85p45 GYW4eSzB1RxEbi1cdZBR16MUjFyNoHC1TQPYmCkGmPH1XDh6o9OwhnJ8W djw6Y5BAPJq4E54N4uJuQbFs4DP55myLeNEmZHw6BA5Nl+Gi3VlAMG8ay ocAGIcid1cAj3BSLW6Wm3zVzfHx77Wlt50Ti6xFQg7UudPUUgvuniRN6B w==; X-CSE-ConnectionGUID: ADYladQITbu/Vyu44ciWKQ== X-CSE-MsgGUID: 1wTPd1uuQuWweQICPjOX4g== X-IronPort-AV: E=McAfee;i="6700,10204,11148"; a="23818547" X-IronPort-AV: E=Sophos;i="6.09,246,1716274800"; d="scan'208";a="23818547" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2024 13:07:23 -0700 X-CSE-ConnectionGUID: Y+jJCG9EQCCnLXVTLp6uCQ== X-CSE-MsgGUID: vtAE8FltSqWOBBOrxmnVLg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,246,1716274800"; d="scan'208";a="54681297" Received: from anguy11-upstream.jf.intel.com ([10.166.9.133]) by orviesa007.jf.intel.com with ESMTP; 29 Jul 2024 13:07:24 -0700 From: Tony Nguyen To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@google.com, netdev@vger.kernel.org Cc: Maciej Fijalkowski , 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 , Chandan Kumar Rout Subject: [PATCH net v2 7/8] ice: add missing WRITE_ONCE when clearing ice_rx_ring::xdp_prog Date: Mon, 29 Jul 2024 13:07:13 -0700 Message-ID: <20240729200716.681496-8-anthony.l.nguyen@intel.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240729200716.681496-1-anthony.l.nguyen@intel.com> References: <20240729200716.681496-1-anthony.l.nguyen@intel.com> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Maciej Fijalkowski 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 Tested-by: Chandan Kumar Rout (A Contingent Worker at Intel) Signed-off-by: Maciej Fijalkowski Signed-off-by: Tony Nguyen --- 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 0f91e9167427..8d25b6981269 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;