netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net/xen-netfront: add kernel TX timestamps
@ 2020-07-03  6:22 Daniel Drown
  2020-07-03 19:36 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Drown @ 2020-07-03  6:22 UTC (permalink / raw)
  To: netdev

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>
---
 drivers/net/xen-netfront.c | 4 ++++
 1 file changed, 4 insertions(+)

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
-- 
2.21.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net/xen-netfront: add kernel TX timestamps
  2020-07-03  6:22 [PATCH net-next] net/xen-netfront: add kernel TX timestamps Daniel Drown
@ 2020-07-03 19:36 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-07-03 19:36 UTC (permalink / raw)
  To: dan-netdev; +Cc: netdev

From: Daniel Drown <dan-netdev@drown.org>
Date: Fri, 3 Jul 2020 01:22:34 -0500

> 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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-03 19:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-03  6:22 [PATCH net-next] net/xen-netfront: add kernel TX timestamps Daniel Drown
2020-07-03 19:36 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).