From patchwork Tue Mar 18 03:07:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Faizal Rahim X-Patchwork-Id: 14020210 X-Patchwork-Delegate: kuba@kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (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 A10CE1990CD; Tue, 18 Mar 2025 03:08:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742267337; cv=none; b=uwMvhL3BeJz6vgm3MSD40TLAx4VgTfSt/DXLLqV3UO64+drEC36mEoPaxq0NwrLGpAHg57jZ8ilW1k2HYkgE5LW5gJXscWp6ZY3YEROJF5PuuEmXZBtWBQpuku/oPiG7PKjyO0qDQaXaK77mTbnfrsiaOIVyYwSSqEfFGDmOby8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742267337; c=relaxed/simple; bh=AWpN+xiHkAhuQT/Giv0YAd9A+nXM81GdPln2EKw69PM=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RLzGncdLgd7MeiTIyEQFD8IeND6OFtrbPkwvR5OLTv7+aHylJ1Icb/AoLjRmC8yy0H3WDAbahC/ajmxpxnmb/JbqLpg9DswGp1grMdGt4qZDUFgiCIeFUJ7+ONPMH+QZI5F+S+eElhwR34HLe9m63IELiec59kRNRXZF9DvUg4c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=PqPtPlGM; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="PqPtPlGM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1742267335; x=1773803335; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=AWpN+xiHkAhuQT/Giv0YAd9A+nXM81GdPln2EKw69PM=; b=PqPtPlGMGJYMtgyGB33UbpJ8ujkPfgTuXH6LnKXjhTKnfpz6cfFpHZqU rVtzEjtRhG8DL4l0bhA5G/2d8wWvkPBbiBmOpTKjsAT4oEX2LgJlghRw2 1hwaK+k7d9bGIc2jAPlmxpxc8/aGsX2sonxIW0WDY6uZbFyIq4tAsCSiD el8yMXAfdkcurue8r4RLJWSCHWO5mpBgGlwKnlq0HbVD9rvHr9pyNIL1g bZH3VT2HxiH3qy67t6+KgmhnmxcCLhLV493XGvpnqzHtR0Elsm7/u8Cg5 J6+xnyJRuB4XDv+fNXYkxVJLsVMYIWY7RVq0YNURUzgnSbmPsnZ2PHPFX Q==; X-CSE-ConnectionGUID: 4bHKA6CST2Gm73iB8DG7Fw== X-CSE-MsgGUID: +3Zbxn0uTSSsNawoDJz3xw== X-IronPort-AV: E=McAfee;i="6700,10204,11376"; a="54382949" X-IronPort-AV: E=Sophos;i="6.14,255,1736841600"; d="scan'208";a="54382949" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2025 20:08:54 -0700 X-CSE-ConnectionGUID: rAy/euR8RPWl7XtzUuAgVw== X-CSE-MsgGUID: cjeo7cnwTzSqJBBQqBbJnA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.14,255,1736841600"; d="scan'208";a="126313797" Received: from mohdfai2-ilbpg12-1.png.intel.com ([10.88.227.73]) by fmviesa003.fm.intel.com with ESMTP; 17 Mar 2025 20:08:47 -0700 From: Faizal Rahim To: Tony Nguyen , Przemek Kitszel , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexandre Torgue , Simon Horman , Vladimir Oltean , Russell King , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Furong Xu <0x1207@gmail.com>, Choong Yong Liang , Russell King , Hariprasad Kelam , Xiaolei Wang , Suraj Jaiswal , Kory Maincent , Gal Pressman , Jesper Nilsson , linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-stm32@st-md-mailman.stormreply.com, Chwee-Lin Choong , Vinicius Costa Gomes , Faizal Rahim , Kunihiko Hayashi , Serge Semin Subject: [PATCH iwl-next v10 04/14] igc: rename xdp_get_tx_ring() for non-xdp usage Date: Mon, 17 Mar 2025 23:07:32 -0400 Message-Id: <20250318030742.2567080-5-faizal.abdul.rahim@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250318030742.2567080-1-faizal.abdul.rahim@linux.intel.com> References: <20250318030742.2567080-1-faizal.abdul.rahim@linux.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 Renamed xdp_get_tx_ring() function to a more generic name for use in upcoming frame preemption patches. Signed-off-by: Faizal Rahim --- drivers/net/ethernet/intel/igc/igc.h | 2 +- drivers/net/ethernet/intel/igc/igc_main.c | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h index cd1d7b6c1782..ba7c55d2dc85 100644 --- a/drivers/net/ethernet/intel/igc/igc.h +++ b/drivers/net/ethernet/intel/igc/igc.h @@ -737,7 +737,7 @@ struct igc_nfc_rule *igc_get_nfc_rule(struct igc_adapter *adapter, u32 location); int igc_add_nfc_rule(struct igc_adapter *adapter, struct igc_nfc_rule *rule); void igc_del_nfc_rule(struct igc_adapter *adapter, struct igc_nfc_rule *rule); - +struct igc_ring *igc_get_tx_ring(struct igc_adapter *adapter, int cpu); void igc_ptp_init(struct igc_adapter *adapter); void igc_ptp_reset(struct igc_adapter *adapter); void igc_ptp_suspend(struct igc_adapter *adapter); diff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c index 472f009630c9..99123eef610b 100644 --- a/drivers/net/ethernet/intel/igc/igc_main.c +++ b/drivers/net/ethernet/intel/igc/igc_main.c @@ -2464,8 +2464,7 @@ static int igc_xdp_init_tx_descriptor(struct igc_ring *ring, return -ENOMEM; } -static struct igc_ring *igc_xdp_get_tx_ring(struct igc_adapter *adapter, - int cpu) +struct igc_ring *igc_get_tx_ring(struct igc_adapter *adapter, int cpu) { int index = cpu; @@ -2489,7 +2488,7 @@ static int igc_xdp_xmit_back(struct igc_adapter *adapter, struct xdp_buff *xdp) if (unlikely(!xdpf)) return -EFAULT; - ring = igc_xdp_get_tx_ring(adapter, cpu); + ring = igc_get_tx_ring(adapter, cpu); nq = txring_txq(ring); __netif_tx_lock(nq, cpu); @@ -2566,7 +2565,7 @@ static void igc_finalize_xdp(struct igc_adapter *adapter, int status) struct igc_ring *ring; if (status & IGC_XDP_TX) { - ring = igc_xdp_get_tx_ring(adapter, cpu); + ring = igc_get_tx_ring(adapter, cpu); nq = txring_txq(ring); __netif_tx_lock(nq, cpu); @@ -6779,7 +6778,7 @@ static int igc_xdp_xmit(struct net_device *dev, int num_frames, if (unlikely(flags & ~XDP_XMIT_FLAGS_MASK)) return -EINVAL; - ring = igc_xdp_get_tx_ring(adapter, cpu); + ring = igc_get_tx_ring(adapter, cpu); nq = txring_txq(ring); __netif_tx_lock(nq, cpu);