From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 2D078DED for ; Tue, 1 May 2018 11:46:11 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 May 2018 02:46:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,350,1520924400"; d="scan'208";a="47384125" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by orsmga003.jf.intel.com with ESMTP; 01 May 2018 02:46:09 -0700 Received: from irsmsx105.ger.corp.intel.com ([169.254.7.214]) by irsmsx110.ger.corp.intel.com ([169.254.15.125]) with mapi id 14.03.0319.002; Tue, 1 May 2018 10:46:08 +0100 From: "Ananyev, Konstantin" To: "Doherty, Declan" , "dev@dpdk.org" CC: "Doherty, Declan" Thread-Topic: [dpdk-dev] [PATCH 2/3] net/ixgbe: initialise nb_representor_ports value Thread-Index: AQHT4Jm3LLSz2lpbIUqWukUE10IEcaQanu3w Date: Tue, 1 May 2018 09:46:07 +0000 Message-ID: <2601191342CEEE43887BDE71AB977258AEDC0C62@irsmsx105.ger.corp.intel.com> References: <20180430153258.1101-1-declan.doherty@intel.com> <20180430153258.1101-2-declan.doherty@intel.com> In-Reply-To: <20180430153258.1101-2-declan.doherty@intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMGQ1ZWEyZDYtYzNhNy00MmYzLTgxMzYtMDZiYjQ2NDk0NDAxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IjJJdVd4YVlMVVptd1dKUlBIUVYxemNDUmU5OW9FSjZCXC9hR3VEZnNaSmtvPSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 09:46:12 -0000 > -----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_port= s value >=20 > 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. >=20 > Coverity Issue: 277231 > Fixes: cf80ba6e2038 ("net/ixgbe: add support for representor ports") >=20 > Signed-off-by: Declan Doherty > --- > drivers/net/ixgbe/ixgbe_ethdev.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_e= thdev.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 =3D { .nb_representor_ports =3D 0 }; > int i, retval; >=20 > 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 par= ameters. Konstantin=20 > -- > 2.14.3