From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f65.google.com ([74.125.83.65]:33788 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1164277AbeCBEVz (ORCPT ); Thu, 1 Mar 2018 23:21:55 -0500 Message-ID: <1519964512.11375.8.camel@gmail.com> Subject: Re: [Patch nf-next] netfilter: make xt_rateest hash table per net From: Eric Dumazet To: Cong Wang , netdev@vger.kernel.org Cc: netfilter-devel@vger.kernel.org, Florian Westphal , Eric Dumazet , Pablo Neira Ayuso Date: Thu, 01 Mar 2018 20:21:52 -0800 In-Reply-To: <20180302025838.904-1-xiyou.wangcong@gmail.com> References: <20180302025838.904-1-xiyou.wangcong@gmail.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: On Thu, 2018-03-01 at 18:58 -0800, Cong Wang wrote: > As suggested by Eric, we need to make the xt_rateest > hash table and its lock per netns to reduce lock > contentions. > > Cc: Florian Westphal > Cc: Eric Dumazet > Cc: Pablo Neira Ayuso > Signed-off-by: Cong Wang > --- > include/net/netfilter/xt_rateest.h | 4 +- > net/netfilter/xt_RATEEST.c | 91 +++++++++++++++++++++++++++----------- > net/netfilter/xt_rateest.c | 10 ++--- > 3 files changed, 72 insertions(+), 33 deletions(-) Very nice, thanks ! Reviewed-by: Eric Dumazet Although the main reason was to avoid name collisions between different netns. Hash table is small enough that it can be allocated for each netns.