DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: fix str2flowtype not used warnings
@ 2020-11-24 11:49 Viacheslav Ovsiienko
  2020-11-24 13:22 ` Ferruh Yigit
  0 siblings, 1 reply; 3+ messages in thread
From: Viacheslav Ovsiienko @ 2020-11-24 11:49 UTC (permalink / raw)
  To: dev; +Cc: thomas, ferruh.yigit

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(-)

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;
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] app/testpmd: fix str2flowtype not used warnings
  2020-11-24 11:49 [dpdk-dev] [PATCH] app/testpmd: fix str2flowtype not used warnings Viacheslav Ovsiienko
@ 2020-11-24 13:22 ` Ferruh Yigit
  2020-11-26  0:01   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2020-11-24 13:22 UTC (permalink / raw)
  To: Viacheslav Ovsiienko, dev; +Cc: thomas

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>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] app/testpmd: fix str2flowtype not used warnings
  2020-11-24 13:22 ` Ferruh Yigit
@ 2020-11-26  0:01   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2020-11-26  0:01 UTC (permalink / raw)
  To: Viacheslav Ovsiienko; +Cc: dev, Ferruh Yigit

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-26  0:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-24 11:49 [dpdk-dev] [PATCH] app/testpmd: fix str2flowtype not used warnings Viacheslav Ovsiienko
2020-11-24 13:22 ` Ferruh Yigit
2020-11-26  0:01   ` Thomas Monjalon

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git