aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/xen-netfront.c
diff options
context:
space:
mode:
authorDaniel Drown <[email protected]>2020-07-03 06:22:34 +0000
committerDavid S. Miller <[email protected]>2020-07-03 19:36:30 +0000
commit91ffb9d3823098e8efea7520ad8082a4bfaee739 (patch)
treea02734814070bc9f678d9e9fc81dbd3721ca4106 /drivers/net/xen-netfront.c
parentnet: bcmgenet: Allow changing carrier from user-space (diff)
downloadkernel-91ffb9d3823098e8efea7520ad8082a4bfaee739.tar.gz
kernel-91ffb9d3823098e8efea7520ad8082a4bfaee739.zip
net/xen-netfront: add kernel TX timestamps
This adds kernel TX timestamps to the xen-netfront driver. Tested with chrony on an AWS EC2 instance. Signed-off-by: Daniel Drown <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/xen-netfront.c')
-rw-r--r--drivers/net/xen-netfront.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 860a0cce346d..ed995df19247 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -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);
@@ -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