From: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, ferruh.yigit@intel.com
Subject: [dpdk-dev] [PATCH] app/testpmd: fix str2flowtype not used warnings
Date: Tue, 24 Nov 2020 11:49:56 +0000 [thread overview]
Message-ID: <1606218596-17896-1-git-send-email-viacheslavo@nvidia.com> (raw)
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
next reply other threads:[~2020-11-24 11:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-24 11:49 Viacheslav Ovsiienko [this message]
2020-11-24 13:22 ` Ferruh Yigit
2020-11-26 0:01 ` Thomas Monjalon
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=1606218596-17896-1-git-send-email-viacheslavo@nvidia.com \
--to=viacheslavo@nvidia.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=thomas@monjalon.net \
/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).