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 D93B641E9F; Wed, 15 Mar 2023 12:02:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3E62C42D0E; Wed, 15 Mar 2023 12:02:15 +0100 (CET) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id D6B4642D16; Wed, 15 Mar 2023 12:02:13 +0100 (CET) Received: from kwepemi500017.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Pc6rt54v0zrSpx; Wed, 15 Mar 2023 19:01:18 +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; Wed, 15 Mar 2023 19:02:12 +0800 From: Dongdong Liu To: , , , , CC: , , , Jie Hai , Maryam Tahhan Subject: [PATCH 5/5] app/proc-info: support querying RSS hash algorithm Date: Wed, 15 Mar 2023 19:00:33 +0800 Message-ID: <20230315110033.30143-6-liudongdong3@huawei.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20230315110033.30143-1-liudongdong3@huawei.com> References: <20230315110033.30143-1-liudongdong3@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.28.79.22] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemi500017.china.huawei.com (7.221.188.110) X-CFilter-Loop: Reflected 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: Jie Hai Display RSS hash algorithm with command show-port as below. - RSS info -- hash algorithm: toeplitz Signed-off-by: Jie Hai Signed-off-by: Dongdong Liu --- app/proc-info/main.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/app/proc-info/main.c b/app/proc-info/main.c index 7b6f8f1228..4c2a113a1a 100644 --- a/app/proc-info/main.c +++ b/app/proc-info/main.c @@ -879,6 +879,23 @@ show_offloads(uint64_t offloads, } } +static const char * +rss_func_to_str(enum rte_eth_hash_function func) +{ + switch (func) { + case RTE_ETH_HASH_FUNCTION_SIMPLE_XOR: + return "simple_xor"; + case RTE_ETH_HASH_FUNCTION_TOEPLITZ: + return "toeplitz"; + case RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ: + return "symmetric_toeplitz"; + case RTE_ETH_HASH_FUNCTION_DEFAULT: + return "default"; + default: + return "unknown"; + } +} + static void show_rss_types(uint64_t rss_types) { @@ -1097,6 +1114,8 @@ show_port(void) } else { printf("\t -- hf:\n"); show_rss_types(rss_conf.rss_hf); + printf("\t -- hash algorithm: %s\n", + rss_func_to_str(rss_conf.func)); printf("\t -- key len: %u\n", rss_conf.rss_key_len); printf("\t -- key (hex): "); -- 2.22.0