From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 598DF1B483 for ; Mon, 22 Oct 2018 23:24:46 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Oct 2018 14:24:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,413,1534834800"; d="scan'208";a="274657049" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by fmsmga006.fm.intel.com with ESMTP; 22 Oct 2018 14:24:43 -0700 Received: from irsmsx106.ger.corp.intel.com ([169.254.8.45]) by IRSMSX103.ger.corp.intel.com ([169.254.3.248]) with mapi id 14.03.0319.002; Mon, 22 Oct 2018 22:24:42 +0100 From: "Ananyev, Konstantin" To: Thomas Monjalon , Andrew Rybchenko CC: "dev@dpdk.org" , "gaetan.rivet@6wind.com" , "ophirmu@mellanox.com" , "Yigit, Ferruh" , "olivier.matz@6wind.com" , "Horton, Remy" , "Richardson, Bruce" , "olivier.matz@6wind.com" Thread-Topic: [dpdk-dev] [PATCH v3 4/4] ethdev: support MAC address as iterator filter Thread-Index: AQHUagyPXVVvdaWpwUqUl03ZcsmuIqUrOtGAgACLZZA= Date: Mon, 22 Oct 2018 21:24:42 +0000 Message-ID: <2601191342CEEE43887BDE71AB9772580102FEB060@IRSMSX106.ger.corp.intel.com> References: <20181009021858.19216-1-thomas@monjalon.net> <20181022131530.6403-5-thomas@monjalon.net> <1600652.GbAxOGCmMO@xps> In-Reply-To: <1600652.GbAxOGCmMO@xps> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTA1MzRhMjUtODE5OC00MDU2LWFhY2EtOTAwMTE1MzBkZjYxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibHlmT3FuVlF4Q01RVEUxdUNOeHE5Mm9tMXdFV0g5UFpYUUd0XC9VR2krZ1FydVZYMjh6SXcxc1wvSGZ4OHMzdjNEIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3 4/4] ethdev: support MAC address as iterator filter 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: , X-List-Received-Date: Mon, 22 Oct 2018 21:24:47 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon > Sent: Monday, October 22, 2018 3:02 PM > To: Andrew Rybchenko > Cc: dev@dpdk.org; gaetan.rivet@6wind.com; ophirmu@mellanox.com; Yigit, Fe= rruh ; olivier.matz@6wind.com; > Horton, Remy ; Richardson, Bruce ; olivier.matz@6wind.com > Subject: Re: [dpdk-dev] [PATCH v3 4/4] ethdev: support MAC address as ite= rator filter >=20 > 22/10/2018 15:37, Andrew Rybchenko: > > On 10/22/18 4:15 PM, Thomas Monjalon wrote: > > > The MAC addresses of a port can be matched with devargs. > > > > > > As the conflict between rte_ether.h and netinet/ether.h is not resolv= ed, > > > the MAC parsing is done with a rte_cmdline function. > > > As a result, cmdline library becomes a dependency of ethdev. > > > > > > Signed-off-by: Thomas Monjalon > > > > I'd like to share my thought about a new dependency. > > Looking at cmdline I think that it is a bad and strange > > dependency for kvargs. IMHO, even duplication of the > > code to parse MAC address it less evil in this case. >=20 > cmdline is not a dependency for kvargs. > I have added it as a dependency for ethdev. >=20 > > May be it is possible to provide internal wrapper > > which is implemented using ether_aton_r() and located > > in a separate C file which does not include rte_ether.h etc? >=20 > I raised the issue in technical board and it has been decided to fix the > conflict with libc in the next release (with Olivier's help). > So Bruce and me decided to use cmdline function in the meantime. As I can see, cmdline_parse_etheraddr() uses=20 static struct ether_addr * my_ether_aton(const char *a) internally. Why not to make it public, rename to rte_ethet_aton(), and move into rte_net? And use that one instead? Later if/when we'll have name conflict with libc resolved, It can become just a wrapper around ether_aton_r(). Konstantin=20