[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20170311202753.GA26476@u480fcf44e5b8574c5490.ant.amazon.com>
Date: Sat, 11 Mar 2017 20:28:03 +0000
From: Ezequiel Lara Gomez <ezegomez@...zon.com>
To: netdev@...r.kernel.org
Subject: [PATCH] Enable tx timestamping on loopback and dummy
This enables testing of SO_TIMESTAMPING options by targetting localhost
addresses.
Tested on qemu using txtimestamping.c from the kernel selftests.
---
drivers/net/dummy.c | 1 +
drivers/net/loopback.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c
index 2c80611..32fdc00 100644
--- a/drivers/net/dummy.c
+++ b/drivers/net/dummy.c
@@ -125,6 +125,7 @@ static netdev_tx_t dummy_xmit(struct sk_buff *skb, struct net_device *dev)
dstats->tx_bytes += skb->len;
u64_stats_update_end(&dstats->syncp);
+ skb_tx_timestamp(skb);
dev_kfree_skb(skb);
return NETDEV_TX_OK;
}
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c
index 122cc2d..8bcf479 100644
--- a/drivers/net/loopback.c
+++ b/drivers/net/loopback.c
@@ -74,6 +74,7 @@ static netdev_tx_t loopback_xmit(struct sk_buff *skb,
struct pcpu_lstats *lb_stats;
int len;
+ skb_tx_timestamp(skb);
skb_orphan(skb);
/* Before queueing this packet to netif_rx(),
--
1.9.1
Amazon Data Services Ireland Limited registered office: One Burlington Plaza, Burlington Road, Dublin 4, Ireland. Registered in Ireland. Registration number 390566.
Powered by blists - more mailing lists