From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id BFCBF2C2F for ; Thu, 7 Jul 2016 13:01:04 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga101.jf.intel.com with ESMTP; 07 Jul 2016 04:01:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,324,1464678000"; d="scan'208";a="135244916" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by fmsmga004.fm.intel.com with ESMTP; 07 Jul 2016 04:01:02 -0700 Received: from irsmsx156.ger.corp.intel.com (10.108.20.68) by irsmsx110.ger.corp.intel.com (163.33.3.25) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 7 Jul 2016 12:00:59 +0100 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.125]) by IRSMSX156.ger.corp.intel.com ([10.108.20.68]) with mapi id 14.03.0248.002; Thu, 7 Jul 2016 12:00:59 +0100 From: "De Lara Guarch, Pablo" To: Neil Horman , "dev@dpdk.org" CC: "Richardson, Bruce" , Thomas Monjalon , Stephen Hemminger , Panu Matilainen Thread-Topic: [dpdk-dev] [PATCHv8 2/6] drivers: Update driver registration macro usage Thread-Index: AQHRyMi1ix3izdF40UWj5yqpmiC2uKAM59dg Date: Thu, 7 Jul 2016 11:00:59 +0000 Message-ID: References: <1465494421-6210-1-git-send-email-nhorman@tuxdriver.com> <1466189185-21952-1-git-send-email-nhorman@tuxdriver.com> <1466189185-21952-3-git-send-email-nhorman@tuxdriver.com> In-Reply-To: <1466189185-21952-3-git-send-email-nhorman@tuxdriver.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiY2EzYWY1NzYtYTZjNi00NWIwLWEyMzgtODZhMzUzZTFmMGQ1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IjVEUW03WXRXb2dkWDZzSzdaamlZSDBIZE9KNmQrYmNyTVwvVnB5VzloZkpNPSJ9 x-ctpclassification: CTP_IC 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] [PATCHv8 2/6] drivers: Update driver registration macro usage X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jul 2016 11:01:05 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Neil Horman > Sent: Friday, June 17, 2016 7:46 PM > To: dev@dpdk.org > Cc: Neil Horman; Richardson, Bruce; Thomas Monjalon; Stephen Hemminger; > Panu Matilainen > Subject: [dpdk-dev] [PATCHv8 2/6] drivers: Update driver registration mac= ro > usage >=20 > Modify the PMD_REGISTER_DRIVER macro, adding a name argument to it. > The > addition of a name argument creates a token that can be used for subseque= nt > macros in the creation of unique symbol names to export additional bits o= f > information for use by the pmdinfogen tool. For example: >=20 > PMD_REGISTER_DRIVER(ena_driver, ena); >=20 > registers the ena_driver struct as it always did, and creates a symbol > const char this_pmd_name0[] __attribute__((used)) =3D "ena"; >=20 > which pmdinfogen can search for and extract. The subsequent macro >=20 > DRIVER_REGISTER_PCI_TABLE(ena, ena_pci_id_map); >=20 > creates a symbol const char ena_pci_tbl_export[] __attribute__((used)) = =3D > "ena_pci_id_map"; >=20 > Which allows pmdinfogen to find the pci table of this driver >=20 > Using this pattern, we can export arbitrary bits of information. >=20 > pmdinfo uses this information to extract hardware support from an object > file and create a json string to make hardware support info discoverable > later. >=20 > Signed-off-by: Neil Horman > Acked-by: Panu Matilainen > CC: Bruce Richardson > CC: Thomas Monjalon > CC: Stephen Hemminger > CC: Panu Matilainen Hi, I was running some crypto unit tests and I realized that the tests do not p= ass anymore, because the creation of the software crypto device fails, due to this patch= . The reason is that the name of the pmd has changed (some names have changed= , like eth_pcap to pcap, whereas others have remained the same, like eth_null= ), so the name passed to rte_eal_vdev_init has to be changed. I am not sure if that is going to cause any problems, because users will ha= ve to change their code because of this name change. Also, if now the name is being set with PMD_REGISTER_DRIVER, then we should remove it from the rte_driver structure, right? static struct rte_driver pmd_ring_drv =3D { .name =3D "eth_ring", <-- This is being overwritten by PMD_REGISTER= _DRIVER? .type =3D PMD_VDEV, .init =3D rte_pmd_ring_devinit, .uninit =3D rte_pmd_ring_devuninit, }; PMD_REGISTER_DRIVER(pmd_ring_drv, eth_ring); Pablo