Re: [PATCH nf-next 3/9] netfilter: conntrack: don't attempt to iterate over empty table

2016-05-03 Thread Pablo Neira Ayuso
On Tue, May 03, 2016 at 07:55:59PM +0200, Florian Westphal wrote: > > Otherwise, every time we'll go container destruction path, we'll hit > > slow path, ie. scanning the full table. > > Yes, but I see no other choice. Fair enough, will place this in nf-next, thanks.

Re: [PATCH nf-next 3/9] netfilter: conntrack: don't attempt to iterate over empty table

2016-05-03 Thread Florian Westphal
Pablo Neira Ayuso wrote: > > I was thinking of the cleanup we do in the netns exit path > > (in nf_conntrack_cleanup_net_list() ). > > Right, but in that path we still have entries in the table. Not necessarily, they might have already been removed (timeout, close). > > If you don't like this I

Re: [PATCH nf-next 3/9] netfilter: conntrack: don't attempt to iterate over empty table

2016-05-03 Thread Pablo Neira Ayuso
On Tue, May 03, 2016 at 07:17:44PM +0200, Florian Westphal wrote: > Pablo Neira Ayuso wrote: > > On Thu, Apr 28, 2016 at 07:13:42PM +0200, Florian Westphal wrote: > > > Once we place all conntracks into same table iteration becomes more > > > costly because the table contains conntracks that we ar

Re: [PATCH nf-next 3/9] netfilter: conntrack: don't attempt to iterate over empty table

2016-05-03 Thread Florian Westphal
Pablo Neira Ayuso wrote: > On Thu, Apr 28, 2016 at 07:13:42PM +0200, Florian Westphal wrote: > > Once we place all conntracks into same table iteration becomes more > > costly because the table contains conntracks that we are not interested > > in (belonging to other netns). > > > > So don't both

Re: [PATCH nf-next 3/9] netfilter: conntrack: don't attempt to iterate over empty table

2016-05-03 Thread Pablo Neira Ayuso
On Thu, Apr 28, 2016 at 07:13:42PM +0200, Florian Westphal wrote: > Once we place all conntracks into same table iteration becomes more > costly because the table contains conntracks that we are not interested > in (belonging to other netns). > > So don't bother scanning if the current namespace h

[PATCH nf-next 3/9] netfilter: conntrack: don't attempt to iterate over empty table

2016-04-28 Thread Florian Westphal
Once we place all conntracks into same table iteration becomes more costly because the table contains conntracks that we are not interested in (belonging to other netns). So don't bother scanning if the current namespace has no entries. Signed-off-by: Florian Westphal --- net/netfilter/nf_connt