]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: atlantic: generate software timestamp just before the doorbell
authorJason Xing <kernelxing@tencent.com>
Sat, 10 May 2025 13:48:10 +0000 (21:48 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:05:31 +0000 (11:05 +0100)
[ Upstream commit 285ad7477559b6b5ceed10ba7ecfed9d17c0e7c6 ]

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-2-kerneljasonxing@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/aquantia/atlantic/aq_main.c
drivers/net/ethernet/aquantia/atlantic/aq_nic.c

index 45ed097bfe49a1db9a8d5a2278da000664aad268..026e628664a9dd45e2b98ee07a0959a7186f61b8 100644 (file)
@@ -117,7 +117,6 @@ static netdev_tx_t aq_ndev_start_xmit(struct sk_buff *skb, struct net_device *nd
        }
 #endif
 
-       skb_tx_timestamp(skb);
        return aq_nic_xmit(aq_nic, skb);
 }
 
index 25349a2ae5cfe3b01e622c5a4d3190b9aba022b9..2afa61e9bf8c6e22348bc7cf6f3af831f8f04714 100644 (file)
@@ -751,6 +751,8 @@ int aq_nic_xmit(struct aq_nic_s *self, struct sk_buff *skb)
 
        frags = aq_nic_map_skb(self, skb, ring);
 
+       skb_tx_timestamp(skb);
+
        if (likely(frags)) {
                err = self->aq_hw_ops->hw_ring_tx_xmit(self->aq_hw,
                                                       ring, frags);