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 6140345B17; Fri, 11 Oct 2024 20:17:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C85EA40E31; Fri, 11 Oct 2024 20:17:07 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) by mails.dpdk.org (Postfix) with ESMTP id B0F8040268 for ; Fri, 11 Oct 2024 20:17:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728670626; x=1760206626; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EzON4TDDeu9s+SVwTr22lnHxAWk8IcfiO355JCBOh5k=; b=I0NxdFvKfkz6FwhpVLjffKyb/Lbi73nJisownTcAABDhgxS2FMdZ8icR 1xkkEPd6i0xge0JyhMhcZLeDHeUVzES7mzgh5HPVMtQYAw1fQFVeQIlAZ L5UFFh2Z2JSBNyEpmkuBMzGkvz7jqYbPQ+EtRDssQdfuaxsrpwnDIftD+ BXjUMEQC0In+oQncKvFUashrAtP13sWz2HGFJENkI2G/U0Y8UU02xbK63 cXygcC+hMI12x9NacCddI+wf+GulSg444h+82zFFYqyyfBqNBvVriOd6m MDkMzZQmNPT+6dJDL94xaxNGXw7feTpASVGNFIdBDNuAHWaaqoKmjnHyu A==; X-CSE-ConnectionGUID: iA2kNR7LR6mF8Kr55p/nmg== X-CSE-MsgGUID: 6ziOSjmTRuqnsTA2j+6zqg== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="31778793" X-IronPort-AV: E=Sophos;i="6.11,196,1725346800"; d="scan'208";a="31778793" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2024 11:17:05 -0700 X-CSE-ConnectionGUID: 2PpsbOfwQnmoOcd31PXtnQ== X-CSE-MsgGUID: iMX68jDDQVGoY/oqwGsT5Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,196,1725346800"; d="scan'208";a="77793185" Received: from unknown (HELO silpixa00401176.ir.intel.com) ([10.243.22.76]) by orviesa008.jf.intel.com with ESMTP; 11 Oct 2024 11:17:04 -0700 From: Vladimir Medvedkin To: dev@dpdk.org Cc: stephen@networkplumber.org Subject: [PATCH v3 0/4] RSS hash key generation Date: Fri, 11 Oct 2024 18:16:58 +0000 Message-ID: <20241011181703.236985-1-vladimir.medvedkin@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241010123331.749004-1-vladimir.medvedkin@intel.com> References: <20241010123331.749004-1-vladimir.medvedkin@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Currently there are 2 methods to get the RSS hash key. The first method is to randomly generate it. The second one is to use well known RSS hash keys. Both methods have drawbacks. The first method not always provides a good hash distribution. The second one does, but not for all ReTa sizes and not for all traffic types. Additionaly, since these RSS hash keys are well known, they could potentially be vulnerable to hash-collision DoS attacks. The proposed API could be used to address both of these issues - the key can be randomy generated and tailored to specific traffic profile distribution. For example, if we know that we are receiving flows where source/destination addresses are fixed or limited to a small quantity, but source port has good distribution, we could generate an RSS key that will give us good distribution across our ReTa. v3 - change rte_thash_gen_key() arguments types v2 - fix some minor issues Vladimir Medvedkin (4): thash: add RSS hash key generation API hash: add dynamic polynomial calculation hash: implement RSS hash key generation API test/thash: add tests for RSS key generation API app/test/test_thash.c | 108 ++++++++++++ lib/hash/meson.build | 1 + lib/hash/rte_thash.c | 72 ++++---- lib/hash/rte_thash.h | 37 +++++ lib/hash/rte_thash_gf2_poly_math.c | 253 +++++++++++++++++++++++++++++ lib/hash/version.map | 3 + 6 files changed, 434 insertions(+), 40 deletions(-) create mode 100644 lib/hash/rte_thash_gf2_poly_math.c -- 2.43.0