]> git.baikalelectronics.ru Git - kernel.git/commit
tunnels: Optimize tx path
authorEric Dumazet <eric.dumazet@gmail.com>
Mon, 5 Oct 2009 07:11:22 +0000 (00:11 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Oct 2009 07:21:57 +0000 (00:21 -0700)
commit0d1b6a587a7ccf05d566429799428b9ae4ec7ba5
treed52ccb4758fd58cbf74c7a9001e6885275d3ddc8
parentbc200de371982a6c0e346dcc978c82fb119379b4
tunnels: Optimize tx path

We currently dirty a cache line to update tunnel device stats
(tx_packets/tx_bytes). We better use the txq->tx_bytes/tx_packets
counters that already are present in cpu cache, in the cache
line shared with txq->_xmit_lock

This patch extends IPTUNNEL_XMIT() macro to use txq pointer
provided by the caller.

Also &tunnel->dev->stats can be replaced by &dev->stats

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ipip.h
net/ipv4/ip_gre.c
net/ipv4/ipip.c
net/ipv6/sit.c