Skip to content

Commit 1c96c16

Browse files
jbrandebanguy11
authored andcommitted
ice: update to newer kernel API
Use the netif_tx_* API from netdevice.h which has simpler parameters. Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Gurucharan G <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 399e27d commit 1c96c16

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

drivers/net/ethernet/intel/ice/ice_txrx.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,10 @@ static bool ice_clean_tx_irq(struct ice_tx_ring *tx_ring, int napi_budget)
304304

305305
ice_update_tx_ring_stats(tx_ring, total_pkts, total_bytes);
306306

307-
netdev_tx_completed_queue(txring_txq(tx_ring), total_pkts,
308-
total_bytes);
307+
if (ice_ring_is_xdp(tx_ring))
308+
return !!budget;
309+
310+
netdev_tx_completed_queue(txring_txq(tx_ring), total_pkts, total_bytes);
309311

310312
#define TX_WAKE_THRESHOLD ((s16)(DESC_NEEDED * 2))
311313
if (unlikely(total_pkts && netif_carrier_ok(tx_ring->netdev) &&
@@ -314,11 +316,9 @@ static bool ice_clean_tx_irq(struct ice_tx_ring *tx_ring, int napi_budget)
314316
* sees the new next_to_clean.
315317
*/
316318
smp_mb();
317-
if (__netif_subqueue_stopped(tx_ring->netdev,
318-
tx_ring->q_index) &&
319+
if (netif_tx_queue_stopped(txring_txq(tx_ring)) &&
319320
!test_bit(ICE_VSI_DOWN, vsi->state)) {
320-
netif_wake_subqueue(tx_ring->netdev,
321-
tx_ring->q_index);
321+
netif_tx_wake_queue(txring_txq(tx_ring));
322322
++tx_ring->tx_stats.restart_q;
323323
}
324324
}
@@ -1517,16 +1517,16 @@ int ice_napi_poll(struct napi_struct *napi, int budget)
15171517
*/
15181518
static int __ice_maybe_stop_tx(struct ice_tx_ring *tx_ring, unsigned int size)
15191519
{
1520-
netif_stop_subqueue(tx_ring->netdev, tx_ring->q_index);
1520+
netif_tx_stop_queue(txring_txq(tx_ring));
15211521
/* Memory barrier before checking head and tail */
15221522
smp_mb();
15231523

15241524
/* Check again in a case another CPU has just made room available. */
15251525
if (likely(ICE_DESC_UNUSED(tx_ring) < size))
15261526
return -EBUSY;
15271527

1528-
/* A reprieve! - use start_subqueue because it doesn't call schedule */
1529-
netif_start_subqueue(tx_ring->netdev, tx_ring->q_index);
1528+
/* A reprieve! - use start_queue because it doesn't call schedule */
1529+
netif_tx_start_queue(txring_txq(tx_ring));
15301530
++tx_ring->tx_stats.restart_q;
15311531
return 0;
15321532
}

0 commit comments

Comments
 (0)