* skb->timestamp == 0.000000 ?
@ 2011-11-19 21:13 Felipe Dias
2011-11-21 21:11 ` Benjamin Poirier
0 siblings, 1 reply; 4+ messages in thread
From: Felipe Dias @ 2011-11-19 21:13 UTC (permalink / raw)
To: netdev
Hi..
Please let me know if this isnt right list to this kind of question.
I'm registering a new protocol handler with dev_add_pack. I would like
to know only the difference between timestamp on skb->tstamp and the
time of reception by my module.
So I do:
----
struct timeval time_skb, time_module;
do_gettimeofday(&time_module):
skb_get_timestamp(skb, &time_skb);
---
And time_skb.tv_sec and time_skb.tv_usec are equal to 0;
I'm doing some wrong ?
Best regards,
Felipe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: skb->timestamp == 0.000000 ?
2011-11-19 21:13 skb->timestamp == 0.000000 ? Felipe Dias
@ 2011-11-21 21:11 ` Benjamin Poirier
2011-11-22 14:04 ` Felipe Dias
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Poirier @ 2011-11-21 21:11 UTC (permalink / raw)
To: Felipe Dias; +Cc: netdev
On 11/11/19 18:13, Felipe Dias wrote:
> Hi..
>
> Please let me know if this isnt right list to this kind of question.
>
> I'm registering a new protocol handler with dev_add_pack. I would like
> to know only the difference between timestamp on skb->tstamp and the
> time of reception by my module.
>
> So I do:
> ----
> struct timeval time_skb, time_module;
> do_gettimeofday(&time_module):
> skb_get_timestamp(skb, &time_skb);
> ---
>
> And time_skb.tv_sec and time_skb.tv_usec are equal to 0;
>
> I'm doing some wrong ?
Timestamps have to be enabled
have a look at:
net_enable_timestamp()
-Ben
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: skb->timestamp == 0.000000 ?
2011-11-21 21:11 ` Benjamin Poirier
@ 2011-11-22 14:04 ` Felipe Dias
2011-11-22 14:10 ` Eric Dumazet
0 siblings, 1 reply; 4+ messages in thread
From: Felipe Dias @ 2011-11-22 14:04 UTC (permalink / raw)
To: Benjamin Poirier; +Cc: netdev
On Mon, Nov 21, 2011 at 6:11 PM, Benjamin Poirier
<benjamin.poirier@gmail.com> wrote:
> On 11/11/19 18:13, Felipe Dias wrote:
>> And time_skb.tv_sec and time_skb.tv_usec are equal to 0;
>>
>> I'm doing some wrong ?
>
> Timestamps have to be enabled
> have a look at:
> net_enable_timestamp()
>
who is responsible for enabling? Would not it be the driver?
Some packets (icmp) appear timestamp other packages do not appear.
I'm confused, in my mind, after the registration of the "protocol
handler" (with dev_add_pack) any skb should have the timestamp.
Sorry, but I'm confused.
Best regards,
Felipe.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: skb->timestamp == 0.000000 ?
2011-11-22 14:04 ` Felipe Dias
@ 2011-11-22 14:10 ` Eric Dumazet
0 siblings, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2011-11-22 14:10 UTC (permalink / raw)
To: Felipe Dias; +Cc: Benjamin Poirier, netdev
Le mardi 22 novembre 2011 à 11:04 -0300, Felipe Dias a écrit :
> who is responsible for enabling? Would not it be the driver?
>
> Some packets (icmp) appear timestamp other packages do not appear.
>
> I'm confused, in my mind, after the registration of the "protocol
> handler" (with dev_add_pack) any skb should have the timestamp.
>
This is not the trigger for timestamps.
You need to call setsockopt(SO_TIMESTAMP or SO_TIMESTAMPNS) on at least
one socket.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-11-22 14:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-19 21:13 skb->timestamp == 0.000000 ? Felipe Dias
2011-11-21 21:11 ` Benjamin Poirier
2011-11-22 14:04 ` Felipe Dias
2011-11-22 14:10 ` Eric Dumazet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox