netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RFC:  VETH patch to zero timestamp.
@ 2009-07-16 21:26 Ben Greear
  2009-07-17  0:01 ` Eric W. Biederman
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Greear @ 2009-07-16 21:26 UTC (permalink / raw)
  To: NetDev, xemul, Eric W. Biederman

The patch below helps when using VETH and bridge(s)
This makes sure that the pkt timestamp is properly (re)calculated on
receiving the packet on the peer veth device.

I'm sure this patch is white-space damaged.  If this looks
useful, I'll generate a clean patch and send as attachment.

Signed-off-by:  Ben Greear<greearb@candelatech.com>


diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index 1097c72..e9136af 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -170,7 +173,12 @@ static int veth_xmit(struct sk_buff *skb, struct net_device *dev)

         if (skb->len > (rcv->mtu + MTU_PAD))
                 goto rx_drop;
-
+
+       /* Zero out the time-stamp so that receiving code is forced
+        * to recalculate it.
+        */
+       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


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

end of thread, other threads:[~2009-07-17  0:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-16 21:26 RFC: VETH patch to zero timestamp Ben Greear
2009-07-17  0:01 ` Eric W. Biederman

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