Re: [PATCH v2 net-next] socket: Move the socket inuse to namespace.

2017-11-15 Thread Tonghao Zhang
On Wed, Nov 15, 2017 at 12:48 AM, Cong Wang wrote: > On Tue, Nov 14, 2017 at 3:17 AM, Tonghao Zhang > wrote: >> Hi cong, we increase the socket inuse in sk_allock ? > > How about sock_init_data()? > > Or at least you can replace get_net() with

Re: [PATCH v2 net-next] socket: Move the socket inuse to namespace.

2017-11-14 Thread Cong Wang
On Tue, Nov 14, 2017 at 3:17 AM, Tonghao Zhang wrote: > Hi cong, we increase the socket inuse in sk_allock ? How about sock_init_data()? Or at least you can replace get_net() with read_pnet()?

Re: [PATCH v2 net-next] socket: Move the socket inuse to namespace.

2017-11-14 Thread Tonghao Zhang
Hi cong, we increase the socket inuse in sk_allock ? On Tue, Nov 14, 2017 at 1:58 PM, Cong Wang wrote: > On Mon, Nov 13, 2017 at 7:23 PM, 张军伟(基础平台部) > wrote: >> >>> On 14 Nov 2017, at 10:09, Cong Wang wrote:

Re: [PATCH v2 net-next] socket: Move the socket inuse to namespace.

2017-11-13 Thread Cong Wang
On Mon, Nov 13, 2017 at 7:23 PM, 张军伟(基础平台部) wrote: > >> On 14 Nov 2017, at 10:09, Cong Wang wrote: >> >> On Mon, Nov 13, 2017 at 4:36 AM, Tonghao Zhang >> wrote: >>> From: Tonghao Zhang

Re: [PATCH v2 net-next] socket: Move the socket inuse to namespace.

2017-11-13 Thread 基础平台部
> On 14 Nov 2017, at 10:09, Cong Wang wrote: > > On Mon, Nov 13, 2017 at 4:36 AM, Tonghao Zhang > wrote: >> From: Tonghao Zhang >> >> This patch add a member in struct netns_core. and this is >> a counter for

Re: [PATCH v2 net-next] socket: Move the socket inuse to namespace.

2017-11-13 Thread Tonghao Zhang
Yes, thanks for your advise. I will modify, test it and then submit v3 On Tue, Nov 14, 2017 at 10:09 AM, Cong Wang wrote: > On Mon, Nov 13, 2017 at 4:36 AM, Tonghao Zhang > wrote: >> From: Tonghao Zhang >> >> This

Re: [PATCH v2 net-next] socket: Move the socket inuse to namespace.

2017-11-13 Thread Cong Wang
On Mon, Nov 13, 2017 at 4:36 AM, Tonghao Zhang wrote: > From: Tonghao Zhang > > This patch add a member in struct netns_core. and this is > a counter for socket_inuse in the _net_ namespace. The patch > will add/sub counter in the sock_alloc or

[PATCH v2 net-next] socket: Move the socket inuse to namespace.

2017-11-13 Thread Tonghao Zhang
From: Tonghao Zhang This patch add a member in struct netns_core. and this is a counter for socket_inuse in the _net_ namespace. The patch will add/sub counter in the sock_alloc or sock_release. In the sock_alloc, the private data of inode saves the special _net_. When