patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Jie Zhou <jizh@linux.microsoft.com>
To: dev@dpdk.org
Cc: dmitry.kozliuk@gmail.com, xiaoyun.li@intel.com,
	roretzla@microsoft.com, talshn@nvidia.com,
	pallavi.kadam@intel.com, thomas@monjalon.net,
	bruce.richardson@intel.com, ferruh.yigit@intel.com,
	konstantin.ananyev@intel.com, stable@dpdk.org
Subject: [dpdk-stable] [PATCH v10 09/10] app/testpmd: fix unused function warnings
Date: Mon,  3 May 2021 17:34:08 -0700	[thread overview]
Message-ID: <1620088449-14770-10-git-send-email-jizh@linux.microsoft.com> (raw)
In-Reply-To: <1620088449-14770-1-git-send-email-jizh@linux.microsoft.com>

Function print_fdir_mask and print_fdir_flex_payload is only called
when either i40e or ixgbe presents. Add #if defined to remove
"unused function" compilation warning.

Signed-off-by: Jie Zhou <jizh@microsoft.com>
Signed-off-by: Jie Zhou <jizh@linux.microsoft.com>
---
 app/test-pmd/config.c | 82 +++++++++++++++++++++----------------------
 1 file changed, 41 insertions(+), 41 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 099bfa3c9..7c908ea48 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -4364,6 +4364,47 @@ set_record_burst_stats(uint8_t on_off)
 	record_burst_stats = on_off;
 }
 
+static 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},
+		{"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},
+	};
+
+	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
+		if (flowtype_str_table[i].ftype == flow_type)
+			return flowtype_str_table[i].str;
+	}
+
+	return NULL;
+}
+
+#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
+
 static inline void
 print_fdir_mask(struct rte_eth_fdir_masks *mask)
 {
@@ -4423,47 +4464,6 @@ print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 	printf("\n");
 }
 
-static 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},
-		{"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},
-	};
-
-	for (i = 0; i < RTE_DIM(flowtype_str_table); i++) {
-		if (flowtype_str_table[i].ftype == flow_type)
-			return flowtype_str_table[i].str;
-	}
-
-	return NULL;
-}
-
-#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)
-
 static inline void
 print_fdir_flex_mask(struct rte_eth_fdir_flex_conf *flex_conf, uint32_t num)
 {
-- 
2.30.0.vfs.0.2


  parent reply	other threads:[~2021-05-04  0:34 UTC|newest]

Thread overview: 110+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1619805162-10684-1-git-send-email-jizh@linux.microsoft.com>
2021-05-04  0:33 ` [dpdk-stable] [PATCH v10 00/10] app/testpmd: enable testpmd on Windows Jie Zhou
2021-05-04  0:34   ` [dpdk-stable] [PATCH v10 01/10] lib: build libraries that testpmd depends on Jie Zhou
2021-05-04  0:34   ` [dpdk-stable] [PATCH v10 02/10] eal/windows: add necessary macros Jie Zhou
2021-05-04  0:34   ` [dpdk-stable] [PATCH v10 03/10] eal/windows: add device event stubs Jie Zhou
2021-05-04  0:34   ` [dpdk-stable] [PATCH v10 04/10] eal/Windows: add clock_gettime on Windows Jie Zhou
2021-05-04  0:34   ` [dpdk-stable] [PATCH v10 05/10] app/testpmd: resolve name collisions Jie Zhou
2021-05-04  0:34   ` [dpdk-stable] [PATCH v10 06/10] app/testpmd: fix parse_fec_mode return type name Jie Zhou
2021-05-04  0:34   ` [dpdk-stable] [PATCH v10 07/10] app/testpmd: replace POSIX specific code Jie Zhou
2021-05-05  8:34     ` Tal Shnaiderman
2021-05-05 16:09       ` Jie Zhou
2021-05-05 16:41         ` [dpdk-stable] [dpdk-dev] " Jie Zhou
2021-05-04  0:34   ` [dpdk-stable] [PATCH v10 08/10] app/testpmd: fix headers inclusion Jie Zhou
2021-05-04  0:34   ` Jie Zhou [this message]
2021-05-04  0:34   ` [dpdk-stable] [PATCH v10 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
2021-05-04  7:31   ` [dpdk-stable] [PATCH v10 00/10] app/testpmd: enable " Thomas Monjalon
2021-05-05 16:00     ` Jie Zhou
2021-05-04 23:51   ` Kadam, Pallavi
2021-05-05 17:18   ` [dpdk-stable] [PATCH v11 " Jie Zhou
2021-05-05 17:18     ` [dpdk-stable] [PATCH v11 01/10] lib: build libraries that testpmd depends on Jie Zhou
2021-05-05 17:18     ` [dpdk-stable] [PATCH v11 02/10] eal/windows: add necessary macros Jie Zhou
2021-05-05 17:18     ` [dpdk-stable] [PATCH v11 03/10] eal/windows: add device event stubs Jie Zhou
2021-05-05 17:18     ` [dpdk-stable] [PATCH v11 04/10] eal/Windows: add clock_gettime on Windows Jie Zhou
2021-05-05 17:18     ` [dpdk-stable] [PATCH v11 05/10] app/testpmd: resolve name collisions Jie Zhou
2021-05-05 17:18     ` [dpdk-stable] [PATCH v11 06/10] app/testpmd: fix parse_fec_mode return type name Jie Zhou
2021-05-05 17:18     ` [dpdk-stable] [PATCH v11 07/10] app/testpmd: replace POSIX specific code Jie Zhou
2021-05-05 17:18     ` [dpdk-stable] [PATCH v11 08/10] app/testpmd: fix headers inclusion Jie Zhou
2021-05-05 17:18     ` [dpdk-stable] [PATCH v11 09/10] app/testpmd: fix unused function warnings Jie Zhou
2021-05-05 17:18     ` [dpdk-stable] [PATCH v11 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
2021-05-05 17:36     ` [dpdk-stable] [PATCH v12 00/10] app/testpmd: enable " Jie Zhou
2021-05-05 17:36       ` [dpdk-stable] [PATCH v12 01/10] lib: build libraries that testpmd depends on Jie Zhou
2021-05-05 17:36       ` [dpdk-stable] [PATCH v12 02/10] eal/windows: add necessary macros Jie Zhou
2021-05-05 17:36       ` [dpdk-stable] [PATCH v12 03/10] eal/windows: add device event stubs Jie Zhou
2021-05-05 17:36       ` [dpdk-stable] [PATCH v12 04/10] eal/Windows: add clock_gettime on Windows Jie Zhou
2021-05-05 17:36       ` [dpdk-stable] [PATCH v12 05/10] app/testpmd: resolve name collisions Jie Zhou
2021-05-05 17:36       ` [dpdk-stable] [PATCH v12 06/10] app/testpmd: fix parse_fec_mode return type name Jie Zhou
2021-05-05 17:36       ` [dpdk-stable] [PATCH v12 07/10] app/testpmd: replace POSIX specific code Jie Zhou
2021-05-05 17:36       ` [dpdk-stable] [PATCH v12 08/10] app/testpmd: fix headers inclusion Jie Zhou
2021-05-05 17:36       ` [dpdk-stable] [PATCH v12 09/10] app/testpmd: fix unused function warnings Jie Zhou
2021-05-05 17:36       ` [dpdk-stable] [PATCH v12 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
2021-05-05 19:12       ` [dpdk-stable] [PATCH v13 00/10] app/testpmd: enable " Jie Zhou
2021-05-05 19:12         ` [dpdk-stable] [PATCH v13 01/10] lib: build libraries that testpmd depends on Jie Zhou
2021-05-05 19:12         ` [dpdk-stable] [PATCH v13 02/10] eal/windows: add necessary macros Jie Zhou
2021-06-20 23:28           ` Dmitry Kozlyuk
2021-06-23 20:51             ` Jie Zhou
2021-05-05 19:12         ` [dpdk-stable] [PATCH v13 03/10] eal/windows: add device event stubs Jie Zhou
2021-06-20 23:28           ` Dmitry Kozlyuk
2021-05-05 19:12         ` [dpdk-stable] [PATCH v13 04/10] eal/Windows: add clock_gettime on Windows Jie Zhou
2021-06-20 23:30           ` Dmitry Kozlyuk
2021-06-23 20:57             ` Jie Zhou
2021-05-05 19:12         ` [dpdk-stable] [PATCH v13 05/10] app/testpmd: resolve name collisions Jie Zhou
2021-06-20 23:30           ` Dmitry Kozlyuk
2021-05-05 19:12         ` [dpdk-stable] [PATCH v13 06/10] app/testpmd: fix parse_fec_mode return type name Jie Zhou
2021-05-05 19:12         ` [dpdk-stable] [PATCH v13 07/10] app/testpmd: replace POSIX specific code Jie Zhou
2021-05-05 19:12         ` [dpdk-stable] [PATCH v13 08/10] app/testpmd: fix headers inclusion Jie Zhou
2021-06-20 23:30           ` Dmitry Kozlyuk
2021-06-23 20:58             ` Jie Zhou
2021-05-05 19:12         ` [dpdk-stable] [PATCH v13 09/10] app/testpmd: fix unused function warnings Jie Zhou
2021-06-20 23:30           ` Dmitry Kozlyuk
2021-06-23 21:26             ` Jie Zhou
2021-06-24 15:45               ` [dpdk-stable] [dpdk-dev] " Tyler Retzlaff
2021-06-24 18:44                 ` Dmitry Kozlyuk
2021-06-24 21:36                   ` Jie Zhou
2021-05-05 19:12         ` [dpdk-stable] [PATCH v13 10/10] app/testpmd: enable building testpmd on Windows Jie Zhou
2021-06-20 23:30           ` Dmitry Kozlyuk
2021-05-06  7:20         ` [dpdk-stable] [PATCH v13 00/10] app/testpmd: enable " Tal Shnaiderman
2021-06-23 22:34         ` [dpdk-stable] [PATCH v14 0/9] " Jie Zhou
2021-06-23 22:34           ` [dpdk-stable] [PATCH v14 1/9] lib: build libraries that testpmd depends on Jie Zhou
2021-06-24 23:10             ` Dmitry Kozlyuk
2021-06-28 10:01             ` Andrew Rybchenko
2021-06-28 10:35               ` [dpdk-stable] [dpdk-dev] " Andrew Rybchenko
2021-06-28 14:10                 ` Tyler Retzlaff
2021-06-29 18:29                   ` Jie Zhou
2021-06-23 22:34           ` [dpdk-stable] [PATCH v14 2/9] eal/windows: add necessary macros Jie Zhou
2021-06-24 23:10             ` Dmitry Kozlyuk
2021-06-23 22:34           ` [dpdk-stable] [PATCH v14 3/9] eal/windows: add device event stubs Jie Zhou
2021-06-23 22:34           ` [dpdk-stable] [PATCH v14 4/9] eal/Windows: add clock_gettime on Windows Jie Zhou
2021-06-24 23:10             ` Dmitry Kozlyuk
2021-06-23 22:34           ` [dpdk-stable] [PATCH v14 5/9] app/testpmd: resolve name collisions Jie Zhou
2021-06-23 22:34           ` [dpdk-stable] [PATCH v14 6/9] app/testpmd: fix parse_fec_mode return type name Jie Zhou
2021-06-28 10:55             ` Andrew Rybchenko
2021-06-28 14:29               ` [dpdk-stable] [dpdk-dev] " Tyler Retzlaff
2021-06-29 18:34                 ` Jie Zhou
2021-06-23 22:34           ` [dpdk-stable] [PATCH v14 7/9] app/testpmd: replace POSIX specific code Jie Zhou
2021-06-24 23:10             ` Dmitry Kozlyuk
2021-06-23 22:34           ` [dpdk-stable] [PATCH v14 8/9] app/testpmd: fix unused function warnings Jie Zhou
2021-06-24 23:10             ` Dmitry Kozlyuk
2021-06-23 22:34           ` [dpdk-stable] [PATCH v14 9/9] app/testpmd: enable building testpmd on Windows Jie Zhou
2021-06-29 20:23           ` [dpdk-stable] [PATCH v15 0/9] app/testpmd: enable " Jie Zhou
2021-06-29 20:23             ` [dpdk-stable] [PATCH v15 1/9] lib: build libraries that testpmd depends on Jie Zhou
2021-06-29 20:23             ` [dpdk-stable] [PATCH v15 2/9] eal/windows: add necessary macros Jie Zhou
2021-06-29 20:23             ` [dpdk-stable] [PATCH v15 3/9] eal/windows: add device event stubs Jie Zhou
2021-06-29 20:23             ` [dpdk-stable] [PATCH v15 4/9] eal/Windows: add clock_gettime on Windows Jie Zhou
2021-06-29 20:23             ` [dpdk-stable] [PATCH v15 5/9] app/testpmd: resolve name collisions Jie Zhou
2021-06-29 20:23             ` [dpdk-stable] [PATCH v15 6/9] app/testpmd: fix parse_fec_mode return type name Jie Zhou
2021-06-29 20:23             ` [dpdk-stable] [PATCH v15 7/9] app/testpmd: replace POSIX specific code Jie Zhou
2021-06-29 20:23             ` [dpdk-stable] [PATCH v15 8/9] app/testpmd: fix unused function warnings Jie Zhou
2021-06-29 20:23             ` [dpdk-stable] [PATCH v15 9/9] app/testpmd: enable building testpmd on Windows Jie Zhou
2021-06-29 20:50             ` [dpdk-stable] [PATCH v16 0/9] app/testpmd: enable " Jie Zhou
2021-06-29 20:50               ` [dpdk-stable] [PATCH v16 1/9] lib: build libraries that testpmd depends on Jie Zhou
2021-06-29 20:50               ` [dpdk-stable] [PATCH v16 2/9] eal/windows: add necessary macros Jie Zhou
2021-06-29 20:50               ` [dpdk-stable] [PATCH v16 3/9] eal/windows: add device event stubs Jie Zhou
2021-06-29 20:50               ` [dpdk-stable] [PATCH v16 4/9] eal/Windows: add clock_gettime on Windows Jie Zhou
2021-06-29 20:50               ` [dpdk-stable] [PATCH v16 5/9] app/testpmd: resolve name collisions Jie Zhou
2021-07-01 13:41                 ` Andrew Rybchenko
2021-06-29 20:50               ` [dpdk-stable] [PATCH v16 6/9] app/testpmd: fix parse_fec_mode return type name Jie Zhou
2021-07-01 13:34                 ` Andrew Rybchenko
2021-06-29 20:50               ` [dpdk-stable] [PATCH v16 7/9] app/testpmd: replace POSIX specific code Jie Zhou
2021-06-29 20:50               ` [dpdk-stable] [PATCH v16 8/9] app/testpmd: fix unused function warnings Jie Zhou
2021-06-29 20:50               ` [dpdk-stable] [PATCH v16 9/9] app/testpmd: enable building testpmd on Windows Jie Zhou
2021-07-01 13:49               ` [dpdk-stable] [PATCH v16 0/9] app/testpmd: enable " Andrew Rybchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1620088449-14770-10-git-send-email-jizh@linux.microsoft.com \
    --to=jizh@linux.microsoft.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=dmitry.kozliuk@gmail.com \
    --cc=ferruh.yigit@intel.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=pallavi.kadam@intel.com \
    --cc=roretzla@microsoft.com \
    --cc=stable@dpdk.org \
    --cc=talshn@nvidia.com \
    --cc=thomas@monjalon.net \
    --cc=xiaoyun.li@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).