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=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 E0D56C433EF for ; Thu, 9 Sep 2021 01:56:29 +0000 (UTC) Received: from lists.zx2c4.com (lists.zx2c4.com [165.227.139.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2CBD0610E9 for ; Thu, 9 Sep 2021 01:56:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 2CBD0610E9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=effective-light.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.zx2c4.com Received: by lists.zx2c4.com (ZX2C4 Mail Server) with ESMTP id aecce65a; Thu, 9 Sep 2021 01:56:27 +0000 (UTC) Received: from MTA-09-3.privateemail.com (mta-09-3.privateemail.com [68.65.122.19]) by lists.zx2c4.com (ZX2C4 Mail Server) with ESMTPS id eb48b1c6 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO) for ; Thu, 9 Sep 2021 01:56:23 +0000 (UTC) Received: from mta-09.privateemail.com (localhost [127.0.0.1]) by mta-09.privateemail.com (Postfix) with ESMTP id DDF701800227; Wed, 8 Sep 2021 21:56:20 -0400 (EDT) Received: from [192.168.0.46] (unknown [10.20.151.225]) by mta-09.privateemail.com (Postfix) with ESMTPA id F23511800209; Wed, 8 Sep 2021 21:56:18 -0400 (EDT) Date: Wed, 08 Sep 2021 21:56:12 -0400 From: Hamza Mahfooz Subject: Re: [PATCH] wireguard: convert index_hashtable and pubkey_hashtable into rhashtables To: "Jason A. Donenfeld" Cc: LKML , "David S. Miller" , Jakub Kicinski , WireGuard mailing list , Netdev , Thomas Graf , Herbert Xu Message-Id: In-Reply-To: References: <20210806044315.169657-1-someguy@effective-light.com> X-Mailer: geary/40.0 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: wireguard@lists.zx2c4.com X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: Development discussion of WireGuard List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: wireguard-bounces@lists.zx2c4.com Sender: "WireGuard" Hey Jason, On Wed, Sep 8 2021 at 01:27:12 PM +0200, Jason A. Donenfeld wrote: > - What's performance like? Does the abstraction of rhashtable > introduce overhead? These are used in fast paths -- for every packet > -- so being quick is important. Are you familiar with any (micro)benchmarks (for WireGuard) that, you believe would be particularly informative in assessing the outlined performance characteristics? > - How does this interact with the timing side channel concerns in the > comment of the file? Will the time required to find an unused index > leak the number of items in the hash table? Do we need stochastic > masking? Or is the construction of rhashtable such that we always get > ball-park same time? I think the maintainers of rhashtable are best positioned to answer these questions (I have cc'd them).