From: Ben Greear <greearb@candelatech.com>
To: NetDev <netdev@vger.kernel.org>
Subject: PATCH: veth: Zero timestamp in xmit path.
Date: Tue, 21 Jul 2009 12:46:55 -0700 [thread overview]
Message-ID: <4A661B2F.7000608@candelatech.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 863 bytes --]
This patch zero's the timestamp before handing the packet to
the peer interface. This lets the peer recalculate the rx timestamp
if it cares about timestamps.
The patch is against net-next, compile tested there. Similar patch was
functionally tested against 2.6.31-rc3.
Signed-Off-By: Ben Greear<greearb@candelatech.com>
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index f1d753d..190f784 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -171,6 +171,7 @@ static int veth_xmit(struct sk_buff *skb, struct net_device *dev)
if (skb->len > (rcv->mtu + MTU_PAD))
goto rx_drop;
+ skb->tstamp.tv64 = 0;
skb->pkt_type = PACKET_HOST;
skb->protocol = eth_type_trans(skb, rcv);
if (dev->features & NETIF_F_NO_CSUM)
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
[-- Attachment #2: veth_ts.patch --]
[-- Type: text/plain, Size: 422 bytes --]
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index f1d753d..190f784 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -171,6 +171,7 @@ static int veth_xmit(struct sk_buff *skb, struct net_device *dev)
if (skb->len > (rcv->mtu + MTU_PAD))
goto rx_drop;
+ skb->tstamp.tv64 = 0;
skb->pkt_type = PACKET_HOST;
skb->protocol = eth_type_trans(skb, rcv);
if (dev->features & NETIF_F_NO_CSUM)
next reply other threads:[~2009-07-21 19:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-21 19:46 Ben Greear [this message]
2009-07-21 19:51 ` PATCH: veth: Zero timestamp in xmit path David Miller
2009-07-21 20:02 ` Ben Greear
2009-07-21 20:05 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A661B2F.7000608@candelatech.com \
--to=greearb@candelatech.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox