RE: [PATCH bpf-next] bpf: Generate cookie for new non-initial net NS

2020-07-21 Thread Jianlin Lv
ernel@vger.kernel.org; > net...@vger.kernel.org > Subject: Re: [PATCH bpf-next] bpf: Generate cookie for new non-initial net NS > > On 7/20/20 4:09 PM, Jianlin Lv wrote: > > For non-initial network NS, the net cookie is generated when > > bpf_get_netns_cookie_sock is called for

Re: [PATCH bpf-next] bpf: Generate cookie for new non-initial net NS

2020-07-21 Thread Daniel Borkmann
On 7/20/20 4:09 PM, Jianlin Lv wrote: For non-initial network NS, the net cookie is generated when bpf_get_netns_cookie_sock is called for the first time, but it is more reasonable to complete the cookie generation work when creating a new network NS, just like init_net. net_gen_cookie() be moved

[PATCH bpf-next] bpf: Generate cookie for new non-initial net NS

2020-07-20 Thread Jianlin Lv
For non-initial network NS, the net cookie is generated when bpf_get_netns_cookie_sock is called for the first time, but it is more reasonable to complete the cookie generation work when creating a new network NS, just like init_net. net_gen_cookie() be moved into setup_net() that it can serve the