From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>
Subject: [PATCH net-next-2.6 0/4] tunnels: SMP safe accounting
Date: Mon, 27 Sep 2010 12:32:48 +0200 [thread overview]
Message-ID: <1285583568.23938.81.camel@edumazet-laptop> (raw)
Before making ip_gre, ipip, and sit transmit path lockless, it is
necessary to make accounting SMP safe, not only for correctness but to
avoid cache line ping pongs.
This also takes care of receive path, already lockless and using unsafe
stats accounting.
I chose to use small percpu structures, holding {rx|tx}_{packets|bytes}
only, and keep all other counters in netdev->stats, since they should be
seldom used.
Patch 1/4 makes the needed changes in include files
Patch 2/4 takes care of ip_gre
Patch 3/4 takes care of ipip
Patch 4/4 takes care of sit
Thanks
include/linux/netdevice.h | 1
include/net/dst.h | 24 ++++--
include/net/ipip.h | 12 +--
net/ipv4/ip_gre.c | 138 +++++++++++++++++++++++++-----------
net/ipv4/ipip.c | 127 ++++++++++++++++++++++++---------
net/ipv6/sit.c | 80 ++++++++++++++++----
6 files changed, 282 insertions(+), 100 deletions(-)
next reply other threads:[~2010-09-27 10:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-27 10:32 Eric Dumazet [this message]
2010-09-28 4:51 ` [PATCH net-next-2.6 0/4] tunnels: SMP safe accounting David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1285583568.23938.81.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox