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 45E602C5F for ; Fri, 25 Mar 2016 15:14:51 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 25 Mar 2016 07:14:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,391,1455004800"; d="scan'208";a="941413210" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga002.jf.intel.com with ESMTP; 25 Mar 2016 07:14:49 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.13]) by IRSMSX104.ger.corp.intel.com ([169.254.5.87]) with mapi id 14.03.0248.002; Fri, 25 Mar 2016 14:14:48 +0000 From: "De Lara Guarch, Pablo" To: "Pattan, Reshma" , "dev@dpdk.org" , "Ananyev, Konstantin" CC: "Pattan, Reshma" Thread-Topic: [dpdk-dev] [PATCH v2] examples/l3fwd: fix validation for queue id of config tuple Thread-Index: AQHRhiKIGP9miyDrfUqZ1DgnpRHkLJ9qNEfg Date: Fri, 25 Mar 2016 14:14:47 +0000 Message-ID: References: <1458297321-25601-1-git-send-email-reshma.pattan@intel.com> <1458861061-11211-1-git-send-email-reshma.pattan@intel.com> In-Reply-To: <1458861061-11211-1-git-send-email-reshma.pattan@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNWVjOWNjN2EtNjk4MS00ODllLTg0NzktNzhkZWJhMmEwZjg4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6InVGYUxISDY1aVZZeHdQbGR4M0FSOEI0TnI0Mlp2RkxtSXRDS1p4dHliRms9In0= x-ctpclassification: CTP_IC 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 v2] examples/l3fwd: fix validation for queue id of config tuple 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: Fri, 25 Mar 2016 14:14:51 -0000 Hi Reshma, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Reshma Pattan > Sent: Thursday, March 24, 2016 11:11 PM > To: dev@dpdk.org; Ananyev, Konstantin > Cc: Pattan, Reshma > Subject: [dpdk-dev] [PATCH v2] examples/l3fwd: fix validation for queue i= d of > config tuple >=20 > Added validation for queue id of config parameter tuple. >=20 > This validation enforces user to enter queue ids of a port > from 0 and in sequence. >=20 > This additional validation on queue ids avoids ixgbe crash caused by null > rxq pointer access inside ixgbe_dev_rx_init. >=20 > Reason for null rxq is, L3fwd application allocates memory only for queue= s > passed by user. > But rte_eth_dev_start tries to initialize rx queues in sequence from 0 t= o > nb_rx_queues, > which is not true and coredump while accessing the unallocated queue . >=20 You forgot to include the Fixes line. > Signed-off-by: Reshma Pattan > --- > v2: [...] > + if (lcore_params[i].port_id =3D=3D port) { > + if (lcore_params[i].queue_id =3D=3D queue+1) > + queue =3D lcore_params[i].queue_id; > + else > + rte_exit(EXIT_FAILURE, "queue ids of the port > %d must be" > + " in sequence and must start > with 0", You should include a return at the end of the sentence. > + lcore_params[i].port_id); > + } > } > return (uint8_t)(++queue); > } > -- > 2.5.0