mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
[NETNS][FRAGS]: Make the nqueues counter per-namespace.
This is simple - just move the variable from struct inet_frags to struct netns_frags and adjust the usage appropriately. Signed-off-by: Pavel Emelyanov <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
ac18e7509e
commit
e5a2bb842c
9 changed files with 24 additions and 12 deletions
|
|
@ -712,6 +712,7 @@ int nf_ct_frag6_init(void)
|
|||
nf_frags.qsize = sizeof(struct nf_ct_frag6_queue);
|
||||
nf_frags.match = ip6_frag_match;
|
||||
nf_frags.frag_expire = nf_ct_frag6_expire;
|
||||
inet_frags_init_net(&nf_init_frags);
|
||||
inet_frags_init(&nf_frags);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ static int sockstat6_seq_show(struct seq_file *seq, void *v)
|
|||
seq_printf(seq, "RAW6: inuse %d\n",
|
||||
sock_prot_inuse_get(&rawv6_prot));
|
||||
seq_printf(seq, "FRAG6: inuse %d memory %d\n",
|
||||
ip6_frag_nqueues(), ip6_frag_mem());
|
||||
ip6_frag_nqueues(&init_net), ip6_frag_mem());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -84,9 +84,9 @@ struct frag_queue
|
|||
|
||||
static struct inet_frags ip6_frags;
|
||||
|
||||
int ip6_frag_nqueues(void)
|
||||
int ip6_frag_nqueues(struct net *net)
|
||||
{
|
||||
return ip6_frags.nqueues;
|
||||
return net->ipv6.frags.nqueues;
|
||||
}
|
||||
|
||||
int ip6_frag_mem(void)
|
||||
|
|
@ -690,6 +690,8 @@ static int ipv6_frags_init_net(struct net *net)
|
|||
net->ipv6.sysctl.frags.timeout = IPV6_FRAG_TIMEOUT;
|
||||
net->ipv6.sysctl.frags.secret_interval = 10 * 60 * HZ;
|
||||
|
||||
inet_frags_init_net(&net->ipv6.frags);
|
||||
|
||||
return ip6_frags_sysctl_register(net);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue