netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <dada1@cosmosbay.com>
To: Antoine Zen-Ruffinen <antoine.zen@gmail.com>
Cc: netdev@vger.kernel.org, linux-net@vger.kernel.org,
	netfilter-devel@vger.kernel.org, patrik.arlos@bth.se
Subject: Re: Problem with frame time stamping
Date: Tue, 13 Nov 2007 11:27:24 +0100	[thread overview]
Message-ID: <47397C0C.4060106@cosmosbay.com> (raw)
In-Reply-To: <2cbbd8de0711130207t82f2f46h9ee1b876a61bad6a@mail.gmail.com>

Antoine Zen-Ruffinen a écrit :
> What does it bring me to have a nanosecond precision if it is not
> related to the actual arrival of frame time ? As it seem I can feel
> skb->tstamp with whatever I want, I always become something else using
> ioctl(). (I'm using kernel 2.6.23).
>
>   
I guess you misunderstood kernel source, because it is related to 
arrival time, more exactly when it was processed by network stack.
(Beware  modern NICS can delay the rx interrupt by some us (ethtool -c 
eth0), so that an interrupt can feed more than one packet to the OS)

Check net/core/dev.c function netif_rx()

{
...
   if (!skb->tstamp.tv64)
       net_timestamp(skb);

}

So as soon your system as at least one socket 'asking for tsamps', 
netstamp_needed is not null, and net_timestamp() will call __net_timestamp()
wich does :

skb->tstamp = ktime_get_real();

So you should not 'feed' tstamp.tv64 and let it being 0, so that 
netif_rx() can do its job.






  reply	other threads:[~2007-11-13 10:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-12 15:42 Problem with frame time stamping Antoine Zen-Ruffinen
2007-11-12 16:47 ` Eric Dumazet
2007-11-13 10:07   ` Antoine Zen-Ruffinen
2007-11-13 10:27     ` Eric Dumazet [this message]
2007-11-13 10:39       ` Antoine Zen-Ruffinen
2007-11-13 10:43         ` Antoine Zen-Ruffinen
2007-11-13 10:55         ` Eric Dumazet
2007-11-13 12:34           ` Antoine Zen-Ruffinen
2007-11-13 13:13             ` Eric Dumazet
2007-11-13 14:46               ` Antoine Zen-Ruffinen
2007-11-13 10:36     ` Eric Dumazet

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=47397C0C.4060106@cosmosbay.com \
    --to=dada1@cosmosbay.com \
    --cc=antoine.zen@gmail.com \
    --cc=linux-net@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=patrik.arlos@bth.se \
    /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).