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 32686A0545; Mon, 20 Jun 2022 14:39:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 246E14069C; Mon, 20 Jun 2022 14:39:03 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2065.outbound.protection.outlook.com [40.107.94.65]) by mails.dpdk.org (Postfix) with ESMTP id 7AF1440151 for ; Mon, 20 Jun 2022 14:39:01 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LSI2/ez4zy8MdUlo4Csm/RZlrR5SgeVdeQVHz9HkiB7EFfhhsqNd2XFyPHEJW+hf7jmkyP4RRDO31iElMrl4fYwY8oPgNRQygiZUk90V2sWtyePBmed1ZnH5eUlENDj9HDLegzooi4lqiKQn0jbYLBh02mjPqkcPC/o2E0xjcDmzO5QHBPi0AAIYhxXvMpl64b66157xgqm4A3CD3rYtH0uPe4kxkLIu77DPU6IhqJSunE6lwZFnShQMJOMX6WIZyNDzuvpLY0s4xuuetknNse4G6d+piTSdMXD9QWnWVUMeJwd1M0CNPVWxnMQ2KtI/XsRsDFNYMjf5qhK/8Bx5ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=C8tzU52Y9Z4vv9uJ+V2z3ayDAu5UyHNiN0JMOsGiPdE=; b=n4vZDMvp2iBp4xkB9SFzYLeR1h0BXKndDC0B0aJL+Ggh8H4Y0F0MtQNZGvDttSIQXmTWJBSuCJEQ79JdJEBaqptRKXmecjBFTjame9d0YOJOFg6qBa9G0U/YzXlfVWzNGRmPFtvgwaH7Ob8tg7ZUj5XR79lI3YIuk/Qpi/4z4fC/09iGRbC8Dud04FhMpzPO8vKauioKppSTqlkAr06aFlDJZ+heTFrULdaHj/Sz37joD3pwEA22E6wGcqHcsomX7EO5nCLoYnBC3iZ/mU14ASdVwxTcGIkTRDqWwgKXAJdrNvP+r9O6DBu3M9DI2IGItbQRqy4fzMPvvJX25MJ1FQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.80.198) smtp.rcpttodomain=huawei.com smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C8tzU52Y9Z4vv9uJ+V2z3ayDAu5UyHNiN0JMOsGiPdE=; b=bSUbQquaWN8jBmASbJ7/+Tvk+x4i/rTyId7m/GjvmA6uqMuwbEEUl3cNg2We7UTx5NFn5GDx8/+bVHxaNttKZXKYhgFiKky4BKSxC/SWUpZbjrdDUv8mlHPDwfIS260KPoiHsLDImmIk/n34lm5mX4jQJrtcC7VH6mZRMH/D4CE= Received: from SA0PR11CA0071.namprd11.prod.outlook.com (2603:10b6:806:d2::16) by DM6PR02MB6121.namprd02.prod.outlook.com (2603:10b6:5:1ff::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.18; Mon, 20 Jun 2022 12:38:58 +0000 Received: from SN1NAM02FT0031.eop-nam02.prod.protection.outlook.com (2603:10b6:806:d2:cafe::f3) by SA0PR11CA0071.outlook.office365.com (2603:10b6:806:d2::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.14 via Frontend Transport; Mon, 20 Jun 2022 12:38:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.80.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.80.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.80.198; helo=xir-pvapexch01.xlnx.xilinx.com; pr=C Received: from xir-pvapexch01.xlnx.xilinx.com (149.199.80.198) by SN1NAM02FT0031.mail.protection.outlook.com (10.97.4.64) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5353.14 via Frontend Transport; Mon, 20 Jun 2022 12:38:56 +0000 Received: from xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) by xir-pvapexch01.xlnx.xilinx.com (172.21.17.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Mon, 20 Jun 2022 13:38:55 +0100 Received: from smtp.xilinx.com (172.21.105.198) by xir-pvapexch02.xlnx.xilinx.com (172.21.17.17) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Mon, 20 Jun 2022 13:38:55 +0100 Envelope-to: lihuisong@huawei.com, xiaoyun.li@intel.com, aman.deep.singh@intel.com, yuying.zhang@intel.com, andrew.rybchenko@oktetlabs.ru, dev@dpdk.org, thomas@monjalon.net, huangdaode@huawei.com Received: from [10.71.119.54] (port=60915) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1o3GgB-0003Yq-66; Mon, 20 Jun 2022 13:38:55 +0100 Message-ID: <1b05f308-d313-6e62-0a4f-76f2f6dfc918@xilinx.com> Date: Mon, 20 Jun 2022 13:38:54 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH V3 app/testpmd 4/4] app/testpmd: remove duplicated flow type to string table Content-Language: en-US To: "lihuisong (C)" , , , , CC: , , References: <20220429102445.23711-1-lihuisong@huawei.com> <20220607083246.12259-1-lihuisong@huawei.com> <20220607083246.12259-5-lihuisong@huawei.com> <20a69b54-40ca-f1be-3253-4f5aed741919@huawei.com> From: Ferruh Yigit In-Reply-To: <20a69b54-40ca-f1be-3253-4f5aed741919@huawei.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8e7f8397-a161-406f-1826-08da52b9d800 X-MS-TrafficTypeDiagnostic: DM6PR02MB6121:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 91uMbdbgV7h3zFjwzeXPMztDIch7S5gs/n5ETFBlui+eXkm8xRmlaH65sLBU5VKVGkmac5Tmwi6nmj8M9+/O+oOk5ecEbPEkjM5lzQN+V5g/eAjNjngWkX8lDAAUAcQ2NlJNdg5GEAUyrYhqBv00HZn9SUNzaZEEfZ/C/ieDZGtBvXSDHg4Pn1ktMJKT3JIoathcRy62i7OFuYNo7uXXfQYThGs9v3G2wAiGQPfWlV8ruaFrxhMfJk6pEdtrXhT+jSWviigEEJdyRH2sCWBmzWT6RSampqHq/6+daTO5T1U4c3DFyHEwJJYq+lQEwzO+YdBPVk1Iv/Rj62EdR3o2p5AyVW37xLqmYI31zHwr8fxkkoytRNiHgHeM43fAg13t9YpI0Pyw5RsEaCCuEoQW+FlcLrIeZsGqgmM67DI9SAlhmaU+6pq2Q5mQpURdPtOkellCK4FbXrI+Bvy9trFTlYBjmgYMOtNjLU0v8WYCTOfSfcKPPUAH5ZSskCNAtl0jBkQt7f4c3Sx7ynKCMV7pDtXX6ZRE1EGXpLdt9rphWGZvsDVsSRQ/4ycLwTnwc0hfB4nEXCk18tiaxWUK05EbvZ4KffAW1LRqw/RGTpMdMXcNMngdV92Wvqug9a5x65kf7/o/c+1Wua3pVPOAmR4k54AuYvZH22WgkJ3X+alkTdH9lvHyYkCxCArRRgwdYSqA06N4SaKsXgYo95lDKpIO9ysrLnBxkgCM9FDUADxOzUs7xrpmghJlqJWolkTsK8n67ifdfPl4l7kbxyiZcgpd/g== X-Forefront-Antispam-Report: CIP:149.199.80.198; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:xir-pvapexch01.xlnx.xilinx.com; PTR:unknown-80-198.xilinx.com; CAT:NONE; SFS:(13230016)(4636009)(346002)(39860400002)(136003)(376002)(396003)(36840700001)(46966006)(40470700004)(110136005)(478600001)(2906002)(316002)(44832011)(54906003)(53546011)(8936002)(5660300002)(31696002)(26005)(9786002)(31686004)(36756003)(41300700001)(2616005)(70206006)(70586007)(8676002)(4326008)(40480700001)(336012)(83380400001)(47076005)(426003)(186003)(82740400003)(82310400005)(356005)(36860700001)(40460700003)(7636003)(50156003)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jun 2022 12:38:56.9846 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8e7f8397-a161-406f-1826-08da52b9d800 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.80.198]; Helo=[xir-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: SN1NAM02FT0031.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR02MB6121 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 On 6/9/2022 4:26 AM, lihuisong (C) wrote: > CAUTION: This message has originated from an External Source. Please use > proper judgment and caution when opening attachments, clicking links, or > responding to this email. > > > 在 2022/6/7 23:47, Ferruh Yigit 写道: >> On 6/7/2022 9:32 AM, Huisong Li wrote: >> >>> >>> From: Ferruh Yigit >>> >>> Flow type table has two instance, one is used for flow type to string >>> conversion, and other is used for string to flow type conversion. >>> And tables are diverged by time. >>> >>> Unifying tables to prevent maintaining two different tables. >>> >>> Note: made 'flowtype_to_str()' non-static to prevent build error for the >>> case PMDs using it disables. Making function generic, not for some PMDs. >>> >>> Signed-off-by: Ferruh Yigit >>> Signed-off-by: Huisong Li >>> --- >>>   app/test-pmd/cmdline.c | 41 +------------------ >>>   app/test-pmd/config.c  | 92 +++++++++++++++++++++++++++--------------- >>>   app/test-pmd/testpmd.h |  5 +++ >>>   3 files changed, 65 insertions(+), 73 deletions(-) >>> >>> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c >>> index fdd0cada3b..e44bb3f475 100644 >>> --- a/app/test-pmd/cmdline.c >>> +++ b/app/test-pmd/cmdline.c >>> @@ -10591,45 +10591,6 @@ do { \ >>> >>>   #ifdef RTE_NET_I40E >>> >>> -static uint16_t >>> -str2flowtype(char *string) >>> -{ >>> -       uint8_t i = 0; >>> -       static const struct { >>> -               char str[32]; >>> -               uint16_t type; >>> -       } flowtype_str[] = { >>> -               {"raw", RTE_ETH_FLOW_RAW}, >>> -               {"ipv4", RTE_ETH_FLOW_IPV4}, >>> -               {"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4}, >>> -               {"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP}, >>> -               {"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP}, >>> -               {"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP}, >>> -               {"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER}, >>> -               {"ipv6", RTE_ETH_FLOW_IPV6}, >>> -               {"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6}, >>> -               {"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP}, >>> -               {"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP}, >>> -               {"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP}, >>> -               {"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER}, >>> -               {"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD}, >>> -               {"ipv6-ex", RTE_ETH_FLOW_IPV6_EX}, >>> -               {"ipv6-tcp-ex", RTE_ETH_FLOW_IPV6_TCP_EX}, >>> -               {"ipv6-udp-ex", RTE_ETH_FLOW_IPV6_UDP_EX}, >>> -               {"gtpu", RTE_ETH_FLOW_GTPU}, >>> -       }; >>> - >>> -       for (i = 0; i < RTE_DIM(flowtype_str); i++) { >>> -               if (!strcmp(flowtype_str[i].str, string)) >>> -                       return flowtype_str[i].type; >>> -       } >>> - >>> -       if (isdigit(string[0]) && atoi(string) > 0 && atoi(string) < 64) >>> -               return (uint16_t)atoi(string); >>> - >>> -       return RTE_ETH_FLOW_UNKNOWN; >>> -} >>> - >>>   /* *** deal with flow director filter *** */ >>>   struct cmd_flow_director_result { >>>          cmdline_fixed_string_t flow_director_filter; >>> @@ -10658,7 +10619,7 @@ cmd_flow_director_filter_parsed(void >>> *parsed_result, >>>          struct rte_pmd_i40e_flow_type_mapping >>>                          mapping[RTE_PMD_I40E_FLOW_TYPE_MAX]; >>>          struct rte_pmd_i40e_pkt_template_conf conf; >>> -       uint16_t flow_type = str2flowtype(res->flow_type); >>> +       uint16_t flow_type = str_to_flowtype(res->flow_type); >>>          uint16_t i, port = res->port_id; >>>          uint8_t add; >>> >>> diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c >>> index 209cbcc514..ed0be8036b 100644 >>> --- a/app/test-pmd/config.c >>> +++ b/app/test-pmd/config.c >>> @@ -86,6 +86,38 @@ static const struct { >>>          }, >>>   }; >>> >>> +#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) >>> + >> >> Although right now 'flowtype_to_str()' & 'str_to_flowtype()' are used >> by code for above PMDs, the functionality is nothing special to any PMD. >> What about making above functions as non-static functions and get rid >> of all related #ifdef? >> > Currently, they are not used anywhere but here. If remove #ifdef, a > warning will encounter. If you make functions non-static, I think there won't be any warnings. It is better to make functionality more generic, instead of PMD specific. >> >>> +static const struct { >>> +       char str[32]; >>> +       uint16_t ftype; >>> +} flowtype_str_table[] = { >>> +       {"raw", RTE_ETH_FLOW_RAW}, >>> +       {"ipv4", RTE_ETH_FLOW_IPV4}, >>> +       {"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4}, >>> +       {"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP}, >>> +       {"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP}, >>> +       {"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP}, >>> +       {"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER}, >>> +       {"ipv6", RTE_ETH_FLOW_IPV6}, >>> +       {"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6}, >>> +       {"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP}, >>> +       {"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP}, >>> +       {"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP}, >>> +       {"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER}, >>> +       {"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD}, >>> +       {"ipv6-ex", RTE_ETH_FLOW_IPV6_EX}, >>> +       {"ipv6-tcp-ex", RTE_ETH_FLOW_IPV6_TCP_EX}, >>> +       {"ipv6-udp-ex", RTE_ETH_FLOW_IPV6_UDP_EX}, >>> +       {"port", RTE_ETH_FLOW_PORT}, >>> +       {"vxlan", RTE_ETH_FLOW_VXLAN}, >>> +       {"geneve", RTE_ETH_FLOW_GENEVE}, >>> +       {"nvgre", RTE_ETH_FLOW_NVGRE}, >>> +       {"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE}, >>> +       {"gtpu", RTE_ETH_FLOW_GTPU}, >>> +}; >>> +#endif >>> + >>>   const struct rss_type_info rss_offload_table[] = { >>>          {"ipv4", RTE_ETH_RSS_IPV4}, >>>          {"ipv4-frag", RTE_ETH_RSS_FRAG_IPV4}, >>> @@ -5713,41 +5745,35 @@ set_record_burst_stats(uint8_t on_off) >>>          record_burst_stats = on_off; >>>   } >>> >>> +#ifdef RTE_NET_I40E >>> + >>> +uint16_t >>> +str_to_flowtype(const char *string) >>> +{ >>> +       uint8_t i; >>> + >>> +       for (i = 0; i < RTE_DIM(flowtype_str_table); i++) { >>> +               if (!strcmp(flowtype_str_table[i].str, string)) >>> +                       return flowtype_str_table[i].ftype; >>> +       } >>> + >>> +       if (isdigit(string[0])) { >>> +               int val = atoi(string); >>> +               if (val > 0 && val < 64) >>> +                       return (uint16_t)val; >>> +       } >>> + >>> +       return RTE_ETH_FLOW_UNKNOWN; >>> +} >>> + >>> +#endif /* RTE_NET_I40E */ >>> + >>>   #if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) >>> -static char* >>> + >>> +static const char* >>>   flowtype_to_str(uint16_t flow_type) >>>   { >>> -       struct flow_type_info { >>> -               char str[32]; >>> -               uint16_t ftype; >>> -       }; >>> - >>>          uint8_t i; >>> -       static struct flow_type_info flowtype_str_table[] = { >>> -               {"raw", RTE_ETH_FLOW_RAW}, >>> -               {"ipv4", RTE_ETH_FLOW_IPV4}, >>> -               {"ipv4-frag", RTE_ETH_FLOW_FRAG_IPV4}, >>> -               {"ipv4-tcp", RTE_ETH_FLOW_NONFRAG_IPV4_TCP}, >>> -               {"ipv4-udp", RTE_ETH_FLOW_NONFRAG_IPV4_UDP}, >>> -               {"ipv4-sctp", RTE_ETH_FLOW_NONFRAG_IPV4_SCTP}, >>> -               {"ipv4-other", RTE_ETH_FLOW_NONFRAG_IPV4_OTHER}, >>> -               {"ipv6", RTE_ETH_FLOW_IPV6}, >>> -               {"ipv6-frag", RTE_ETH_FLOW_FRAG_IPV6}, >>> -               {"ipv6-tcp", RTE_ETH_FLOW_NONFRAG_IPV6_TCP}, >>> -               {"ipv6-udp", RTE_ETH_FLOW_NONFRAG_IPV6_UDP}, >>> -               {"ipv6-sctp", RTE_ETH_FLOW_NONFRAG_IPV6_SCTP}, >>> -               {"ipv6-other", RTE_ETH_FLOW_NONFRAG_IPV6_OTHER}, >>> -               {"l2_payload", RTE_ETH_FLOW_L2_PAYLOAD}, >>> -               {"ipv6-ex", RTE_ETH_FLOW_IPV6_EX}, >>> -               {"ipv6-tcp-ex", RTE_ETH_FLOW_IPV6_TCP_EX}, >>> -               {"ipv6-udp-ex", RTE_ETH_FLOW_IPV6_UDP_EX}, >>> -               {"port", RTE_ETH_FLOW_PORT}, >>> -               {"vxlan", RTE_ETH_FLOW_VXLAN}, >>> -               {"geneve", RTE_ETH_FLOW_GENEVE}, >>> -               {"nvgre", RTE_ETH_FLOW_NVGRE}, >>> -               {"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE}, >>> -               {"gtpu", RTE_ETH_FLOW_GTPU}, >>> -       }; >>> >>>          for (i = 0; i < RTE_DIM(flowtype_str_table); i++) { >>>                  if (flowtype_str_table[i].ftype == flow_type) >>> @@ -5821,7 +5847,7 @@ print_fdir_flex_mask(struct >>> rte_eth_fdir_flex_conf *flex_conf, uint32_t num) >>>   { >>>          struct rte_eth_fdir_flex_mask *mask; >>>          uint32_t i, j; >>> -       char *p; >>> +       const char *p; >>> >>>          for (i = 0; i < flex_conf->nb_flexmasks; i++) { >>>                  mask = &flex_conf->flex_mask[i]; >>> @@ -5837,7 +5863,7 @@ static inline void >>>   print_fdir_flow_type(uint32_t flow_types_mask) >>>   { >>>          int i; >>> -       char *p; >>> +       const char *p; >>> >>>          for (i = RTE_ETH_FLOW_UNKNOWN; i < RTE_ETH_FLOW_MAX; i++) { >>>                  if (!(flow_types_mask & (1 << i))) >>> diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h >>> index 6693813dda..b7931a2bee 100644 >>> --- a/app/test-pmd/testpmd.h >>> +++ b/app/test-pmd/testpmd.h >>> @@ -1086,6 +1086,11 @@ void pmd_test_exit(void); >>>   #if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE) >>>   void fdir_get_infos(portid_t port_id); >>>   #endif >>> + >>> +#ifdef RTE_NET_I40E >>> +uint16_t str_to_flowtype(const char *string); >>> +#endif >>> + >>>   void fdir_set_flex_mask(portid_t port_id, >>>                             struct rte_eth_fdir_flex_mask *cfg); >>>   void fdir_set_flex_payload(portid_t port_id, >>> -- >>> 2.33.0 >>> >> >> .