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 60AB1A0562; Wed, 14 Apr 2021 20:04:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D66BA161C45; Wed, 14 Apr 2021 20:04:47 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 66416161C32 for ; Wed, 14 Apr 2021 20:04:41 +0200 (CEST) IronPort-SDR: 8IDoo/orMGnmOf5dBzCnXFkZlURo9k5ydHfMf8UN56MdMRmfSi/6TMs7LcroWtN2s3hVoIotYs mA64gnZPp6Hg== X-IronPort-AV: E=McAfee;i="6200,9189,9954"; a="256018976" X-IronPort-AV: E=Sophos;i="5.82,223,1613462400"; d="scan'208";a="256018976" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2021 11:04:40 -0700 IronPort-SDR: s9wnic2WLTo48U0nQnL+fPkPPsc6hJEqpIQu5FsvWPxK5ZeE9Poo5DHAJaZZHcm1Vnm0X/OfR5 B0G+fAnVLaJg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,223,1613462400"; d="scan'208";a="522077408" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by fmsmga001.fm.intel.com with ESMTP; 14 Apr 2021 11:04:39 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Wed, 14 Apr 2021 11:04:39 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Wed, 14 Apr 2021 11:04:39 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.172) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Wed, 14 Apr 2021 11:04:38 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qt7cuQjWRBDYcGcADeRJ8cqEioGZ64ZUEakXIuHUHoZUX09Efuvi//kerm0aDMO8IQ5QhLVN5n4scZVlKChZfZod8x3lUe9eNIpwhK+cvUC39JldqYymH7+ck1tx5clMVmku0EDyNWJG17++lJKnhXOnjGi1pLtVXYYw2fduwg3aKMMUtW4kbWBZyzwjk1rJqFFmouIWonpz5WyC+eAbYAKFZQ9ZKgCr+dNLnYBd0DSL3sU1KfEey66eCoaxCc0xkOmUQAqtn4pSsrpnhPRl3hHdhcIX9uzzu3DIQzvS+N3qgDuaypf/RWGwDSBsZuzcq08/6DdI1wsz447hbsIKyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2/kmfNMuimfL13bF/TW4d2eignZ8gWrHItIgHYQuyPk=; b=oUzAnkOWbtOiMI9HZ0jfXkn5ptEF+EC63807izceZkTxeALuEhuI9VSTO7JmhGHFBIW5bc0UxyH8+ToOACvWj3XzXflKhLmGhLkdMoReaMj7l7b6f6C17PGNZCo0vXxXtp99F2vwAiBxPhQqkrjA62IB8Q5NeTikW8qUHTaz7MRjR3U8xJrzDc4GVwEiqxCfJB7o1rojs2MPU7ijMvVapleyb3nTsqvr0U8LTdtni7rK8EP2BZ8wQC6yHAxRwJ3LJXpu6h6sywvGBZYPhEthcDADW3r4/UhFyupwSnvUdyC3yyAihtMORhx1hXtS75IYdesVC4sH4p66k9st+1LAiQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2/kmfNMuimfL13bF/TW4d2eignZ8gWrHItIgHYQuyPk=; b=cfZNE9FQAhQhsRjorXOQNfGlkiTtwOwirAeuqmrJCRm9AE3vNLoqzs//kUqfZPh+RY1aD47OoQ1V+hv7xeHdqf44AMKyJX7uEk+rmE2/sGODxdldHYr2gOOf/vvzhLDWfQ2Rf4CE/9MeISmTiqggLxXq6PXtdidg5QEj+Tf1imo= Received: from CO1PR11MB5172.namprd11.prod.outlook.com (2603:10b6:303:95::12) by MWHPR1101MB2240.namprd11.prod.outlook.com (2603:10b6:301:52::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.16; Wed, 14 Apr 2021 18:04:35 +0000 Received: from CO1PR11MB5172.namprd11.prod.outlook.com ([fe80::dc40:be89:aeb8:2d46]) by CO1PR11MB5172.namprd11.prod.outlook.com ([fe80::dc40:be89:aeb8:2d46%5]) with mapi id 15.20.4020.022; Wed, 14 Apr 2021 18:04:35 +0000 From: "Wang, Yipeng1" To: "Medvedkin, Vladimir" , "dev@dpdk.org" CC: "Ananyev, Konstantin" , "Chilikin, Andrey" , "Kinsella, Ray" , "Gobriel, Sameh" , "Richardson, Bruce" Thread-Topic: [PATCH v4 0/3] Predictable RSS feature Thread-Index: AQHXMGevGbPx1jlzkkCPWJtKmadi4qq0Ti+w Date: Wed, 14 Apr 2021 18:04:35 +0000 Message-ID: References: <1618168266-338017-1-git-send-email-vladimir.medvedkin@intel.com> <1618319973-391016-1-git-send-email-vladimir.medvedkin@intel.com> In-Reply-To: <1618319973-391016-1-git-send-email-vladimir.medvedkin@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [108.161.24.24] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ae92d209-0bb7-42d8-9b52-08d8ff6fc378 x-ms-traffictypediagnostic: MWHPR1101MB2240: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2089; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: phbklssdMN9YZ4LDY+OYHQ+ulwrb7KasSz8QSlY81YA7ifpsmc0WmsDfMV+XdQ1TQAVV4yVgEbJr4BPGiQ9jeHD2kn5zG7RLDsdCxfv4n/Ae9TFnPHW8uWc6SNpARt5rYYUIXJ33X5CFPbEUItYgFMrJBQ5PiH894rIhaYTt57C0c3lUwKZBacDi/3ro/9PE4nkF3+/ZYw1brfVMb3tTJ2GsvvFRvkGskurJykXpXqVUXu3Ghl578r1suFZCxiL2JkbX7fDIxhXAY03qa7nRZjeK2hrzyEdkM6v5VGsrrkNgC+NJRmdWCoa6YknZtPWgBL4e2Sa16ZeeaGu2VVJj6TLrqOMTVQ9Nya+nEun99wieP464Vs3nG4Yqybx3dmzXbMtMQimcxUz+USMSrDBmUPEGZtXrPquMr49oe6g6QTu+Pq9h9HUdF5jA/iApOR56npC7zaMdp0JT0Fqadmxh0I4C78inR3MEZFVJwmBqAPhbTRZreEtL2ULrFrVJ6ATQ+ftAgr6LJr/Q/VgB1cGjLrNkEtaZS+B3PussJVkYpNh+2QPCU54ZgB7tIKb5CvHR59xknoM7mQ72aRb5b4e41d/w0BweW5ikCHOk+MoDv1c= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR11MB5172.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(136003)(39860400002)(396003)(376002)(346002)(9686003)(8936002)(33656002)(83380400001)(26005)(66476007)(64756008)(66446008)(66556008)(122000001)(52536014)(38100700002)(66946007)(76116006)(55016002)(86362001)(4326008)(6506007)(8676002)(2906002)(316002)(7696005)(71200400001)(110136005)(54906003)(5660300002)(478600001)(107886003)(186003)(53546011); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?qEskqFL77fAIeGs1bwLFvx36NtmPW1ny/sDvgwG4ngAIGRh9ZAvsrkBxeWZO?= =?us-ascii?Q?v7w/MG3mFWqsDJbVJ5lj1cXWGSBR1Vn7D2I7SlhlM/1gNLTezPTxPcmL+ttc?= =?us-ascii?Q?MpRMnF581kLOoxATorisahza9GwyyS4PlksUyzNDuVeXfXnfNYrPiFPlxIoS?= =?us-ascii?Q?mGdadAppxqXkL+QLgmrtWq+nVIUoWYuvJDNzcv0kMjteaqQ45i2MH6UTpAw8?= =?us-ascii?Q?Xu3S8rBkFc9OVq4HEjl0X1CySyJUXv2IYS0t8lHDHlD4sT+GhQ3NJqxE/zXl?= =?us-ascii?Q?wdHlaWbW7NeeTZal5hclghgCYjlH72gnkRvs7EuXgEdImXMErSgppSj7ZDb0?= =?us-ascii?Q?ZWlcBlaOuwkAVMtUjzChOS3463qdMgpBwSaWKUDjss+gkOfR9OMiItmh7/X+?= =?us-ascii?Q?6rXLA+tSNE8RRJNc2gVonLaIt+gy5BtKooE3VoHaK/a2rlf4rvj476bd9as1?= =?us-ascii?Q?T/3TN5aAaiedSOTlTJoU1qOAdg03wocIt09t73/hB1NXc+j6jLfJ/oSdOpJH?= =?us-ascii?Q?2BULV2MYQdoW3UUX2dJg1gFb38Jdra+HUsTvf07QHTNCT1F1gUN2uWQHM59w?= =?us-ascii?Q?qlEBCLw1KOixULEJODJRr13h+ZY0yzH752lqZxC93s2cE4/o8OZXdSb8+MeB?= =?us-ascii?Q?U8lIh5gWWwgtySEpn+//+wV5H+UXN4Beya+yqdm4uQxRp0DYMcpFgRMmlR5d?= =?us-ascii?Q?qvLcpUUpdJ6dsl9ZVIGJ+YEt73ABLDEICAtYmwhjteqx12ONG+rvFddQDhmV?= =?us-ascii?Q?8la3tWuPSSjS+95FEuf750eBWfkvUOFng1aABvi06uJNQkrNOlgrmpMTUrnT?= =?us-ascii?Q?BKqvs0us9mr5cN8AkgfNjXHGDSAxphMVTZR+2tCm0P7WFPdVmhSS2JzNaMdP?= =?us-ascii?Q?JYARAwSNJcHEyKAEJ8+HuS7ZWuN7z8tFFN0Cpd5vwWeBtsyldF3ZM+EMDHU4?= =?us-ascii?Q?nKsHqzH1iFOI2Tq+T1SbAaGtHCrODku1r5GigLwA+og11JDbe/ctTan6YM+n?= =?us-ascii?Q?5XHxC13iJp5mKpxDFc4IQneVeUj1w77GJfqIjqOXBGHOlAZwJnq38rPHP1IB?= =?us-ascii?Q?iII13JtuscoGD2kuSvXSPGkOmJKevEv0ROqdf+mEgM/iZ+c/eC67PscE4KjM?= =?us-ascii?Q?6QQfIWtzauJiEUHNz7NzEkjHRiOE/HhSMCX3NM+DxhoP3vKig/09UQZ7iGmI?= =?us-ascii?Q?Vmthc5LLkgj1V22Rb1UAzT6cu9afNkjyLJb9yseCW+Wrd9SJLVoUA8yxQLUb?= =?us-ascii?Q?DWOIssMEJY94JizU+xkc41PwFQVCydVUKZzfu5f02iAdp59K2dmQSzX31WNp?= =?us-ascii?Q?ZUxESvw7o5mMtn7NH3LIhtG/?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB5172.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ae92d209-0bb7-42d8-9b52-08d8ff6fc378 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Apr 2021 18:04:35.6469 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 1Nk2iVa/VvNC7BXtMPUK0Qd4rW9eFeRGwu7Q46PRF3dkogjyiLSXcxA3BEOMNmFUv8A6ffKmMK6X8Punb3H0Pw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1101MB2240 X-OriginatorOrg: intel.com 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" > -----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 >=20 > This patch series introduces predictable RSS feature. > It is based on the idea of searching for partial hash collisions within T= oeplitz > hash. >=20 > 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 an= d > 32-dimension vector spaces over GF(2). > So, f(x ^ y) =3D=3D f(x) ^ f(y) > where f - is the toeplitz hash function and x, y are tuples. >=20 > The ability to predict partial collisions allows user to compute input ha= sh value > with desired LSB values. > Usually number of LSB's are defined by the size of RSS Redirection Table. >=20 > 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 sam= e 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 do= es > not guarantee an uniform distribution amongst queues. This library uses > mathematically proved algorithm to complete the rss hash key to provide t= he > best distribution. >=20 > v4: > - RETA_SZ macros were moved to .h > - fixed typos >=20 > v3: > - reworked rte_thash_adjust_tuple() > - added extra comments > - fixed typos > - rte_thash_adjust_tuple() API was putted into the first commit >=20 > 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 >=20 > Vladimir Medvedkin (3): > hash: add predictable RSS API > hash: add predictable RSS implementation > test/hash: add additional thash tests >=20 > 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 >=20 > -- > 2.7.4 [Wang, Yipeng]=20 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. Thanks! Yipeng