From mboxrd@z Thu Jan 1 00:00:00 1970 From: Declan Doherty Subject: [dpdk-dev 2/3][PATCH v2] net/ixgbe: default eth_da parameter Date: Wed, 2 May 2018 16:59:40 +0100 Message-ID: <20180502155941.1338-2-declan.doherty@intel.com> References: <20180430153258.1101-1-declan.doherty@intel.com> <20180502155941.1338-1-declan.doherty@intel.com> Cc: Declan Doherty To: dev@dpdk.org Return-path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 9FE2E1E2F for ; Wed, 2 May 2018 18:08:25 +0200 (CEST) In-Reply-To: <20180502155941.1338-1-declan.doherty@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Initialise rte_ethdev_args parameters 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, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index e49319a14..a05527a91 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -1734,7 +1734,8 @@ eth_ixgbe_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, ð_da); if (retval) return retval; - } + } else + memset(ð_da, 0, sizeof(eth_da)); retval = rte_eth_dev_create(&pci_dev->device, pci_dev->device.name, sizeof(struct ixgbe_adapter), -- 2.14.3