From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D9834A0562; Mon, 3 May 2021 19:43:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5771740150; Mon, 3 May 2021 19:43:36 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2053.outbound.protection.outlook.com [40.107.92.53]) by mails.dpdk.org (Postfix) with ESMTP id 4FD8A4014E for ; Mon, 3 May 2021 19:43:35 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f+fC4mFvvO+iKdq4WTgjk6BD9TrjF1mM6yWEybqoBxa54OfAjT6fntHkILhthHNBPCsKJMkvUggOIBjO3RkuCaSGVQcneZwtKy2ffGNO8kcwE0XdLxKhOogEasqWGftTt8fwfClNK3vDYLSS4CkX6ttpabblSb5OlaWwrWPCBe4z1Jyo2GKUgxATlsH1XGQjGt2MdJfqEBsK8TvkeYd8hU/BunR3oE7LyJRwIH0CiKSlLjfyjhEz6R9opMlxC4LQWNxSuDj0PteZRuuts42xCvtKZ4wqi84ckM2bco9wyndnaKu3FInzxeDu+lc79pk+AZ/Snx6lPvk5fueN8pqr3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+7eiI9f1UDpjDH+qvz4Yr429Agwr1/NO2Hy/XwQhOLQ=; b=jCxBP4Vu+wo7wAeTlChYd+4DaI+XIrKCLktjG/tAHFCI2TZDuODr5q6qmiKgVPV3JqH3xWPLXtekOYSpjz2y5rsQO2Y71gNbP1P26Xp2YErwALzCB74NwPx5b9elT9rn43WauSLXV2Wvn4mlyh6At2P6HhIZ7WTH4qxPuBEec8aeAIpnDOinYKDBMgT73Wp/lDpDwUUOwNc8du56oERTHbAAxzfWTrenHRZQacCoCb8zUZTGDzeZc47n9/cNZjNqTJ9YBE1fanSKBgrVphAvEZpIN/aeTYdtEBUz8L/Kf1D3FKgU3nENltIIJ94/Q+ziWImWyc6kXZc+vVFtBffzkA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+7eiI9f1UDpjDH+qvz4Yr429Agwr1/NO2Hy/XwQhOLQ=; b=O0MfEZogKO3iygmLR2L+Nk0qfAUmOvfDCIhfiqy0S0cCsBz10SMSv/D9uWnqNYrDGwc9sGExTf6SIOxwNAD6w77M9fyAeG6ViGp6fNc4QtdoZeuKOGPV0XV+J921bNDkWgytw2Ukj7s9WWz8OBQWflUKsXXfHzlk0h9NTsdljXcczVGkTjBedbLMo3+N+7FpUhcKFseR1VlSgLOKZc/CrBt0e1jaIUl2wRhiBCyF8bL4c7IIA8gVmSeenYi+VYlHwcdZYDU+vemkvkCNX1s/Qw4iobg03/VRjfBcV7vOIXW9UMX7gr+HEAZYw2LiSvABcP/s9zR7FTHq57O22bHnBg== Received: from DM4PR12MB5389.namprd12.prod.outlook.com (2603:10b6:5:39a::7) by DM4PR12MB5280.namprd12.prod.outlook.com (2603:10b6:5:39d::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.25; Mon, 3 May 2021 17:43:33 +0000 Received: from DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::70df:ef1e:d98c:ce4]) by DM4PR12MB5389.namprd12.prod.outlook.com ([fe80::70df:ef1e:d98c:ce4%6]) with mapi id 15.20.4087.044; Mon, 3 May 2021 17:43:33 +0000 From: Tal Shnaiderman To: Jie Zhou , "dev@dpdk.org" CC: "dmitry.kozliuk@gmail.com" , "xiaoyun.li@intel.com" , "roretzla@microsoft.com" , "pallavi.kadam@intel.com" , NBU-Contact-Thomas Monjalon , "bruce.richardson@intel.com" , "ferruh.yigit@intel.com" , "konstantin.ananyev@intel.com" Thread-Topic: [PATCH v9 09/10] app/testpmd: fix unused function warnings Thread-Index: AQHXPemiD8kKQBcW602BvRqE8EhxJ6rSCMiw Date: Mon, 3 May 2021 17:43:32 +0000 Message-ID: References: <1619553721-5220-1-git-send-email-jizh@linux.microsoft.com> <1619805162-10684-1-git-send-email-jizh@linux.microsoft.com> <1619805162-10684-10-git-send-email-jizh@linux.microsoft.com> In-Reply-To: <1619805162-10684-10-git-send-email-jizh@linux.microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: linux.microsoft.com; dkim=none (message not signed) header.d=none;linux.microsoft.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [5.29.16.219] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 978c3c87-03f5-47fd-470f-08d90e5af897 x-ms-traffictypediagnostic: DM4PR12MB5280: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1751; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: J+ruSR6pNjfjDiN7IqXgPu1KHkSlG/CQZTMPnrxWSd/vXv7X2kwJle5cz8QzNTiwuBLMjqfODzop+6uGJrG5pRFSuC8DBLwlpeJnSER9Dw0zc9CLWXGQyVnpx6+e8T9/dtAQH8exZ9WRdvvYdge9lotCVqIuo/w8ysve0EAKAFl7PLM5QVt4x3E2js7jRcG91SZ72vxIHDpWyKSLku6V33Fh1NchWw787ryCDm5ivNyNnbQ330W5CuJScBNQp27qvhQUUf5CRacEEJLNOK50zC7/u8qRtXbWX8g4xst2RJlSpRA89CF7M4bssjUxHJaBZojePSMuU3rhqDkyITE+QRIsp6cw7n3IIko4vmGA+roaywdt0Fuj7x4ookLrLJUAMu1UpzAomroVtcKRTYR8lG84gCKMQDG02VjCy2dR/Xk7iUkHkVdQsRB/4/Z28xl4MhHfmze3LIvmPTFp/BOo2UAamgF/Jn03v86WzIAgMD4GDzVmLauCWMGsmxwAgrDpfkHklC6p5jIKgcm37mpca2bGA99MWf1l+sv869414ATtyCtigQb/qDrSelVQRWnAnc7wLV9vRZ2KG9YkKgjwu6ZlDYP0qKCGN5hMmkdM8ow= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB5389.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(346002)(396003)(376002)(366004)(39860400002)(136003)(186003)(7416002)(54906003)(26005)(38100700002)(122000001)(52536014)(2906002)(9686003)(7696005)(55016002)(86362001)(83380400001)(33656002)(110136005)(8936002)(6506007)(5660300002)(8676002)(316002)(71200400001)(478600001)(66556008)(66476007)(76116006)(4326008)(66446008)(64756008)(66946007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?kCZqJqvDnMBIg8XpqJhO0v2EGaQvDVt31yqj6bK8KzI7pjsExfGhCbyg3xNH?= =?us-ascii?Q?nRAMJWnLcgXXeXRnNXkOfVRT3irxbWFC5vH76XQxox88OicRqVhSR/eITJMq?= =?us-ascii?Q?zFpIXwg1yPaC2BDcA2JZJGZW0OpBhjvV94sQwqGHrtf0Qzxxj6Arq4e+Xc4I?= =?us-ascii?Q?bNAcxpypSmedpw7ASceEUX02APaBVCbQ+zJf8Cux7bufBXuQKisfF3uEAoWu?= =?us-ascii?Q?HhOdPlW4tyBEexFT1i1D8x6ebENMFPD/ywiBLiCF97wGpGryLTx0LgU5wX86?= =?us-ascii?Q?i/jbiaIgYXOiNUK30mfveaRyelZUc2HTda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qDCMeg1A/qiQTM+q7jAOMinz0pW3aHabgPqBGDOPDDfp2gj/4hbmwbKe?= =?us-ascii?Q?v1BMA/MjnxTWqTnub2p5j1dhj7n2GPX7EBiDG8QH3fioOaJOXu3dDq9Dx6Db?= =?us-ascii?Q?9wo=3D?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5389.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 978c3c87-03f5-47fd-470f-08d90e5af897 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 May 2021 17:43:32.8990 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: /usQ+nnhc3Q8lx96qoA/6g2sDk8vUeIE1RtRk3nt5bV3zHxJ1MDGCIeLOQuV3pj/4hm4sJH1QsQvGeMMM90LDw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5280 Subject: Re: [dpdk-dev] [PATCH v9 09/10] app/testpmd: fix unused function warnings X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" > Subject: [PATCH v9 09/10] app/testpmd: fix unused function warnings >=20 > External email: Use caution opening links or attachments >=20 >=20 > 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. >=20 > Signed-off-by: Jie Zhou > Signed-off-by: Jie Zhou > --- > app/test-pmd/config.c | 82 +++++++++++++++++++++---------------------- > 1 file changed, 41 insertions(+), 41 deletions(-) >=20 > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index > c626d5ce8..4eecad38f 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -4365,6 +4365,47 @@ set_record_burst_stats(uint8_t on_off) > record_burst_stats =3D on_off; > } >=20 > +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[] =3D { > + {"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 =3D 0; i < RTE_DIM(flowtype_str_table); i++) { > + if (flowtype_str_table[i].ftype =3D=3D 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) { @@ -4424,47 +4465,6 > @@ print_fdir_flex_payload(struct rte_eth_fdir_flex_conf *flex_conf, > uint32_t num) > printf("\n"); > } >=20 > -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[] =3D { > - {"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 =3D 0; i < RTE_DIM(flowtype_str_table); i++) { > - if (flowtype_str_table[i].ftype =3D=3D 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 Acked-by: Tal Shnaiderman