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 <pabeni@redhat.com> Signed-off-by:
Paolo Abeni <pabeni@redhat.com> Signed-off-by:
Florian Westphal <fw@strlen.de> Signed-off-by:
Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- include/net/mptcp.h 4 additions, 0 deletionsinclude/net/mptcp.h
- include/net/netns/mib.h 3 additions, 0 deletionsinclude/net/netns/mib.h
- net/ipv4/af_inet.c 4 additions, 0 deletionsnet/ipv4/af_inet.c
- net/ipv4/proc.c 2 additions, 0 deletionsnet/ipv4/proc.c
- net/mptcp/Makefile 1 addition, 1 deletionnet/mptcp/Makefile
- net/mptcp/mib.c 69 additions, 0 deletionsnet/mptcp/mib.c
- net/mptcp/mib.h 40 additions, 0 deletionsnet/mptcp/mib.h
- net/mptcp/protocol.c 22 additions, 8 deletionsnet/mptcp/protocol.c
- net/mptcp/subflow.c 27 additions, 6 deletionsnet/mptcp/subflow.c
net/mptcp/mib.c
0 → 100644
net/mptcp/mib.h
0 → 100644
Please register or sign in to comment