From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FE64C4338F for ; Sun, 15 Aug 2021 13:07:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D8F6F6109F for ; Sun, 15 Aug 2021 13:07:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237962AbhHONHu (ORCPT ); Sun, 15 Aug 2021 09:07:50 -0400 Received: from mail.netfilter.org ([217.70.188.207]:53234 "EHLO mail.netfilter.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235540AbhHONHu (ORCPT ); Sun, 15 Aug 2021 09:07:50 -0400 Received: from netfilter.org (unknown [78.30.35.141]) by mail.netfilter.org (Postfix) with ESMTPSA id 05AC860056; Sun, 15 Aug 2021 15:06:33 +0200 (CEST) Date: Sun, 15 Aug 2021 15:07:16 +0200 From: Pablo Neira Ayuso To: alexandre.ferrieux@orange.com Cc: Florian Westphal , netfilter-devel@vger.kernel.org Subject: Re: nfnetlink_queue -- why linear lookup ? Message-ID: <20210815130716.GA21655@salvia> References: <11790_1628855682_61165D82_11790_25_1_3f865faa-9fd8-40aa-6e49-5d85dd596b5b@orange.com> <20210814210103.GG607@breakpoint.cc> <14552_1628975094_61182FF6_14552_82_1_d4901cb2-0852-a524-436c-62bf06f95d0e@orange.com> <20210814211238.GH607@breakpoint.cc> <27263_1629029795_611905A3_27263_246_1_ddbb7a24-d843-9985-5833-c7c8c1aa8d29@orange.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <27263_1629029795_611905A3_27263_246_1_ddbb7a24-d843-9985-5833-c7c8c1aa8d29@orange.com> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org On Sun, Aug 15, 2021 at 02:17:08PM +0200, alexandre.ferrieux@orange.com wrote: [...] > So, the only way forward would be a separate hashtable on ids. Using the rhashtable implementation is fine for this, it's mostly boilerplate code that is needed to use it and there are plenty of examples in the kernel tree if you need a reference. [...] > PS: what is the intended dominant use case for batch verdicts ? Issuing a batch containing several packets helps to amortize the cost of the syscall.