From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 2561B8E96 for ; Thu, 29 Oct 2015 15:35:53 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 29 Oct 2015 07:35:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,214,1444719600"; d="scan'208";a="838033826" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.208.63]) by orsmga002.jf.intel.com with SMTP; 29 Oct 2015 07:35:51 -0700 Received: by (sSMTP sendmail emulation); Thu, 29 Oct 2015 14:35:50 +0025 Date: Thu, 29 Oct 2015 14:35:50 +0000 From: Bruce Richardson To: "Iremonger, Bernard" Message-ID: <20151029143550.GA14956@bricha3-MOBL3> References: <1445621793-3630-1-git-send-email-bernard.iremonger@intel.com> <1445621793-3630-22-git-send-email-bernard.iremonger@intel.com> <20151029115141.GA10272@bricha3-MOBL3> <8CEF83825BEC744B83065625E567D7C219F758D9@IRSMSX108.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8CEF83825BEC744B83065625E567D7C219F758D9@IRSMSX108.ger.corp.intel.com> Organization: Intel Shannon Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v5 21/28] librte_ether: remove branches on pci_dev 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, 29 Oct 2015 14:35:54 -0000 On Thu, Oct 29, 2015 at 02:32:29PM +0000, Iremonger, Bernard wrote: > Hi Bruce, > > > > > > /* attach the new physical device, then store port_id of the device > > > */ @@ -1143,14 +1141,11 @@ rte_eth_dev_configure(uint8_t port_id, > > uint16_t nb_rx_q, uint16_t nb_tx_q, > > > * If link state interrupt is enabled, check that the > > > * device supports it. > > > */ > > > - if (dev_conf->intr_conf.lsc == 1) { > > > - const struct rte_pci_driver *pci_drv = &dev->driver- > > >pci_drv; > > > - > > > - if (!(pci_drv->drv_flags & RTE_PCI_DRV_INTR_LSC)) { > > > + if ((dev_conf->intr_conf.lsc == 1) && > > > + (!(dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC))) { > > > PMD_DEBUG_TRACE("driver %s does not support > > lsc\n", > > > - pci_drv->name); > > > + dev->data->drv_name); > > > > Is this safe to do? From your previous patches for the vdevs, you appear to > > be setting the drv_name field to NULL for those vdevs, leading to undefined > > behaviour here. (printf may catch the NULL and print it as "(null)" rather than > > crashing, but it's still wrong!) > > > > /Bruce > > It would be safer to set dev->data->drv_name to the PMD driver name. > Agreed. If you update the update the vpmds to do so, feel free to keep my ack on the resubmitted patches. /Bruce