From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id DD0841B6D4 for ; Wed, 31 Jan 2018 06:32:53 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Jan 2018 21:32:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,438,1511856000"; d="scan'208";a="14231634" Received: from orsmsx107.amr.corp.intel.com ([10.22.240.5]) by fmsmga007.fm.intel.com with ESMTP; 30 Jan 2018 21:32:51 -0800 Received: from orsmsx115.amr.corp.intel.com (10.22.240.11) by ORSMSX107.amr.corp.intel.com (10.22.240.5) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 30 Jan 2018 21:32:50 -0800 Received: from orsmsx110.amr.corp.intel.com ([169.254.10.12]) by ORSMSX115.amr.corp.intel.com ([169.254.4.36]) with mapi id 14.03.0319.002; Tue, 30 Jan 2018 21:32:50 -0800 From: "Rao, Nikhil" To: "Varghese, Vipin" , "dev@dpdk.org" , "Jacob, Jerin" , "Van Haaren, Harry" , Hemant Agrawal CC: "Jain, Deepak K" , "Rao, Nikhil" Thread-Topic: [PATCH] event/rx_adapter: fix ignore return of event start Thread-Index: AQHTmh2V4MesjoeA6U6jyVo30ybUyqONW/IQ Date: Wed, 31 Jan 2018 05:32:49 +0000 Message-ID: <1F668163772FA946975B9466A9DFF729E82E217A@ORSMSX110.amr.corp.intel.com> References: <1517352989-11720-1-git-send-email-vipin.varghese@intel.com> In-Reply-To: <1517352989-11720-1-git-send-email-vipin.varghese@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNWI0YzE5MjQtNTk1OC00MWJmLWI4ZDMtNmQ4YjE1ZGQ0MzYwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InFXRGpBdW5jSjY3K09UN3pGXC83TVhBUG1UTHNEYjZWWFRPNk5BaHNvN0x3PSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.22.254.140] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] event/rx_adapter: fix ignore return of event start 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: Wed, 31 Jan 2018 05:32:54 -0000 Adding eventdev PMD folks for their suggestions on how to handle the return= value from rte_event_dev_start() below. > -----Original Message----- > From: Varghese, Vipin > Sent: Wednesday, January 31, 2018 4:26 AM > To: dev@dpdk.org; Rao, Nikhil > Cc: Jain, Deepak K ; Varghese, Vipin > > Subject: [PATCH] event/rx_adapter: fix ignore return of event start >=20 > Capture the return value for rte_event_dev_start. Return the result back = to > user. >=20 > Coverity issue: 257000 > Fixes: 9c38b704d280 ("eventdev: add eth Rx adapter implementation") > Cc: nikhil.rao@intel.com >=20 > Signed-off-by: Vipin Varghese > --- > lib/librte_eventdev/rte_event_eth_rx_adapter.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c > b/lib/librte_eventdev/rte_event_eth_rx_adapter.c > index 90106e6..a818bef 100644 > --- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c > +++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c > @@ -603,7 +603,7 @@ static uint16_t gcd_u16(uint16_t a, uint16_t b) > RTE_EDEV_LOG_ERR("failed to configure event dev %u\n", > dev_id); > if (started) > - rte_event_dev_start(dev_id); > + ret =3D rte_event_dev_start(dev_id); Currently the a non-zero return value at this point signifies an error retu= rned from rte_event_dev_configure(), so I suggest that the return value is= typecasted to void. > return ret; > } >=20 > @@ -617,7 +617,7 @@ static uint16_t gcd_u16(uint16_t a, uint16_t b) > conf->event_port_id =3D port_id; > conf->max_nb_rx =3D 128; > if (started) > - rte_event_dev_start(dev_id); > + ret =3D rte_event_dev_start(dev_id); This change looks good to me. > rx_adapter->default_cb_arg =3D 1; > return ret; > } > -- > 1.9.1