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 30EBC23C for ; Tue, 1 May 2018 14:53:30 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 May 2018 05:53:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,351,1520924400"; d="scan'208";a="35966511" Received: from dwdohert-mobl.ger.corp.intel.com (HELO [163.33.228.121]) ([163.33.228.121]) by fmsmga007.fm.intel.com with ESMTP; 01 May 2018 05:53:28 -0700 To: "Ananyev, Konstantin" , "dev@dpdk.org" References: <20180430153258.1101-1-declan.doherty@intel.com> <20180430153258.1101-2-declan.doherty@intel.com> <2601191342CEEE43887BDE71AB977258AEDC0C62@irsmsx105.ger.corp.intel.com> From: "Doherty, Declan" Message-ID: Date: Tue, 1 May 2018 13:53:27 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <2601191342CEEE43887BDE71AB977258AEDC0C62@irsmsx105.ger.corp.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 2/3] net/ixgbe: initialise nb_representor_ports value 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: Tue, 01 May 2018 12:53:31 -0000 On 01/05/2018 10:46 AM, Ananyev, Konstantin wrote: > > >> -----Original Message----- >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Declan Doherty >> Sent: Monday, April 30, 2018 4:33 PM >> To: dev@dpdk.org >> Cc: Doherty, Declan >> Subject: [dpdk-dev] [PATCH 2/3] net/ixgbe: initialise nb_representor_ports value >> >> Initialise rte_ethdev_args nb_representor_ports to zero to handle >> the case where no devargs are passed to the IXGBE PF on >> device probe, so that there is no invalid attempts to create >> representor ports. >> >> Coverity Issue: 277231 >> Fixes: cf80ba6e2038 ("net/ixgbe: add support for representor ports") >> >> Signed-off-by: Declan Doherty >> --- >> drivers/net/ixgbe/ixgbe_ethdev.c | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c >> index 0ccf55dc8..283dd7e49 100644 >> --- a/drivers/net/ixgbe/ixgbe_ethdev.c >> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c >> @@ -1725,8 +1725,7 @@ eth_ixgbe_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, >> struct rte_pci_device *pci_dev) >> { >> char name[RTE_ETH_NAME_MAX_LEN]; >> - >> - struct rte_eth_devargs eth_da; >> + struct rte_eth_devargs eth_da = { .nb_representor_ports = 0 }; >> int i, retval; >> >> if (pci_dev->device.devargs) { > > Might be a bit better: > If (pci_dev->device.devargs) { rte_eth_devargs_parse(...);...} > else memset(ð_da, 0, sizeof(eth_da)); > to be more consistent. > BTW, I think rte_eth_devargs_parse() need to add formal check for input parameters. > Konstantin > Ok, thanks Konstantin, that makes sense, we're working on cleaning up rte_eth_devargs_parse() to align with kvargs so I'll make sure to add those checks. > > >> -- >> 2.14.3 >