Thread (41 messages) flat view 41 messages, 6 authors, 2013-04-22

Re: [RFC] net : add tx timestamp to packet mmap.

From: Paul Chavent <hidden>
Date: 2012-12-14 07:59:59


On 12/13/2012 07:17 PM, Richard Cochran wrote:
On Thu, Dec 13, 2012 at 05:13:56PM +0100, Paul Chavent wrote:
quoted
quoted
In order for time stamps to appear, somebody has to call
skb_tx_timestamp() ...
Yes. "Somebody" means "the hardware driver" after completing xmit.
That's true ?
Yes, the MAC driver must call this helper function, but not many
drivers do this yet. You didn't say which MAC driver you are using and
whether it supports Tx SO_TIMESTAMPING or not.
I'm using the uml net device (which recently gains tx timestamping), 
e1000e (wich seems to support it according to my tests), and arm macb 
(wich seems to support it too).

quoted
Yes, it only sets some flags. I thought that those flags was
required by the skb_tx_timestamp() in order to make the appropriate
timestamping (hardware, software, etc).

So in order to have tx timestamp that work, both calls are needed ?
Yes.
quoted
Why sock_tx_timestamp is called in packet_fill_skb and
packet_sendmsg_spkt and not in tpacket_fill_skb ?
Why i can retrieve timestamps when i add this call ?
Sorry, I don't know much about packet mmap. Last time I tried it, some
years ago, it wasn't really working.
I haven't measured the performance, but it works for me (however, not on 
my arm platfrom yet).
Richard
The af_packet implementation contains 3 "paths" for packets. Perhaps i'm 
a bit confused by its complexity.

Paul.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help