diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-09-27 03:57:11 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-27 21:30:43 -0700 |
commit | e985aad723d7709e6bee566bacb100d33d9b791b (patch) | |
tree | 9b90751911cd8923dd2469d4f52a5628c0f4cc0c /net/ipv4/ipip.c | |
parent | 290b895e0ba4552dfcfc4bd35759c192345b934a (diff) | |
download | linux-e985aad723d7709e6bee566bacb100d33d9b791b.tar.gz linux-e985aad723d7709e6bee566bacb100d33d9b791b.tar.bz2 linux-e985aad723d7709e6bee566bacb100d33d9b791b.zip |
ip_gre: percpu stats accounting
Le lundi 27 septembre 2010 à 14:29 +0100, Ben Hutchings a écrit :
> > diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
> > index 5d6ddcb..de39b22 100644
> > --- a/net/ipv4/ip_gre.c
> > +++ b/net/ipv4/ip_gre.c
> [...]
> > @@ -377,7 +405,7 @@ static struct ip_tunnel *ipgre_tunnel_locate(struct net *net,
> > if (parms->name[0])
> > strlcpy(name, parms->name, IFNAMSIZ);
> > else
> > - sprintf(name, "gre%%d");
> > + strcpy(name, "gre%d");
> >
> > dev = alloc_netdev(sizeof(*t), name, ipgre_tunnel_setup);
> > if (!dev)
> [...]
>
> This is a valid fix, but doesn't belong in this patch!
>
Sorry ? It was not a fix, but at most a cleanup ;)
Anyway I forgot the gretap case...
[PATCH 2/4 v2] ip_gre: percpu stats accounting
Maintain per_cpu tx_bytes, tx_packets, rx_bytes, rx_packets.
Other seldom used fields are kept in netdev->stats structure, possibly
unsafe.
This is a preliminary work to support lockless transmit path, and
correct RX stats, that are already unsafe.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ipip.c')
0 files changed, 0 insertions, 0 deletions