]> git.baikalelectronics.ru Git - kernel.git/commit
net: timestamp cloned packet in dev_queue_xmit_nit
authorEric Dumazet <eric.dumazet@gmail.com>
Mon, 20 Dec 2010 21:22:51 +0000 (21:22 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Dec 2010 18:50:38 +0000 (10:50 -0800)
commitb8a7d93d4eff83e99a1dac16826916db7c7fe7cd
tree7da5bba73363087ade7aa031f937d08666f8e0ee
parent5558b4544b1646c51aa7f84c09d33ac3ae0044f0
net: timestamp cloned packet in dev_queue_xmit_nit

Le vendredi 17 décembre 2010 à 10:26 +0100, Eric Dumazet a écrit :

>
> I think we can add this after latest Changli patch :
>
> He does one skb_clone() before calling the sniffers.
> We could set timestamp on this clone, instead of original skb.
>
> Problem solved.
>

[PATCH net-next-2.6] net: timestamp cloned packet in dev_queue_xmit_nit

Now we do one clone of skb if at least one sniffer might take packet,
we also can do the skb timestamping on the clone and let original packet
unchanged.

This is a generalization of commit b42ef20cd4d7 (net: sch_netem: Fix an
inconsistency in ingress netem timestamps.)

This way, we can have a good idea when packets are delivered to our
stack (tcpdump -i ifb0), while a tcpdump on original device gives
timestamps right before ingressing.

This also speedup our stack, avoiding taking timestamps if not needed.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Changli Gao <xiaosuo@gmail.com>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Jarek Poplawski <jarkao2@gmail.com>
Acked-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c