missed a rename file
Signed-off-by: scott <scott@ubuntu.com>
force reload of first item in hlist_nulls for each_entry_rcu
Signed-off-by: scott <scott@ubuntu.com>
snmp: add align parameter to snmp_mib_init()

In preparation for 64bit snmp counters for some mibs,
add an 'align' parameter to snmp_mib_init(), instead
of assuming mibs only contain 'unsigned long' fields.

Callers can use __alignof__(type) to provide correct
alignment.

(cherry picked from commit 214902264ff5457da4f07d8ab23967dc0cbfe451)

Change-Id: I4a9e40c5c9f25ea3bb8aaeaab149349d54d3d5dd
CC: Herbert Xu <herbert@gondor.apana.org.au>
CC: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
CC: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
CC: Vlad Yasevich <vladislav.yasevich@hp.com>

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: Jessica Gonzalez  <jgaona@codeaurora.org>
snmp: 64bit ipstats_mib for all arches

/proc/net/snmp and /proc/net/netstat expose SNMP counters.

Width of these counters is either 32 or 64 bits, depending on the size
of "unsigned long" in kernel.

This means user program parsing these files must already be prepared to
deal with 64bit values, regardless of user program being 32 or 64 bit.

This patch introduces 64bit snmp values for IPSTAT mib, where some
counters can wrap pretty fast if they are 32bit wide.

    InOctets: 244068329096
    OutOctets: 244069348848

Change-Id: I4387c4529fd49bd380330c429a87b4452be041fb
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
net: Introduce u64_stats_sync infrastructure

To properly implement 64bits network statistics on 32bit or 64bit hosts,
we provide one new type and four methods, to ease conversions.

Stats producer should use following template granted it already got an
exclusive access to counters (include/linux/u64_stats_sync.h contains
some documentation about details)

    u64_stats_update_begin(&stats->syncp);
    stats->bytes64 += len;
    stats->packets64++;
    u64_stats_update_end(&stats->syncp);

While a consumer should use following template to get consistent
snapshot :

    u64 tbytes, tpackets;
    unsigned int start;

    do {
        start = u64_stats_fetch_begin(&stats->syncp);
        tbytes = stats->bytes64;
        tpackets = stats->packets64;
    } while (u64_stats_fetch_retry(&stats->lock, syncp));

Suggested by David Miller, and comments courtesy of Nick Piggin.

(cherry picked from commit dbb6777afc9e1ae3037c68c494ae709b48b01295)

Change-Id: I8ba2977f2327470bbbdc9bfa51b5a606f9e61134
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
net: u64_stats_sync improvements

- Add a comment about interrupts:

6) If counter might be written by an interrupt, readers should block
interrupts.

- Fix a typo in sample of use.

(cherry picked from commit f842d69ef113da9977159a80ed60397b21384860)

Change-Id: If50ebe6635ec3ddc8caefdebba05b228a54c18d0
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
net: u64_stats_fetch_begin_bh() and u64_stats_fetch_retry_bh()

- Must disable preemption in case of 32bit UP in u64_stats_fetch_begin()
and u64_stats_fetch_retry()

- Add new u64_stats_fetch_begin_bh() and u64_stats_fetch_retry_bh() for
network usage, disabling BH on 32bit UP only.

(cherry picked from commit f2367f158f6d9d5c5a85dfe087305e9fe1d5ecd4)

Change-Id: If045365139198420212bc08eb28dc1f858d93a1c
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Kill off a bunch of warning: ‘inline’ is not at beginning of declaration

These warnings are spewed during a build of a 'allnoconfig' kernel
(especially the ones from u64_stats_sync.h show up a lot) when building
with -Wextra (which I often do)..
They are
  a) annoying
  b) easy to get rid of.
This patch kills them off.

include/linux/u64_stats_sync.h:70:1: warning: ‘inline’ is not at beginning of declaration
include/linux/u64_stats_sync.h:77:1: warning: ‘inline’ is not at beginning of declaration
include/linux/u64_stats_sync.h:84:1: warning: ‘inline’ is not at beginning of declaration
include/linux/u64_stats_sync.h:96:1: warning: ‘inline’ is not at beginning of declaration
include/linux/u64_stats_sync.h:115:1: warning: ‘inline’ is not at beginning of declaration
include/linux/u64_stats_sync.h:127:1: warning: ‘inline’ is not at beginning of declaration
kernel/time.c:241:1: warning: ‘inline’ is not at beginning of declaration
kernel/time.c:257:1: warning: ‘inline’ is not at beginning of declaration
kernel/perf_event.c:4513:1: warning: ‘inline’ is not at beginning of declaration
mm/page_alloc.c:4012:1: warning: ‘inline’ is not at beginning of declaration

(cherry picked from commit f17ba6ac17d204589e86b7fc3b4c765439a175ff)

Change-Id: Ic700065decac1b876fa1ed3c5609bcf5435adb22
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
re-enable ip6 again.. finally appears to be working.
Signed-off-by: scotthartbti <scott@ubuntu.com>