Commit 70c93603 authored by David Arinzon's avatar David Arinzon Committed by Paolo Abeni

net: ena: Relocate skb_tx_timestamp() to improve time stamping accuracy

Move skb_tx_timestamp() closer to the actual time the driver sends the
packets to the device.
Signed-off-by: default avatarOsama Abboud <osamaabb@amazon.com>
Signed-off-by: default avatarDavid Arinzon <darinzon@amazon.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 071271f3
......@@ -2614,8 +2614,6 @@ static netdev_tx_t ena_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (unlikely(rc))
goto error_drop_packet;
skb_tx_timestamp(skb);
next_to_use = tx_ring->next_to_use;
req_id = tx_ring->free_ids[next_to_use];
tx_info = &tx_ring->tx_buffer_info[req_id];
......@@ -2679,6 +2677,8 @@ static netdev_tx_t ena_start_xmit(struct sk_buff *skb, struct net_device *dev)
}
}
skb_tx_timestamp(skb);
if (netif_xmit_stopped(txq) || !netdev_xmit_more())
/* trigger the dma engine. ena_ring_tx_doorbell()
* calls a memory barrier inside it.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment