From: ebiederm@xmission.com (Eric W. Biederman)
To: Ben Greear <greearb@candelatech.com>
Cc: NetDev <netdev@vger.kernel.org>,
xemul@openvz.org, Linux Containers <containers@lists.osdl.org>
Subject: Re: RFC: VETH patch to zero timestamp.
Date: Thu, 16 Jul 2009 17:01:43 -0700 [thread overview]
Message-ID: <m18wioxjmg.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <4A5F9B1D.1050505@candelatech.com> (Ben Greear's message of "Thu\, 16 Jul 2009 14\:26\:53 -0700")
Ben Greear <greearb@candelatech.com> writes:
> 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.
We reset everything else that needs to be reset. So we might as well
reset the timestamps as well. Unless there is a big performance
impact by doing so.
> 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
prev parent reply other threads:[~2009-07-17 0:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-16 21:26 RFC: VETH patch to zero timestamp Ben Greear
2009-07-17 0:01 ` Eric W. Biederman [this message]
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=m18wioxjmg.fsf@fess.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=containers@lists.osdl.org \
--cc=greearb@candelatech.com \
--cc=netdev@vger.kernel.org \
--cc=xemul@openvz.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;
as well as URLs for NNTP newsgroup(s).