Message ID | 20241010123331.749004-1-vladimir.medvedkin@intel.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5FAE745B04; Thu, 10 Oct 2024 14:33:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 48EC94042C; Thu, 10 Oct 2024 14:33:35 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by mails.dpdk.org (Postfix) with ESMTP id 97713402D8 for <dev@dpdk.org>; Thu, 10 Oct 2024 14:33:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728563614; x=1760099614; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=wZFXZFW14GQcfyV/JCwBbgFCe7sXRo68JmhwQsk7UxI=; b=lIAhfVUTSsvxIlJ9oVcTnApo+HXmNhxsvuNB5a/KQa0aKtV09T7J3ExG 15rxRn6nq+Q6kDh3YAITFnEmEQHJU4yIsuT29xhzoKTrJFVgydLvnbSGv 9EN6QeHOF4z5LGFEJ/HISy53s7Z/pAPCFuvvl+gv9XY8bQzVmkO40H6o/ j6dXBkw9aDbXFPjE8ZiGyjKbOGqYweL1R7SPIUKh6e+XFllmAMcEKTmph juPwcXLt8BfHGs6P6CcCEgxQo4JV+yccGu+pmw+yHN+RTi0R1mbfZIOVK ea7K33lvLQGSRR49NooEVySPItFgi3olwmMbzW84JeIkffkhkPjii7ZK6 g==; X-CSE-ConnectionGUID: uxyL9DN4S1iZztR18xu1yQ== X-CSE-MsgGUID: SDFKxMjLQKeJOk31ClshTQ== X-IronPort-AV: E=McAfee;i="6700,10204,11220"; a="31712316" X-IronPort-AV: E=Sophos;i="6.11,193,1725346800"; d="scan'208";a="31712316" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2024 05:33:33 -0700 X-CSE-ConnectionGUID: v63U5DGeQau6fce3Xj6EpA== X-CSE-MsgGUID: BWdIkOY9QVuNoXRUJF9g3w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,193,1725346800"; d="scan'208";a="81101872" Received: from unknown (HELO silpixa00401176.ir.intel.com) ([10.243.22.170]) by fmviesa005.fm.intel.com with ESMTP; 10 Oct 2024 05:33:31 -0700 From: Vladimir Medvedkin <vladimir.medvedkin@intel.com> To: dev@dpdk.org Cc: stephen@networkplumber.org Subject: [PATCH v2 0/4] RSS hash key generation Date: Thu, 10 Oct 2024 12:33:27 +0000 Message-Id: <20241010123331.749004-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 <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Series | RSS hash key generation | |
Message
Vladimir Medvedkin
Oct. 10, 2024, 12:33 p.m. UTC
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. 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