diff mbox series

app/testpmd: fix str2flowtype not used warnings

Message ID 1606218596-17896-1-git-send-email-viacheslavo@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers show
Series app/testpmd: fix str2flowtype not used warnings | expand

Checks

Context Check Description
ci/travis-robot success Travis build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch warning coding style issues

Commit Message

Viacheslav Ovsiienko Nov. 24, 2020, 11:49 a.m. UTC
If there was no RTE_NET_I40E configured the static routine
str2flowtype() was not used causing compilation warning.

The str2flowtype() is moved under #ifdef RTE_NET_I40E block.

Fixes: 1be514fbcea9 ("ethdev: remove legacy FDIR filter type support")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
 app/test-pmd/cmdline.c | 48 ++++++++++++++++++++++++------------------------
 1 file changed, 24 insertions(+), 24 deletions(-)

Comments

Ferruh Yigit Nov. 24, 2020, 1:22 p.m. UTC | #1
On 11/24/2020 11:49 AM, Viacheslav Ovsiienko wrote:
> If there was no RTE_NET_I40E configured the static routine
> str2flowtype() was not used causing compilation warning.
> 
> The str2flowtype() is moved under #ifdef RTE_NET_I40E block.
> 
> Fixes: 1be514fbcea9 ("ethdev: remove legacy FDIR filter type support")
> 
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Thomas Monjalon Nov. 26, 2020, 12:01 a.m. UTC | #2
24/11/2020 14:22, Ferruh Yigit:
> On 11/24/2020 11:49 AM, Viacheslav Ovsiienko wrote:
> > If there was no RTE_NET_I40E configured the static routine
> > str2flowtype() was not used causing compilation warning.
> > 
> > The str2flowtype() is moved under #ifdef RTE_NET_I40E block.
> > 
> > Fixes: 1be514fbcea9 ("ethdev: remove legacy FDIR filter type support")
> > 
> > Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied, thanks
diff mbox series

Patch

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index bde0de5..0d2d6aa 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -10097,6 +10097,30 @@  struct cmd_show_queue_region_info {
 
 /* *** Filters Control *** */
 
+#define IPV4_ADDR_TO_UINT(ip_addr, ip) \
+do { \
+	if ((ip_addr).family == AF_INET) \
+		(ip) = (ip_addr).addr.ipv4.s_addr; \
+	else { \
+		printf("invalid parameter.\n"); \
+		return; \
+	} \
+} while (0)
+
+#define IPV6_ADDR_TO_ARRAY(ip_addr, ip) \
+do { \
+	if ((ip_addr).family == AF_INET6) \
+		rte_memcpy(&(ip), \
+				 &((ip_addr).addr.ipv6), \
+				 sizeof(struct in6_addr)); \
+	else { \
+		printf("invalid parameter.\n"); \
+		return; \
+	} \
+} while (0)
+
+#ifdef RTE_NET_I40E
+
 static uint16_t
 str2flowtype(char *string)
 {
@@ -10132,30 +10156,6 @@  struct cmd_show_queue_region_info {
 	return RTE_ETH_FLOW_UNKNOWN;
 }
 
-#define IPV4_ADDR_TO_UINT(ip_addr, ip) \
-do { \
-	if ((ip_addr).family == AF_INET) \
-		(ip) = (ip_addr).addr.ipv4.s_addr; \
-	else { \
-		printf("invalid parameter.\n"); \
-		return; \
-	} \
-} while (0)
-
-#define IPV6_ADDR_TO_ARRAY(ip_addr, ip) \
-do { \
-	if ((ip_addr).family == AF_INET6) \
-		rte_memcpy(&(ip), \
-				 &((ip_addr).addr.ipv6), \
-				 sizeof(struct in6_addr)); \
-	else { \
-		printf("invalid parameter.\n"); \
-		return; \
-	} \
-} while (0)
-
-#ifdef RTE_NET_I40E
-
 /* *** deal with flow director filter *** */
 struct cmd_flow_director_result {
 	cmdline_fixed_string_t flow_director_filter;