Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'misc-drivers-sw-timestamp-changes'

Jason Xing says:

====================
misc drivers' sw timestamp changes

This series modified three outstanding drivers among more than 100 drivers
because the software timestamp generation is too early. The idea of this
series is derived from the brief talk[1] with Willem. In conclusion, this
series makes the generation of software timestamp near/before kicking the
doorbell for drivers.

[1]: https://lore.kernel.org/all/681b9d2210879_1f6aad294bc@willemb.c.googlers.com.notmuch/

v2: https://lore.kernel.org/20250508033328.12507-1-kerneljasonxing@gmail.com
====================

Link: https://patch.msgid.link/20250510134812.48199-1-kerneljasonxing@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+8 -9
-1
drivers/net/ethernet/aquantia/atlantic/aq_main.c
··· 123 123 } 124 124 #endif 125 125 126 - skb_tx_timestamp(skb); 127 126 return aq_nic_xmit(aq_nic, skb); 128 127 } 129 128
+2
drivers/net/ethernet/aquantia/atlantic/aq_nic.c
··· 898 898 899 899 frags = aq_nic_map_skb(self, skb, ring); 900 900 901 + skb_tx_timestamp(skb); 902 + 901 903 if (likely(frags)) { 902 904 err = self->aq_hw_ops->hw_ring_tx_xmit(self->aq_hw, 903 905 ring, frags);
+3 -2
drivers/net/ethernet/chelsio/cxgb4/sge.c
··· 1533 1533 } else { 1534 1534 q = &adap->sge.ethtxq[qidx + pi->first_qset]; 1535 1535 } 1536 - skb_tx_timestamp(skb); 1537 1536 1538 1537 reclaim_completed_tx(adap, &q->q, -1, true); 1539 1538 cntrl = TXPKT_L4CSUM_DIS_F | TXPKT_IPCSUM_DIS_F; ··· 1704 1705 cpl->pack = htons(0); 1705 1706 cpl->len = htons(skb->len); 1706 1707 cpl->ctrl1 = cpu_to_be64(cntrl); 1708 + 1709 + skb_tx_timestamp(skb); 1707 1710 1708 1711 if (immediate) { 1709 1712 cxgb4_inline_tx_skb(skb, &q->q, sgl); ··· 2269 2268 2270 2269 d = &eosw_txq->desc[eosw_txq->last_pidx]; 2271 2270 skb = d->skb; 2272 - skb_tx_timestamp(skb); 2273 2271 2274 2272 wr = (struct fw_eth_tx_eo_wr *)&eohw_txq->q.desc[eohw_txq->q.pidx]; 2275 2273 if (unlikely(eosw_txq->state != CXGB4_EO_STATE_ACTIVE && ··· 2373 2373 eohw_txq->vlan_ins++; 2374 2374 2375 2375 txq_advance(&eohw_txq->q, ndesc); 2376 + skb_tx_timestamp(skb); 2376 2377 cxgb4_ring_tx_db(adap, &eohw_txq->q, ndesc); 2377 2378 eosw_txq_advance_index(&eosw_txq->last_pidx, 1, eosw_txq->ndesc); 2378 2379
+1 -1
drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c
··· 1640 1640 cxgb4_write_sgl(skb, &q->q, pos, end, 0, sgl_sdesc->addr); 1641 1641 sgl_sdesc->skb = skb; 1642 1642 chcr_txq_advance(&q->q, ndesc); 1643 + skb_tx_timestamp(skb); 1643 1644 cxgb4_ring_tx_db(tx_info->adap, &q->q, ndesc); 1644 1645 return 0; 1645 1646 } ··· 1904 1903 th = tcp_hdr(nskb); 1905 1904 skb_offset = skb_tcp_all_headers(nskb); 1906 1905 data_len = nskb->len - skb_offset; 1907 - skb_tx_timestamp(nskb); 1908 1906 1909 1907 if (chcr_ktls_tunnel_pkt(tx_info, nskb, q)) 1910 1908 goto out;
+2 -5
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
··· 4497 4497 if (priv->sarc_type) 4498 4498 stmmac_set_desc_sarc(priv, first, priv->sarc_type); 4499 4499 4500 - skb_tx_timestamp(skb); 4501 - 4502 4500 if (unlikely((skb_shinfo(skb)->tx_flags & SKBTX_HW_TSTAMP) && 4503 4501 priv->hwts_tx_en)) { 4504 4502 /* declare that device is doing timestamping */ ··· 4529 4531 } 4530 4532 4531 4533 netdev_tx_sent_queue(netdev_get_tx_queue(dev, queue), skb->len); 4534 + skb_tx_timestamp(skb); 4532 4535 4533 4536 stmmac_flush_tx_descriptors(priv, queue); 4534 4537 stmmac_tx_timer_arm(priv, queue); ··· 4773 4774 if (priv->sarc_type) 4774 4775 stmmac_set_desc_sarc(priv, first, priv->sarc_type); 4775 4776 4776 - skb_tx_timestamp(skb); 4777 - 4778 4777 /* Ready to fill the first descriptor and set the OWN bit w/o any 4779 4778 * problems because all the descriptors are actually ready to be 4780 4779 * passed to the DMA engine. ··· 4819 4822 netdev_tx_sent_queue(netdev_get_tx_queue(dev, queue), skb->len); 4820 4823 4821 4824 stmmac_enable_dma_transmission(priv, priv->ioaddr, queue); 4822 - 4825 + skb_tx_timestamp(skb); 4823 4826 stmmac_flush_tx_descriptors(priv, queue); 4824 4827 stmmac_tx_timer_arm(priv, queue); 4825 4828