mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 18:21:24 +02:00
net: cxgb4: generate software timestamp just before the doorbell
Make sure the call of skb_tx_timestamp is as close as possible to the doorbell. Signed-off-by: Jason Xing <kernelxing@tencent.com> Link: https://patch.msgid.link/20250510134812.48199-3-kerneljasonxing@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
285ad74775
commit
aaed2789b3
|
|
@ -1533,7 +1533,6 @@ static netdev_tx_t cxgb4_eth_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
} else {
|
||||
q = &adap->sge.ethtxq[qidx + pi->first_qset];
|
||||
}
|
||||
skb_tx_timestamp(skb);
|
||||
|
||||
reclaim_completed_tx(adap, &q->q, -1, true);
|
||||
cntrl = TXPKT_L4CSUM_DIS_F | TXPKT_IPCSUM_DIS_F;
|
||||
|
|
@ -1706,6 +1705,8 @@ static netdev_tx_t cxgb4_eth_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
cpl->len = htons(skb->len);
|
||||
cpl->ctrl1 = cpu_to_be64(cntrl);
|
||||
|
||||
skb_tx_timestamp(skb);
|
||||
|
||||
if (immediate) {
|
||||
cxgb4_inline_tx_skb(skb, &q->q, sgl);
|
||||
dev_consume_skb_any(skb);
|
||||
|
|
@ -2268,7 +2269,6 @@ static int ethofld_hard_xmit(struct net_device *dev,
|
|||
|
||||
d = &eosw_txq->desc[eosw_txq->last_pidx];
|
||||
skb = d->skb;
|
||||
skb_tx_timestamp(skb);
|
||||
|
||||
wr = (struct fw_eth_tx_eo_wr *)&eohw_txq->q.desc[eohw_txq->q.pidx];
|
||||
if (unlikely(eosw_txq->state != CXGB4_EO_STATE_ACTIVE &&
|
||||
|
|
@ -2373,6 +2373,7 @@ static int ethofld_hard_xmit(struct net_device *dev,
|
|||
eohw_txq->vlan_ins++;
|
||||
|
||||
txq_advance(&eohw_txq->q, ndesc);
|
||||
skb_tx_timestamp(skb);
|
||||
cxgb4_ring_tx_db(adap, &eohw_txq->q, ndesc);
|
||||
eosw_txq_advance_index(&eosw_txq->last_pidx, 1, eosw_txq->ndesc);
|
||||
|
||||
|
|
|
|||
|
|
@ -1640,6 +1640,7 @@ static int chcr_ktls_tunnel_pkt(struct chcr_ktls_info *tx_info,
|
|||
cxgb4_write_sgl(skb, &q->q, pos, end, 0, sgl_sdesc->addr);
|
||||
sgl_sdesc->skb = skb;
|
||||
chcr_txq_advance(&q->q, ndesc);
|
||||
skb_tx_timestamp(skb);
|
||||
cxgb4_ring_tx_db(tx_info->adap, &q->q, ndesc);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1903,7 +1904,6 @@ static int chcr_ktls_sw_fallback(struct sk_buff *skb,
|
|||
th = tcp_hdr(nskb);
|
||||
skb_offset = skb_tcp_all_headers(nskb);
|
||||
data_len = nskb->len - skb_offset;
|
||||
skb_tx_timestamp(nskb);
|
||||
|
||||
if (chcr_ktls_tunnel_pkt(tx_info, nskb, q))
|
||||
goto out;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user