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 5189B42544; Fri, 8 Sep 2023 10:01:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3714F402DB; Fri, 8 Sep 2023 10:01:39 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id D2009402E9 for ; Fri, 8 Sep 2023 10:01:37 +0200 (CEST) Received: from kwepemi500020.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RhpRg5y4GzrSV0 for ; Fri, 8 Sep 2023 15:59:43 +0800 (CST) Received: from [10.67.121.175] (10.67.121.175) by kwepemi500020.china.huawei.com (7.221.188.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Fri, 8 Sep 2023 16:01:34 +0800 Message-ID: <0b53c825-1ad9-c02b-f541-2824c7824d1a@huawei.com> Date: Fri, 8 Sep 2023 16:01:33 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 5/5] app/proc-info: support querying RSS hash algorithm To: "Pattan, Reshma" , "dev@dpdk.org" CC: "lihuisong@huawei.com" References: <20230826074607.16771-1-haijie1@huawei.com> <20230904072851.7384-1-haijie1@huawei.com> <20230904072851.7384-6-haijie1@huawei.com> From: Jie Hai In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.121.175] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemi500020.china.huawei.com (7.221.188.8) 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 Hi, Pattan, Reshma On 2023/9/6 1:07, Pattan, Reshma wrote: > > Instead of above function you can declare const array of strings as below to map hash function names. > > static const char * const hf_names[] = { > [RTE_ETH_HASH_FUNCTION_SIMPLE_XOR] = " simple_xor ", > [RTE_ETH_HASH_FUNCTION_TOEPLITZ] = " toeplitz ", > [RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ] = " symmetric_toeplitz ", > [RTE_ETH_HASH_FUNCTION_DEFAULT] = "default" > }; > > >> + printf("\t -- hash algorithm : %s\n", >> + rss_func_to_str(rss_conf.func)); >> } >> > And then print as below ? > printf("\t -- hash algorithm : %s\n", hf_names [rss_conf.func]); > . Thanks for your review, that sounds better, will fix it. Thanks, Jie Hai