From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4EA37A0A0C; Thu, 15 Apr 2021 10:29:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1FDF5162106; Thu, 15 Apr 2021 10:29:35 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id B455D162083 for ; Thu, 15 Apr 2021 10:29:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618475372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RvQ/SxgGMqJeaCVxOnTYnJNUbO4oGQSWXJIa4OhxVlY=; b=dxJJ4Qgf57rsItk3rBwi83aEoE7VqjUDK3tIRkCxJt97IJ+hAlTpOblihWxskDFKIkwygo MYIpbHCyvGI3sY7kNn8ba9PZk9dn/Ny4fDWqzznJoV0dqkgzfUfaGR2v/i8G9l6N6E1LOw URgQXNcR9Qxbvo68i9vhEPCQIojdKWU= Received: from mail-vs1-f69.google.com (mail-vs1-f69.google.com [209.85.217.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-281-kj9IA3NoPrmQD6ggEQ8VLg-1; Thu, 15 Apr 2021 04:29:31 -0400 X-MC-Unique: kj9IA3NoPrmQD6ggEQ8VLg-1 Received: by mail-vs1-f69.google.com with SMTP id h21-20020a0561022155b02901974f1ac8a9so2545126vsg.8 for ; Thu, 15 Apr 2021 01:29:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RvQ/SxgGMqJeaCVxOnTYnJNUbO4oGQSWXJIa4OhxVlY=; b=iOAvGkBE1Q7wiMlHG39aIeK30ryuyp5kZJ9pgYJkFgxpiuvqcbV8dv1FjPpJENAbLx Z/T1QYxElu5KbtVgjMzaWBrrQAClxzgLP5ySzlllza4kvq+vtkNDaH2cTGEsF33jXHyA f33NUqhWuOhyxneNSSxnAQ5XghFc6r+xCMtrpqu5ouiP4uU3l+SBDXZwK9AGPK9qvM9d EQX/84owggFHcwkyJ8HhMicExXAMa6FP9YcSMETe8Qy2BD8Sbl5NFkrQrzafn3XInjeC c3mkw8dDjO870Lg4UKaleIMBmtAaXSRJTNLAWaBPUs0KrOyJeUaxyxoAAXKaGSyZ3Qf2 NlGg== X-Gm-Message-State: AOAM531ucSsNY5wErFZBK2QBeb9u9IZvv59Ez0o3JqPzyk1gCgUOmTJU nog6QNFQX63ni5LmwuC0+4K9hEhbAMyhydMd0fvSecWyx+KfotnOoSX6TCli1OQGTCt4b7SWu15 E9u9lhLDVqDWvjTIr+54= X-Received: by 2002:a1f:2a09:: with SMTP id q9mr1031871vkq.17.1618475370763; Thu, 15 Apr 2021 01:29:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpzbbUgYAVCMzqo85iWunPb+anYVURB4H9MnX1y3ZqdTTmpxTyOJYeEzwDDMhxT6+v8IqBjwx7YGT0W+BRj/Y= X-Received: by 2002:a1f:2a09:: with SMTP id q9mr1031865vkq.17.1618475370586; Thu, 15 Apr 2021 01:29:30 -0700 (PDT) MIME-Version: 1.0 References: <1618168266-338017-1-git-send-email-vladimir.medvedkin@intel.com> <1618319973-391016-1-git-send-email-vladimir.medvedkin@intel.com> In-Reply-To: From: David Marchand Date: Thu, 15 Apr 2021 10:29:19 +0200 Message-ID: To: "Medvedkin, Vladimir" Cc: "dev@dpdk.org" , "Ananyev, Konstantin" , "Chilikin, Andrey" , "Kinsella, Ray" , "Gobriel, Sameh" , "Richardson, Bruce" , Stephen Hemminger , "Wang, Yipeng1" Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v4 0/3] Predictable RSS feature X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Apr 14, 2021 at 8:05 PM Wang, Yipeng1 wrote: > > > -----Original Message----- > > From: Medvedkin, Vladimir > > Sent: Tuesday, April 13, 2021 6:20 AM > > To: dev@dpdk.org > > Cc: Ananyev, Konstantin ; Chilikin, Andrey > > ; Kinsella, Ray ; Wang, > > Yipeng1 ; Gobriel, Sameh > > ; Richardson, Bruce > > > > Subject: [PATCH v4 0/3] Predictable RSS feature > > > > This patch series introduces predictable RSS feature. > > It is based on the idea of searching for partial hash collisions within Toeplitz > > hash. > > > > The Toeplitz hash function is a homomorphism between (G, ^) and (H, ^), > > where (G, ^) - is a group of tuples and (H, ^) is a group of hashes with respect > > to XOR operation. So tuples and hashes could be treated as n-dimension and > > 32-dimension vector spaces over GF(2). > > So, f(x ^ y) == f(x) ^ f(y) > > where f - is the toeplitz hash function and x, y are tuples. > > > > The ability to predict partial collisions allows user to compute input hash value > > with desired LSB values. > > Usually number of LSB's are defined by the size of RSS Redirection Table. > > > > There could be number of use cases, for example: > > 1) NAT. Using this library it is possible to select a new port number on a > > translation in the way that rss hash for original tuple will have the same LSB's > > as rss hash for reverse tuple. > > 2) IPSec/MPLS/Vxlan. It is possible to choose tunnel id to be pinned to a > > desired queue. > > 3) TCP stack. It is possible to choose a source port number for outgoing > > connections in the way that received replies will be assigned to desired > > queue. > > 4) RSS hash key generation. Hash key initialization with random values does > > not guarantee an uniform distribution amongst queues. This library uses > > mathematically proved algorithm to complete the rss hash key to provide the > > best distribution. > > > > v4: > > - RETA_SZ macros were moved to .h > > - fixed typos > > > > v3: > > - reworked rte_thash_adjust_tuple() > > - added extra comments > > - fixed typos > > - rte_thash_adjust_tuple() API was putted into the first commit > > > > v2: > > - added extra API rte_thash_adjust_tuple() > > - added extra tests for rte_thash_adjust_tuple() > > - added extra fields to rte_thash_subtuple_helper struct > > - fixed typos > > > > Vladimir Medvedkin (3): > > hash: add predictable RSS API > > hash: add predictable RSS implementation > > test/hash: add additional thash tests > > > > app/test/test_thash.c | 469 ++++++++++++++++++++++++++++++- > > lib/librte_hash/meson.build | 3 +- > > lib/librte_hash/rte_thash.c | 671 > > ++++++++++++++++++++++++++++++++++++++++++++ > > lib/librte_hash/rte_thash.h | 198 +++++++++++++ > > lib/librte_hash/version.map | 8 + > > 5 files changed, 1342 insertions(+), 7 deletions(-) create mode 100644 > > lib/librte_hash/rte_thash.c > > > > -- > > 2.7.4 > [Wang, Yipeng] > Hi, Vladimir, thanks for the new version. > Most parts look good to me, so I acked to not block the integration. > But documentation and a good use example is still needed. > I think it can be added later after RC1. This is not something new. Documentation, release note update comes with the API. The example had been asked by Stephen too and this is justified. I can see some comments in patches. I will wait for a v5 from Vladimir. If it can be done for rc1, cool, else it will wait for the next release. -- David Marchand