Commit 8caf1539 authored by Committed by David S. Miller
net: sch_netem: Fix an inconsistency in ingress netem timestamps.
Alex Sidorenko reported: "while experimenting with 'netem' we have found some strange behaviour. It seemed that ingress delay as measured by 'ping' command shows up on some hosts but not on others. After some investigation I have found that the problem is that skbuff->tstamp field value depends on whether there are any packet sniffers enabled. That is: - if any ptype_all handler is registered, the tstamp field is as expected - if there are no ptype_all handlers, the tstamp field does not show the delay" This patch prevents unnecessary update of tstamp in dev_queue_xmit_nit() on ingress path (with act_mirred) adding a check, so minimal overhead on the fast path, but only when sniffers etc. are active. Since netem at ingress seems to logically emulate a network before a host, tstamp is zeroed to trigger the update and pretend delays are from the outside. Reported-by: Alex Sidorenko <firstname.lastname@example.org> Tested-by: Alex Sidorenko <email@example.com> Signed-off-by: Jarek Poplawski <firstname.lastname@example.org> Signed-off-by: David S. Miller <email@example.com>
Showing with 13 additions and 0 deletions