Re: [PATCH v4 2/2] sock: Move the socket inuse to namespace.

2017-12-07 Thread Tonghao Zhang
On Sat, Nov 25, 2017 at 10:53 PM, David Miller wrote: > From: Tonghao Zhang > Date: Wed, 22 Nov 2017 17:51:25 -0800 > >> 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 sk_alloc or sk_free. Be

Re: [PATCH v4 2/2] sock: Move the socket inuse to namespace.

2017-11-25 Thread David Miller
From: Tonghao Zhang Date: Wed, 22 Nov 2017 17:51:25 -0800 > 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 sk_alloc or sk_free. Because socket and > sock is in pair. It's a easy way to maintain

[PATCH v4 2/2] sock: Move the socket inuse to namespace.

2017-11-22 Thread 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 sk_alloc or sk_free. Because socket and sock is in pair. It's a easy way to maintain the code and help developer to review. More important, it avoids ho