diff options
| author | Florian Westphal <[email protected]> | 2020-03-27 21:48:50 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2020-03-30 05:14:49 +0000 |
| commit | fc518953bc9c8d7d33c6ab261995f5038f3c87f9 (patch) | |
| tree | 9c4eebd575e693916feb8d234411d08a17ec430a /net/ipv4/proc.c | |
| parent | mptcp: allow dumping subflow context to userspace (diff) | |
| download | kernel-fc518953bc9c8d7d33c6ab261995f5038f3c87f9.tar.gz kernel-fc518953bc9c8d7d33c6ab261995f5038f3c87f9.zip | |
mptcp: add and use MIB counter infrastructure
Exported via same /proc file as the Linux TCP MIB counters, so "netstat -s"
or "nstat" will show them automatically.
The MPTCP MIB counters are allocated in a distinct pcpu area in order to
avoid bloating/wasting TCP pcpu memory.
Counters are allocated once the first MPTCP socket is created in a
network namespace and free'd on exit.
If no sockets have been allocated, all-zero mptcp counters are shown.
The MIB counter list is taken from the multipath-tcp.org kernel, but
only a few counters have been picked up so far. The counter list can
be increased at any time later on.
v2 -> v3:
- remove 'inline' in foo.c files (David S. Miller)
Co-developed-by: Paolo Abeni <[email protected]>
Signed-off-by: Paolo Abeni <[email protected]>
Signed-off-by: Florian Westphal <[email protected]>
Signed-off-by: Mat Martineau <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv4/proc.c')
| -rw-r--r-- | net/ipv4/proc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c index 2580303249e2..75545a829a2b 100644 --- a/net/ipv4/proc.c +++ b/net/ipv4/proc.c @@ -32,6 +32,7 @@ #include <net/icmp.h> #include <net/protocol.h> #include <net/tcp.h> +#include <net/mptcp.h> #include <net/udp.h> #include <net/udplite.h> #include <linux/bottom_half.h> @@ -485,6 +486,7 @@ static int netstat_seq_show(struct seq_file *seq, void *v) offsetof(struct ipstats_mib, syncp))); seq_putc(seq, '\n'); + mptcp_seq_show(seq); return 0; } |
