From patchwork Thu Mar 2 09:44:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Linus_L=C3=BCssing?= X-Patchwork-Id: 16967 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 795FC83293; Thu, 2 Mar 2017 10:44:34 +0100 (CET) Authentication-Results: open-mesh.org; dmarc=none header.from=c0d3.blue Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a01:4f8:171:314c::100:a1; helo=mail.aperture-lab.de; envelope-from=linus.luessing@c0d3.blue; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=none header.from=c0d3.blue Received: from mail.aperture-lab.de (mail.aperture-lab.de [IPv6:2a01:4f8:171:314c::100:a1]) by open-mesh.org (Postfix) with ESMTPS id A82E48034C for ; Thu, 2 Mar 2017 10:44:32 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.aperture-lab.de (Postfix) with ESMTP id 97B34E04ED; Thu, 2 Mar 2017 10:44:32 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aperture-lab.de Received: from mail.aperture-lab.de ([127.0.0.1]) by localhost (mail.aperture-lab.de [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 88etCos5mEOF; Thu, 2 Mar 2017 10:44:32 +0100 (CET) Received: from localhost (unknown [IPv6:2a01:170:1112:0:c85:8cff:fe0f:63fe]) (Authenticated sender: linus.luessing@c0d3.blue) by mail.aperture-lab.de (Postfix) with ESMTPSA; Thu, 2 Mar 2017 10:44:32 +0100 (CET) From: =?utf-8?q?Linus_L=C3=BCssing?= To: b.a.t.m.a.n@lists.open-mesh.org Date: Thu, 2 Mar 2017 10:44:09 +0100 Message-Id: <20170302094409.20995-1-linus.luessing@c0d3.blue> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Subject: [B.A.T.M.A.N.] [PATCH] RFC: batman-adv: Increase hashtable size for the global translation table X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" With the addition of multicast optimization features in batman-adv not only unicast but also multicast addresses are now fed into the translatation table. This approximately increases the number of entries by a factor of roughly 2 to 3. Also, the number of client devices in some known, public mesh networks has grown to nearly 4000. Therefore this patch inceases the global translation table size from 1024 to 16384 to reduce load in larger mesh networks. Signed-off-by: Linus Lüssing --- ToDo (maybe): Gather some statistics on how much this might reduce load in some particular networks. This might be a hotfix for some larger Freifunk mesh networks which are experiencing a significantly higher load level since they switched to a recent batman-adv version. Validating whether the hashtable size might be the reason is currently being investigated. On the long run we should switch to the resizable hash table implementation the kernel now provides since not that long ago. --- net/batman-adv/translation-table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index e75b493..e87825c 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c @@ -1462,7 +1462,7 @@ static int batadv_tt_global_init(struct batadv_priv *bat_priv) if (bat_priv->tt.global_hash) return 0; - bat_priv->tt.global_hash = batadv_hash_new(1024); + bat_priv->tt.global_hash = batadv_hash_new(16384); if (!bat_priv->tt.global_hash) return -ENOMEM;