Skip to content

Commit 9c99d09

Browse files
jbrandebanguy11
authored andcommitted
ice: use modern kernel API for kick
The kernel gained a new interface for drivers to use to combine tail bump (doorbell) and BQL updates, attempt to use those new interfaces. Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Gurucharan G <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 21c6e36 commit 9c99d09

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,6 +1576,7 @@ ice_tx_map(struct ice_tx_ring *tx_ring, struct ice_tx_buf *first,
15761576
struct sk_buff *skb;
15771577
skb_frag_t *frag;
15781578
dma_addr_t dma;
1579+
bool kick;
15791580

15801581
td_tag = off->td_l2tag1;
15811582
td_cmd = off->td_cmd;
@@ -1657,9 +1658,6 @@ ice_tx_map(struct ice_tx_ring *tx_ring, struct ice_tx_buf *first,
16571658
tx_buf = &tx_ring->tx_buf[i];
16581659
}
16591660

1660-
/* record bytecount for BQL */
1661-
netdev_tx_sent_queue(txring_txq(tx_ring), first->bytecount);
1662-
16631661
/* record SW timestamp if HW timestamp is not available */
16641662
skb_tx_timestamp(first->skb);
16651663

@@ -1688,7 +1686,10 @@ ice_tx_map(struct ice_tx_ring *tx_ring, struct ice_tx_buf *first,
16881686
ice_maybe_stop_tx(tx_ring, DESC_NEEDED);
16891687

16901688
/* notify HW of packet */
1691-
if (netif_xmit_stopped(txring_txq(tx_ring)) || !netdev_xmit_more())
1689+
kick = __netdev_tx_sent_queue(txring_txq(tx_ring), first->bytecount,
1690+
netdev_xmit_more());
1691+
if (kick)
1692+
/* notify HW of packet */
16921693
writel(i, tx_ring->tail);
16931694

16941695
return;

0 commit comments

Comments
 (0)