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 0927FA0093; Sat, 25 Jun 2022 04:14:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED62940A89; Sat, 25 Jun 2022 04:14:40 +0200 (CEST) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id 5A548400EF for ; Sat, 25 Jun 2022 04:14:39 +0200 (CEST) Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4LVHXb17xjzShBb; Sat, 25 Jun 2022 10:11:11 +0800 (CST) Received: from kwepemm600004.china.huawei.com (7.193.23.242) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Sat, 25 Jun 2022 10:14:37 +0800 Received: from [10.67.103.231] (10.67.103.231) 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; Sat, 25 Jun 2022 10:14:36 +0800 Message-ID: <2f3df034-b3a4-6ea6-0f6a-d54a1c5ab23c@huawei.com> Date: Sat, 25 Jun 2022 10:14:36 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH V5 6/7] app/testpmd: reorder elements in RSS type table array To: Ferruh Yigit , , , CC: , , , References: <20220429102445.23711-1-lihuisong@huawei.com> <20220624072401.21839-1-lihuisong@huawei.com> <20220624072401.21839-7-lihuisong@huawei.com> <30134242-fbc4-2dc4-f171-8869b3ad40e5@xilinx.com> From: "lihuisong (C)" In-Reply-To: <30134242-fbc4-2dc4-f171-8869b3ad40e5@xilinx.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.231] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) 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 在 2022/6/24 22:00, Ferruh Yigit 写道: > On 6/24/2022 8:24 AM, Huisong Li wrote: >> There are group and individual types in rss_type_table[]. However, group >> types are very scattered, and individual types are not arranged based on >> the bit number order in 'RTE_ETH_RSS_xxx'. For a clear distribution of >> types and better maintenance, this patch reorders this table. >> >> Signed-off-by: Huisong Li > --- >>   app/test-pmd/config.c | 51 +++++++++++++++++++++++-------------------- >>   1 file changed, 27 insertions(+), 24 deletions(-) >> >> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c >> index b3cb68003c..cc97aaa0ce 100644 >> --- a/app/test-pmd/config.c >> +++ b/app/test-pmd/config.c >> @@ -85,17 +85,20 @@ static const struct { >>   }; >>     const struct rss_type_info rss_type_table[] = { >> +    /* Group types */ >>       { "all", RTE_ETH_RSS_ETH | RTE_ETH_RSS_VLAN | RTE_ETH_RSS_IP | >> RTE_ETH_RSS_TCP | >>           RTE_ETH_RSS_UDP | RTE_ETH_RSS_SCTP | RTE_ETH_RSS_L2_PAYLOAD | >>           RTE_ETH_RSS_L2TPV3 | RTE_ETH_RSS_ESP | RTE_ETH_RSS_AH | >> RTE_ETH_RSS_PFCP | >>           RTE_ETH_RSS_GTPU | RTE_ETH_RSS_ECPRI | RTE_ETH_RSS_MPLS | >> RTE_ETH_RSS_L2TPV2}, >>       { "none", 0 }, >> -    { "eth", RTE_ETH_RSS_ETH }, >> -    { "l2-src-only", RTE_ETH_RSS_L2_SRC_ONLY }, >> -    { "l2-dst-only", RTE_ETH_RSS_L2_DST_ONLY }, >> +    { "ip", RTE_ETH_RSS_IP }, >> +    { "udp", RTE_ETH_RSS_UDP }, >> +    { "tcp", RTE_ETH_RSS_TCP }, >> +    { "sctp", RTE_ETH_RSS_SCTP }, >> +    { "tunnel", RTE_ETH_RSS_TUNNEL }, >>       { "vlan", RTE_ETH_RSS_VLAN }, >> -    { "s-vlan", RTE_ETH_RSS_S_VLAN }, >> -    { "c-vlan", RTE_ETH_RSS_C_VLAN }, >> + >> +    /* Individual type */ >>       { "ipv4", RTE_ETH_RSS_IPV4 }, >>       { "ipv4-frag", RTE_ETH_RSS_FRAG_IPV4 }, >>       { "ipv4-tcp", RTE_ETH_RSS_NONFRAG_IPV4_TCP }, >> @@ -108,7 +111,7 @@ const struct rss_type_info rss_type_table[] = { >>       { "ipv6-udp", RTE_ETH_RSS_NONFRAG_IPV6_UDP }, >>       { "ipv6-sctp", RTE_ETH_RSS_NONFRAG_IPV6_SCTP }, >>       { "ipv6-other", RTE_ETH_RSS_NONFRAG_IPV6_OTHER }, >> -    { "l2-payload", RTE_ETH_RSS_L2_PAYLOAD }, >> +    { "l2_payload", RTE_ETH_RSS_L2_PAYLOAD }, >>       { "ipv6-ex", RTE_ETH_RSS_IPV6_EX }, >>       { "ipv6-tcp-ex", RTE_ETH_RSS_IPV6_TCP_EX }, >>       { "ipv6-udp-ex", RTE_ETH_RSS_IPV6_UDP_EX }, >> @@ -116,33 +119,33 @@ const struct rss_type_info rss_type_table[] = { >>       { "vxlan", RTE_ETH_RSS_VXLAN }, >>       { "geneve", RTE_ETH_RSS_GENEVE }, >>       { "nvgre", RTE_ETH_RSS_NVGRE }, >> -    { "ip", RTE_ETH_RSS_IP }, >> -    { "udp", RTE_ETH_RSS_UDP }, >> -    { "tcp", RTE_ETH_RSS_TCP }, >> -    { "sctp", RTE_ETH_RSS_SCTP }, >> -    { "tunnel", RTE_ETH_RSS_TUNNEL }, >> -    { "l3-pre32", RTE_ETH_RSS_L3_PRE32 }, >> -    { "l3-pre40", RTE_ETH_RSS_L3_PRE40 }, >> -    { "l3-pre48", RTE_ETH_RSS_L3_PRE48 }, >> -    { "l3-pre56", RTE_ETH_RSS_L3_PRE56 }, >> -    { "l3-pre64", RTE_ETH_RSS_L3_PRE64 }, >> -    { "l3-pre96", RTE_ETH_RSS_L3_PRE96 }, >> -    { "l3-src-only", RTE_ETH_RSS_L3_SRC_ONLY }, >> -    { "l3-dst-only", RTE_ETH_RSS_L3_DST_ONLY }, >> -    { "l4-src-only", RTE_ETH_RSS_L4_SRC_ONLY }, >> -    { "l4-dst-only", RTE_ETH_RSS_L4_DST_ONLY }, >> +    { "gtpu", RTE_ETH_RSS_GTPU }, >> +    { "eth", RTE_ETH_RSS_ETH }, >> +    { "s-vlan", RTE_ETH_RSS_S_VLAN }, >> +    { "c-vlan", RTE_ETH_RSS_C_VLAN }, >>       { "esp", RTE_ETH_RSS_ESP }, >>       { "ah", RTE_ETH_RSS_AH }, >>       { "l2tpv3", RTE_ETH_RSS_L2TPV3 }, >>       { "pfcp", RTE_ETH_RSS_PFCP }, >>       { "pppoe", RTE_ETH_RSS_PPPOE }, >> -    { "gtpu", RTE_ETH_RSS_GTPU }, >> -    { "ecpri", RTE_ETH_RSS_ECPRI }, >> +    {"ecpri", RTE_ETH_RSS_ECPRI }, > > syntax issue, space needed before "ecpri" Agreed. > >>       { "mpls", RTE_ETH_RSS_MPLS }, >>       { "ipv4-chksum", RTE_ETH_RSS_IPV4_CHKSUM }, >>       { "l4-chksum", RTE_ETH_RSS_L4_CHKSUM }, >>       { "l2tpv2", RTE_ETH_RSS_L2TPV2 }, >> -    { NULL, 0 }, >> +    { "l3-pre96", RTE_ETH_RSS_L3_PRE96 }, >> +    { "l3-pre64", RTE_ETH_RSS_L3_PRE64 }, >> +    { "l3-pre56", RTE_ETH_RSS_L3_PRE56 }, >> +    { "l3-pre48", RTE_ETH_RSS_L3_PRE48 }, >> +    { "l3-pre40", RTE_ETH_RSS_L3_PRE40 }, >> +    { "l3-pre32", RTE_ETH_RSS_L3_PRE32 }, >> +    { "l2-dst-only", RTE_ETH_RSS_L2_DST_ONLY }, >> +    { "l2-src-only", RTE_ETH_RSS_L2_SRC_ONLY }, >> +    { "l4-dst-only", RTE_ETH_RSS_L4_DST_ONLY }, >> +    { "l4-src-only", RTE_ETH_RSS_L4_SRC_ONLY }, >> +    { "l3-dst-only", RTE_ETH_RSS_L3_DST_ONLY }, >> +    { "l3-src-only", RTE_ETH_RSS_L3_SRC_ONLY }, >> +    { NULL, 0}, >>   }; >>     static const struct { > > .