Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp122330pxb; Wed, 8 Sep 2021 19:21:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxCAIN2VvA3zThvUyBINX5BTqtEJNNY2A4RNor+/nRxMNIWFqfinYS2gRMOYBCflZmmD6EC X-Received: by 2002:a17:906:d04d:: with SMTP id bo13mr794840ejb.351.1631154059932; Wed, 08 Sep 2021 19:20:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631154059; cv=none; d=google.com; s=arc-20160816; b=y94qhi1eAMD2B7L75XcOrEe+r3N8/vvr7f8/qKt+9YUs1gflMClJk7RaB3BzwdExCL GvG1W6epmetT1+qxiZRSGxzuEdQs6a44kBMLj+odoNmwDTxCciHe7CiN/2j/d9rEAI3f MBnp93TNVdfRH2Axpn3OZqR78wcZzJKSpKo45R22kcbnJqpw92rxazbMtJzZBe4W4Ncf iLmNT0SnJUBc2413J+ZjUJoxz+vnzFT+f9K1bg57IuFEu9aqg5gxnauQK4OSDPyNQjB+ MCsJQTOSUU4Uoc+8nZGCX5d/wNDtPA2Do8WocNyCZynJ0koD1+p/Pd4HO6e/OfDxN2jh s7Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :cc:to:subject:from:date; bh=tRc3RxSObADwxM43GUehwr8k4p/dd2yzgH0ywa1SoLo=; b=cxGOiT24cxtvmDnpJjhRyq8lJIm4ThRhihDsMosv1nTQTwIdDcYaQvfGtgEyjGdPYF P+Cg+3T4m6MYGDYrqDTQPivUAS77q7IWE7FZC1tuAe0I5gHYSKK93xgLoHDLGpyhQJdf iihuTZVb+3PTupJll6BkmpcGPxWK3u4GUMp4T2VsK0kMj2Rnwnoo794c9KCg/MYnb/tX 4A09cWQzo4JVtHXgnxuqD+3IYi/tlvyRlrDzwgaoeN9AZkqE1Li7nzzG3MWQ9HN03xEl OLxzgiapPhaNAKGKzBBiitRa8P0PrIKLkEmYONkcKMrymhXvMzMVL2KiBw+dJE/eqah+ 1yQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b1si531538edv.347.2021.09.08.19.20.36; Wed, 08 Sep 2021 19:20:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349249AbhIIB5a (ORCPT + 99 others); Wed, 8 Sep 2021 21:57:30 -0400 Received: from mta-09-3.privateemail.com ([68.65.122.19]:16482 "EHLO MTA-09-3.privateemail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242103AbhIIB5a (ORCPT ); Wed, 8 Sep 2021 21:57:30 -0400 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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).