]> git.karo-electronics.de Git - karo-tx-linux.git/commit
tcp_metrics: Add a field tcpm_net and verify it matches on lookup
authorEric W. Biederman <ebiederm@xmission.com>
Fri, 13 Mar 2015 05:05:52 +0000 (00:05 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Mar 2015 05:57:07 +0000 (01:57 -0400)
commit849e8a0ca8d5d286510ab30b5f67b91aa6965ef6
tree995b044bc4e622efb842799e03e90185a203173c
parent3e5da62d0bcbfa86332f66cca0e3983e70557fac
tcp_metrics: Add a field tcpm_net and verify it matches on lookup

In preparation for using one tcp metrics hash table for all network
namespaces add a field tcpm_net to struct tcp_metrics_block, and
verify that field on all hash table lookups.

Make the field tcpm_net of type possible_net_t so it takes no space
when network namespaces are disabled.

Further add a function tm_net to read that field so we can be
efficient when network namespaces are disabled and concise
the rest of the time.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_metrics.c