From patchwork Wed Sep 6 12:39:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Westphal X-Patchwork-Id: 810566 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xnNSl07Lxz9t2R for ; Wed, 6 Sep 2017 22:39:35 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753553AbdIFMje (ORCPT ); Wed, 6 Sep 2017 08:39:34 -0400 Received: from Chamillionaire.breakpoint.cc ([146.0.238.67]:34882 "EHLO Chamillionaire.breakpoint.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753161AbdIFMjd (ORCPT ); Wed, 6 Sep 2017 08:39:33 -0400 Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.84_2) (envelope-from ) id 1dpZZN-0001HV-Go; Wed, 06 Sep 2017 14:36:37 +0200 From: Florian Westphal To: Subject: [PATCH nf 0/2] netfilter: nat: do not use rhltable Date: Wed, 6 Sep 2017 14:39:50 +0200 Message-Id: <20170906123952.12555-1-fw@strlen.de> X-Mailer: git-send-email 2.13.0 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org This reverts the conversion of the nat bysource table to rhlist that I did last year. It was a bad idea to begin with. Fast lookup is not essential; in most cases there is no lookup at all because original tuple is not taken and can be used as-is. What needs to be fast is insertion and deletion. With rhlist, deletion is slow as it requires a list traversal. So, switch back to a statically-sized table for bysource hash. include/net/netfilter/nf_conntrack.h | 3 include/net/netfilter/nf_nat.h | 1 net/netfilter/nf_nat_core.c | 142 ++++++++++++++++------------------- 3 files changed, 66 insertions(+), 80 deletions(-) --- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html