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 9374145BC3; Thu, 24 Oct 2024 20:47:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5263B434E6; Thu, 24 Oct 2024 20:47:04 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18]) by mails.dpdk.org (Postfix) with ESMTP id 2EEAA40156 for ; Thu, 24 Oct 2024 20:47:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1729795623; x=1761331623; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yB/xI7HcLhSM6yJbonBgpuBAa8hWYgvBMO7kISxqLzI=; b=Rdu2mabI52QUK17Z3+WBeDP3QayMNRUKsw5yEf32001nN30jfKMSn/L9 B711HrWtDTAu5c+CzAK4a8LHJQ5Yy5sDm2V/o2FKO4nMg6qZe6PN6tRCe W9zxoVW499m++NWrcrROfwJKihoXWsQ8q352Mkx2LR7jMzgkPiddNzCIg ZRVUf9dGprMRW++xLMjk2g0M7CrLEszYwT6K3liPVbZqk7nYMtUpj04Uk /6HyXukCeYPrkSx+t/Y3xw6+qGF48vzbc//Z3Jz59WBWqsh9NQ05rwQ2i Bhm0UN6eXODOSgE6Y1+SkAZBygn9TPo3yOuSfzGOCVYupHfdMHzsazM5d w==; X-CSE-ConnectionGUID: hazIsB67Q7ijzdmiajmITg== X-CSE-MsgGUID: 3OPV/supSR6q6xXb/nBotw== X-IronPort-AV: E=McAfee;i="6700,10204,11222"; a="29607965" X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="29607965" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2024 11:47:01 -0700 X-CSE-ConnectionGUID: /8vVyofiSkq9vxNCXTHqqQ== X-CSE-MsgGUID: 8mI5UgBIT3uveBAjMDVUyw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,230,1725346800"; d="scan'208";a="85280456" Received: from silpixa00401176.ir.intel.com ([10.243.23.21]) by fmviesa004.fm.intel.com with ESMTP; 24 Oct 2024 11:47:00 -0700 From: Vladimir Medvedkin To: dev@dpdk.org Cc: stephen@networkplumber.org Subject: [PATCH v4 0/4] RSS hash key generation Date: Thu, 24 Oct 2024 18:46:52 +0000 Message-ID: <20241024184657.901099-1-vladimir.medvedkin@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241011181703.236985-1-vladimir.medvedkin@intel.com> References: <20241011181703.236985-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. v4 - address some comments - update release notes - rebase to current version 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 ++++++++++ doc/guides/rel_notes/release_24_11.rst | 3 + lib/hash/meson.build | 1 + lib/hash/rte_thash.c | 70 +++---- lib/hash/rte_thash.h | 37 ++++ lib/hash/rte_thash_gf2_poly_math.c | 260 +++++++++++++++++++++++++ lib/hash/version.map | 3 + 7 files changed, 443 insertions(+), 39 deletions(-) create mode 100644 lib/hash/rte_thash_gf2_poly_math.c -- 2.43.0