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 C9EBDA00BE; Mon, 25 Apr 2022 11:26:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A195541109; Mon, 25 Apr 2022 11:26:17 +0200 (CEST) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 0D0DB410E6 for ; Mon, 25 Apr 2022 11:26:15 +0200 (CEST) Received: from kwepemi500014.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Kn04Q71VhzhYmJ; Mon, 25 Apr 2022 17:25:58 +0800 (CST) Received: from kwepemm600004.china.huawei.com (7.193.23.242) by kwepemi500014.china.huawei.com (7.221.188.232) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 25 Apr 2022 17:26:14 +0800 Received: from localhost.localdomain (10.69.192.56) by kwepemm600004.china.huawei.com (7.193.23.242) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 25 Apr 2022 17:26:13 +0800 From: Huisong Li To: CC: , , , , Subject: [PATCH V1 2/2] app/testpmd: unify RSS types display Date: Mon, 25 Apr 2022 17:25:23 +0800 Message-ID: <20220425092523.52338-3-lihuisong@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220425092523.52338-1-lihuisong@huawei.com> References: <20220425092523.52338-1-lihuisong@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm600004.china.huawei.com (7.193.23.242) 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 Unify RSS types display. Signed-off-by: Huisong Li --- app/test-pmd/config.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index f58da01a3a..06f24d36ac 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -1527,13 +1527,7 @@ rss_config_display(struct rte_flow_action_rss *rss_conf) printf(" none\n"); return; } - for (i = 0; rss_type_table[i].str; i++) { - if ((rss_conf->types & - rss_type_table[i].rss_type) == - rss_type_table[i].rss_type && - rss_type_table[i].rss_type != 0) - printf(" %s\n", rss_type_table[i].str); - } + show_rss_types(rss_conf->types); } static struct port_indirect_action * @@ -3733,13 +3727,7 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key) return; } printf("RSS functions:\n "); - for (i = 0; rss_type_table[i].str; i++) { - if (rss_type_table[i].rss_type == 0) - continue; - if ((rss_hf & rss_type_table[i].rss_type) == rss_type_table[i].rss_type) - printf("%s ", rss_type_table[i].str); - } - printf("\n"); + show_rss_types(rss_hf); if (!show_rss_key) return; printf("RSS key:\n"); -- 2.33.0