Skip to content

Commit

Permalink
net/xen-netfront: add kernel TX timestamps
Browse files Browse the repository at this point in the history
This adds kernel TX timestamps to the xen-netfront driver.  Tested with chrony
on an AWS EC2 instance.

Signed-off-by: Daniel Drown <dan-netdev@drown.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Daniel Drown authored and David S. Miller committed Jul 3, 2020
1 parent 47ff615 commit 91ffb9d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/xen-netfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,9 @@ static netdev_tx_t xennet_start_xmit(struct sk_buff *skb, struct net_device *dev
/* First request has the packet length. */
first_tx->size = skb->len;

/* timestamp packet in software */
skb_tx_timestamp(skb);

RING_PUSH_REQUESTS_AND_CHECK_NOTIFY(&queue->tx, notify);
if (notify)
notify_remote_via_irq(queue->tx_irq);
Expand Down Expand Up @@ -2411,6 +2414,7 @@ static const struct ethtool_ops xennet_ethtool_ops =
.get_sset_count = xennet_get_sset_count,
.get_ethtool_stats = xennet_get_ethtool_stats,
.get_strings = xennet_get_strings,
.get_ts_info = ethtool_op_get_ts_info,
};

#ifdef CONFIG_SYSFS
Expand Down

0 comments on commit 91ffb9d

Please sign in to comment.