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 25D0F41EB1 for ; Thu, 16 Mar 2023 13:59:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1E17842D43; Thu, 16 Mar 2023 13:59:36 +0100 (CET) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 804A040A89; Thu, 16 Mar 2023 13:59:33 +0100 (CET) Received: from kwepemi500017.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4PcnM11VnvzSl5H; Thu, 16 Mar 2023 20:56:13 +0800 (CST) Received: from localhost.localdomain (10.28.79.22) by kwepemi500017.china.huawei.com (7.221.188.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 16 Mar 2023 20:59:29 +0800 From: Dongdong Liu To: , , , CC: , , , Aman Singh , Yuying Zhang Subject: [PATCH] app/testpmd: display RSS hash key of rte flow rule Date: Thu, 16 Mar 2023 20:58:14 +0800 Message-ID: <20230316125814.723-1-liudongdong3@huawei.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.28.79.22] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemi500017.china.huawei.com (7.221.188.110) X-CFilter-Loop: Reflected X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org From: Huisong Li There are two ways to set RSS hash key with rte flow rule: 1. 'key_len' isn't zero and 'key' is NULL. 2. 'key_len' isn't zero and 'key' isn't NULL. This patch adds displaying for the hash key of rte flow rule. Signed-off-by: Huisong Li Signed-off-by: Dongdong Liu --- app/test-pmd/config.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 22b88c67b9..096c218c12 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -1518,6 +1518,21 @@ rss_config_display(struct rte_flow_action_rss *rss_conf) return; } + printf(" RSS key:\n"); + if (rss_conf->key_len == 0) { + printf(" none"); + } else { + printf(" key_len: %u\n", rss_conf->key_len); + printf(" key: "); + if (rss_conf->key == NULL) { + printf("none"); + } else { + for (i = 0; i < rss_conf->key_len; i++) + printf("%02X", rss_conf->key[i]); + } + } + printf("\n"); + printf(" types:\n"); if (rss_conf->types == 0) { printf(" none\n"); -- 2.22.0