From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 794E837B2 for ; Wed, 25 May 2016 17:12:49 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP; 25 May 2016 08:12:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,364,1459839600"; d="scan'208";a="814613101" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.220.175]) by orsmga003.jf.intel.com with SMTP; 25 May 2016 08:11:53 -0700 Received: by (sSMTP sendmail emulation); Wed, 25 May 2016 16:11:52 +0025 Date: Wed, 25 May 2016 16:11:52 +0100 From: Bruce Richardson To: Stephen Hurd Cc: dev@dpdk.org Message-ID: <20160525151151.GC12776@bricha3-MOBL3> References: <1463179589-82681-1-git-send-email-stephen.hurd@broadcom.com> <1463179589-82681-3-git-send-email-stephen.hurd@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1463179589-82681-3-git-send-email-stephen.hurd@broadcom.com> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v2 03/40] bnxt: add driver register/unregister support 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: Wed, 25 May 2016 15:12:49 -0000 On Fri, May 13, 2016 at 03:45:52PM -0700, Stephen Hurd wrote: > Move init() cleanup into uninit() function > Fix .dev_private_size > Add require hwrm calls: > bnxt_hwrm_func_driver_register() > bnxt_hwrm_func_driver_unregister() > > Signed-off-by: Stephen Hurd > Reviewed-by: Ajit Kumar Khaparde > --- > drivers/net/bnxt/bnxt.h | 1 + > drivers/net/bnxt/bnxt_ethdev.c | 48 ++++-- > drivers/net/bnxt/bnxt_hwrm.c | 50 ++++++ > drivers/net/bnxt/bnxt_hwrm.h | 3 + > drivers/net/bnxt/hsi_struct_def_dpdk.h | 277 ++++++++++++++++++++++++++++++++- > 5 files changed, 359 insertions(+), 20 deletions(-) > > diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h > index 0f816ed..ebddeab 100644 > --- a/drivers/net/bnxt/bnxt.h > +++ b/drivers/net/bnxt/bnxt.h > @@ -91,6 +91,7 @@ struct bnxt { > struct rte_pci_device *pdev; > > uint32_t flags; > +#define BNXT_FLAG_REGISTERED (1<<0) > #define BNXT_FLAG_VF (1<<1) > #define BNXT_PF(bp) (!((bp)->flags & BNXT_FLAG_VF)) > #define BNXT_VF(bp) ((bp)->flags & BNXT_FLAG_VF) > diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c > index a74cc6c..07519df 100644 > --- a/drivers/net/bnxt/bnxt_ethdev.c > +++ b/drivers/net/bnxt/bnxt_ethdev.c > @@ -52,20 +52,12 @@ static struct rte_pci_id bnxt_pci_id_map[] = { > {.device_id = 0}, > }; > > -static void bnxt_dev_close_op(struct rte_eth_dev *eth_dev) > -{ > - struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private; > - > - rte_free(eth_dev->data->mac_addrs); > - bnxt_free_hwrm_resources(bp); > -} > - It seems strange to remove this code given that it was just added in the previous commit. Does it need to be added in the first place? Regards, /Bruce