Re: [PATCH iwl-next v6 2/9] igc: Rename xdp_get_tx_ring() for non-xdp usage

From
Przemek Kitszel <przemyslaw.kitszel@intel.com>
Date
2025-02-28 09:58:18
Also in
bpf, intel-wired-lan, lkml, netdev
Reply to
Faizal Rahim, 2025-02-27
On 2/27/25 15:01, Faizal Rahim wrote:
quoted hunk ↗ jump to hunk
Renamed xdp_get_tx_ring() function to a more generic name for use in
upcoming frame preemption patches.

Signed-off-by: Faizal Rahim <redacted>
---
  drivers/net/ethernet/intel/igc/igc.h      |  2 +-
  drivers/net/ethernet/intel/igc/igc_main.c | 10 +++++-----
  2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/intel/igc/igc.h b/drivers/net/ethernet/intel/igc/igc.h
index b8111ad9a9a8..22ecdac26cf4 100644
--- a/drivers/net/ethernet/intel/igc/igc.h
+++ b/drivers/net/ethernet/intel/igc/igc.h
@@ -736,7 +736,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 56a35d58e7a6..44e4f925491f 100644
--- a/drivers/net/ethernet/intel/igc/igc_main.c
+++ b/drivers/net/ethernet/intel/igc/igc_main.c
@@ -2444,8 +2444,8 @@ 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)
nit: you could squash the cpu param to the prev line while touching it
quoted hunk ↗ jump to hunk
  {
  	int index = cpu;
  
@@ -2469,7 +2469,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);
@@ -2546,7 +2546,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);
@@ -6699,7 +6699,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);
  
Thread (12 messages) 12 messages, 2 authors, last reply 2025-02-28
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help