lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 13 Nov 2007 11:55:35 +0100
From:	Eric Dumazet <dada1@...mosbay.com>
To:	Antoine Zen-Ruffinen <antoine.zen@...il.com>
Cc:	netdev@...r.kernel.org, linux-net@...r.kernel.org,
	netfilter-devel@...r.kernel.org, patrik.arlos@....se
Subject: Re: Problem with frame time stamping

Antoine Zen-Ruffinen a écrit :
> This is exactly my problem : The driver of the network card I am using
> (see rt2x00.serialmonkey.com) do the minimum in the hardware interrupt
> (not filling skb->tstamp). Then netif_rx() is called later using a
> tasklet (also not filling skb->tstamp). As it seem to me (maybe I am
> wrong, if so please tell), the elapse time between the actual frame
> arrival and the time where netif_rx() do net_timestamp(skb) is not
> predicable !?
>
> Else, I would like to thank you to spend time helping me.
>
>
>   
A tasklet could process the skb much later than corresponding IRQ, 
depending on various things
(other tasks/softirqs on system with higher priorities). So yes, it is 
not predictable at all.

Usually it doesnt matter, but if your business depends on precise tstamps,
then just do skb->tstamp = ktime_get_real(); in IRQ handler (but it will 
slow it a bit,
depending on how fast is ktime_get_real() on the target machine)
netif_rx() wont overwrite it.

skb = dev_alloc_skb(desc.size + NET_IP_ALIGN);
if (!skb)
    return;
skb->tstamp = ktime_get_real(); /* do it before other copies */
skb_reserve(skb, NET_IP_ALIGN);
skb_put(skb, desc.size);
memcpy(skb->data, entry->data_addr, desc.size);

...





-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ