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 8B94445920; Fri, 6 Sep 2024 18:53:22 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7983A42F7A; Fri, 6 Sep 2024 18:53:22 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) by mails.dpdk.org (Postfix) with ESMTP id A86AF42E82 for ; Fri, 6 Sep 2024 18:53:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1725641601; x=1757177601; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=VkoG8Z2lXRwXZnAqdbZs3sjwPe3FCPFSEXs4496E8j8=; b=P9Gx+wbC266fq51XidMjJkOiCCzfbt83HIe15Z/MshvpxiBDgOkTEpIA jG0AqaQBO4wXdG0dZ/zDRcpayYHZ3vjHoUqfHH7DYqHd0hsWZfJhY92Xw ryIUnncDfmPwWGwwFNBsGVl7IqbP7eWzY2q4r/ohhFV1TwuQVpE5vnvTy Bqya5mIQ8bqgl9g52hjTLD1cyaKV+FQ3qzMD4l+1zWsHTGXH3+FxKj+iN AqsrwQFf+Nk5NhavEaBrhVCb39PQ7F8FWL7JJRJVxEhPj+5LFFKv1R8Ec zKVdIhxqHzK0viPV2h9u2BqZE74UVcCmM34YNWAsaGryDhCnKANupvAbU Q==; X-CSE-ConnectionGUID: yq+uAysCS/mqo8fa3SWIvg== X-CSE-MsgGUID: gMgu7Vd3RbCdiHb0rFvoFQ== X-IronPort-AV: E=McAfee;i="6700,10204,11187"; a="27334099" X-IronPort-AV: E=Sophos;i="6.10,208,1719903600"; d="scan'208";a="27334099" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Sep 2024 09:53:20 -0700 X-CSE-ConnectionGUID: irhD3QW0QnuJJ5X/d3Ljbg== X-CSE-MsgGUID: YBWdWASnQfmxkprCsQmFMQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.10,208,1719903600"; d="scan'208";a="65996769" Received: from silpixa00401176.ir.intel.com ([10.243.22.170]) by fmviesa009.fm.intel.com with ESMTP; 06 Sep 2024 09:53:19 -0700 From: Vladimir Medvedkin To: dev@dpdk.org Subject: [RFC 0/4] RSS hash key generation Date: Fri, 6 Sep 2024 16:53:14 +0000 Message-Id: <20240906165318.1322550-1-vladimir.medvedkin@intel.com> X-Mailer: git-send-email 2.34.1 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. 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 | 5 +- 6 files changed, 435 insertions(+), 41 deletions(-) create mode 100644 lib/hash/rte_thash_gf2_poly_math.c -- 2.34.1