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 018EB4233F; Mon, 9 Oct 2023 18:36:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E3FA3402CB; Mon, 9 Oct 2023 18:36:18 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 8E8BE402B1 for ; Mon, 9 Oct 2023 18:36:17 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 399DQ8VV016392 for ; Mon, 9 Oct 2023 09:36:16 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=yosLu2qTF7I+fHFyY35Ho5h4OZyzyxHjasJgBI2OoV0=; b=kQZGWJvnoGLtiCMDm8c5UbGvoCWobdRpFDRYVKWs2MqlDt8VFREq0/XzhYuO8PoyiwIo VVPOMpw46O7F3OqS94oPpW0NaSbQx8eBEPQCgAWvemCRsjVROcHLSZN5DoAfo5AFGj88 U9RG2C0bHFu6vaZHf8KI6E1rhznSgZZH+Q6Vfe8OVHTccQ98kUbFY2KhkVRfAYcrdxQ/ lmbV1Wp+9xI3Cc7wSGSNZgRtHWjaSzCw7ykCY7YHRxAMlIkD5+XX9VLBTsOFeeUC8Kms qNLwIglGShCqreMMvbp6lsPpPrNy49Mpo1q2lZ6MpUQyg1sJGbMbznqc+NLSkQnVDTFM dA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3tkh9smyx0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 09 Oct 2023 09:36:15 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Mon, 9 Oct 2023 09:36:14 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Mon, 9 Oct 2023 09:36:14 -0700 Received: from localhost.localdomain (unknown [10.28.34.25]) by maili.marvell.com (Postfix) with ESMTP id 3754C3F70A3; Mon, 9 Oct 2023 09:36:12 -0700 (PDT) From: To: CC: , Sunil Kumar Kori Subject: [PATCH v2 1/1] usertools/rss: add CNXK RSS key Date: Mon, 9 Oct 2023 22:06:10 +0530 Message-ID: <20231009163610.1096092-1-skori@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231009163033.1095213-1-skori@marvell.com> References: <20231009163033.1095213-1-skori@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: sG1HgoheW29wta3mSjvN9mwnM1yrHCAy X-Proofpoint-ORIG-GUID: sG1HgoheW29wta3mSjvN9mwnM1yrHCAy X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-09_14,2023-10-09_01,2023-05-22_02 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 From: Sunil Kumar Kori This patch adds RSS key for CNXK platforms. CNXK platform uses 48 bytes long key for hash calculations. For the same patch also updates help mesaages to provide range information for supporting NICs/platforms. Also CNXK uses reta size as 64 so to get correct offset to retrieve queue index, user must pass reta_size option as 64 i.e. -t 64. Examples: $ ./dpdk-rss-flows.py -k cnxk 8 28.0.0.0/24 40.0.0.0/24 -t 64 SRC_IP DST_IP QUEUE 28.0.0.1 40.0.0.1 7 28.0.0.1 40.0.0.2 2 28.0.0.1 40.0.0.3 4 28.0.0.1 40.0.0.7 1 28.0.0.1 40.0.0.8 3 28.0.0.1 40.0.0.9 5 28.0.0.1 40.0.0.10 0 28.0.0.1 40.0.0.11 6 Signed-off-by: Sunil Kumar Kori --- v1..v2: - Fix checkpatch errors. usertools/dpdk-rss-flows.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/usertools/dpdk-rss-flows.py b/usertools/dpdk-rss-flows.py index 73821eb471..b6edd7a2e0 100755 --- a/usertools/dpdk-rss-flows.py +++ b/usertools/dpdk-rss-flows.py @@ -188,11 +188,24 @@ def balanced_traffic( 0x81, 0x15, 0x03, 0x66, ) ) +# rss_key_default, see drivers/net/cnxk/cnxk_flow.c +# Marvell's cnxk NICs take 48 bytes keys +RSS_KEY_CNXK = bytes( + ( + 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad, + 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad, + 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad, + 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad, + 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad, + 0xfe, 0xed, 0x0b, 0xad, 0xfe, 0xed, 0x0b, 0xad, + ) +) # fmt: on DEFAULT_DRIVER_KEYS = { "intel": RSS_KEY_INTEL, "mlx": RSS_KEY_MLX, "i40e": RSS_KEY_I40E, + "cnxk": RSS_KEY_CNXK, } @@ -202,7 +215,7 @@ def rss_key(value): try: key = binascii.unhexlify(value) if len(key) not in (40, 52): - raise argparse.ArgumentTypeError("The key must be 40 or 52 bytes long") + raise argparse.ArgumentTypeError("The key must be 40 to 52 bytes long") return key except (TypeError, ValueError) as e: raise argparse.ArgumentTypeError(str(e)) from e @@ -299,7 +312,7 @@ def parse_args(): default=RSS_KEY_INTEL, type=rss_key, help=""" - The random 40-bytes key used to compute the RSS hash. This option + The random 40 to 52 bytes key used to compute the RSS hash. This option supports either a well-known name or the hex value of the key (well-known names: "intel", "mlx", default: "intel"). """, -- 2.25.1