From mboxrd@z Thu Jan 1 00:00:00 1970 From: Panu Matilainen Subject: Re: [PATCHv3 2/5] drivers: Update driver registration macro usage Date: Tue, 24 May 2016 09:57:35 +0300 Message-ID: References: <1463431287-4551-1-git-send-email-nhorman@tuxdriver.com> <1463765086-17349-1-git-send-email-nhorman@tuxdriver.com> <1463765086-17349-3-git-send-email-nhorman@tuxdriver.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Bruce Richardson , Thomas Monjalon , Stephen Hemminger To: Neil Horman , dev@dpdk.org Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 791AA56B7 for ; Tue, 24 May 2016 08:57:39 +0200 (CEST) In-Reply-To: <1463765086-17349-3-git-send-email-nhorman@tuxdriver.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 05/20/2016 08:24 PM, Neil Horman wrote: > 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 subsequent > macros in the creation of unique symbol names to export additional bits of > information for use by the pmdinfogen tool. For example: > > PMD_REGISTER_DRIVER(ena_driver, ena); > [..] > diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c > index 071b44f..ee9581b 100644 > --- a/drivers/net/bnx2x/bnx2x_ethdev.c > +++ b/drivers/net/bnx2x/bnx2x_ethdev.c > @@ -550,5 +550,7 @@ static struct rte_driver rte_bnx2xvf_driver = { > .init = rte_bnx2xvf_pmd_init, > }; > > -PMD_REGISTER_DRIVER(rte_bnx2x_driver); > -PMD_REGISTER_DRIVER(rte_bnx2xvf_driver); > +PMD_REGISTER_DRIVER(rte_bnx2x_driver, pci_id_bnx2x_map, bnx2x); > +DRIVER_EXPORT_PCI_TABLE(bnx2x, pci_id_bnx2x_map); > +PMD_REGISTER_DRIVER(rte_bnx2xvf_driver, pci_id_bnx2xvf_map, bnx2xvf); > +DRIVER_EXPORT_PCI_TABLE(bnx2xvf, pci_id_bnx2xvf_map); There are extra arguments to PMD_REGISTER_DRIVER() here, causing build failure. Its easy to miss since bnx2x doesn't get built by default, dunno if it was in earlier versions already (if it was, sorry for missing it). - Panu -