From patchwork Tue Nov 24 11:49:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Slava Ovsiienko X-Patchwork-Id: 84503 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 879BEA04B1; Tue, 24 Nov 2020 12:50:10 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 145D0C910; Tue, 24 Nov 2020 12:50:08 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id DEEFFC90E for ; Tue, 24 Nov 2020 12:50:06 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from viacheslavo@nvidia.com) with SMTP; 24 Nov 2020 13:50:01 +0200 Received: from nvidia.com (pegasus12.mtr.labs.mlnx [10.210.17.40]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0AOBo0eX013667; Tue, 24 Nov 2020 13:50:00 +0200 From: Viacheslav Ovsiienko To: dev@dpdk.org Cc: thomas@monjalon.net, ferruh.yigit@intel.com Date: Tue, 24 Nov 2020 11:49:56 +0000 Message-Id: <1606218596-17896-1-git-send-email-viacheslavo@nvidia.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] app/testpmd: fix str2flowtype not used warnings X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 Reviewed-by: Ferruh Yigit --- 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;