From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0073.outbound.protection.outlook.com [104.47.42.73]) by dpdk.org (Postfix) with ESMTP id 9FFE21B2F1 for ; Wed, 31 Jan 2018 07:54:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=CGASmRMFMiTX6uOU9uy2zQeg6WG4j0esymwyDjp8nAM=; b=KRKQVR8RcnUT7iKdO4Jhq1a2BrQ7w0HbdxQGKFKJl1W1LBKShGwuQbphcezsSuTrIQ1oGAwtBI1uSxarg8IXBiAXFGPLYo9hXzrL4o5CxURrdkwYW9JpPTudayiYTZ+pA0ZJIiIj5nFZkiu1NVzFXK3OUjIB0SGP2ruwRpPrxhw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (115.113.156.3) by CO2PR07MB2520.namprd07.prod.outlook.com (10.166.201.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Wed, 31 Jan 2018 06:54:41 +0000 Date: Wed, 31 Jan 2018 12:24:08 +0530 From: Jerin Jacob To: "Rao, Nikhil" Cc: "Varghese, Vipin" , "dev@dpdk.org" , "Jacob, Jerin" , "Van Haaren, Harry" , Hemant Agrawal , "Jain, Deepak K" Message-ID: <20180131065407.GC24795@jerin> References: <1517352989-11720-1-git-send-email-vipin.varghese@intel.com> <1F668163772FA946975B9466A9DFF729E82E217A@ORSMSX110.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1F668163772FA946975B9466A9DFF729E82E217A@ORSMSX110.amr.corp.intel.com> User-Agent: Mutt/1.9.3 (2018-01-21) X-Originating-IP: [115.113.156.3] X-ClientProxiedBy: BM1PR0101CA0005.INDPRD01.PROD.OUTLOOK.COM (10.174.220.15) To CO2PR07MB2520.namprd07.prod.outlook.com (10.166.201.7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9900f79a-ae3f-42df-4a8e-08d5687782cd X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:CO2PR07MB2520; X-Microsoft-Exchange-Diagnostics: 1; CO2PR07MB2520; 3:qNrLP0MLxzaS8Qxe/U6pQSJx/esNCCboifVlKCjam59L89Vntl3AdDX33Kf7cMKk9yyPFpOIe/xeFDhUUagz3GEKU9eUIJDndgDKYiz7CzeYuvKiT7zQVbB7hj0kKlGqQo+e2tDl28ieK0B1MlEwH1sGONThBFaRw4vjaWXuWURjIvVCYmVAtK9wKoFTQzEgKMV+KSFQZd0N7qk5un4RENC0GHeJctY3+BZ11fq4w3A5M6xcaR5nHVMVHtaI/fks; 25:Wd8u1zVKgfSv5kBamadpyZb2R0QCer/fUO84rjz1DvQotrNfyYEf8Zepw1HjIFUAlbmQwOcv7Q2UJmHR5d1Wi4jKw6p+1zOHzeqGzBinCSTtuxRa8CfXL5DsVdLMtwycfnpvGlGhbI4lLGnHyQr1UtlW9fX/pBA4fjSyI0SH2pC3GUrUJWy+lrl225mzoSduAGPYdsyshs5lcvwcRd2ZHzhg94/W+8exQ21CbEQuq3EtjJwQwNLiS3664lGCXfIMRoiOX+42dMp3axU/HQ+n9QHXWWUMmJDObF+9wT08HuNSjuWmRa1HFXKz0PahQgP0uQu8vNHZl4ltsQAICwyFag==; 31:bAx7lKS09vrCj1JPzW9qkpaNR+BrGRWSdFeq/aW8tXHJCcuxZOQh5CMhXf/D9LaazYwZpD+E92hENblIGnBAaPhsczfXSdsAXnksNm8LwoU52I5CiQD3CFutTZ5jHVqgYr+ShyCCEZ233mP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bATgIETmUb0NZjOT4 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(10201501046)(3231101)(2400082)(944501161)(3002001)(93006095)(6041288)(20161123562045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011); SRVR:CO2PR07MB2520; BCL:0; PCL:0; RULEID:; SRVR:CO2PR07MB2520; X-Forefront-PRVS: 056929CBB8 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(396003)(366004)(39860400002)(376002)(346002)(13464003)(199004)(189003)(52116002)(3846002)(25786009)(66066001)(50466002)(1076002)(23726003)(2950100002)(6916009)(81156014)(42882006)(6116002)(8936002)(81166006)(97736004)(26005)(33656002)(76176011)(5660300001)(6666003)(386003)(33896004)(186003)(59450400001)(8676002)(53546011)(2906002)(53936002)(478600001)(6496006)(47776003)(7736002)(305945005)(6246003)(68736007)(316002)(4326008)(9686003)(16586007)(55016002)(72206003)(58126008)(55236004)(54906003)(8656006)(105586002)(106356001)(33716001)(16526019)(229853002)(83506002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR07MB2520; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR07MB2520; 23:PFRExEswfDsCOhqFBWvtZSyY9v47D/S/mmYHSbckh?= =?us-ascii?Q?uI3jPsOf6Uzme0dNxt/L/3T++8x6c439sB653nqkJzPe2ANMZdGrrrIKWA3C?= =?us-ascii?Q?15YMTCwtyDP/GMxkQcr656/olzCNAcRB31nDiKnzgxCTEHqhT0Awu4tXDaic?= =?us-ascii?Q?L/dJC6vM1Le5T4gew4/hgk7KNmMfbcCBlSDF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yFzPo9xMmuwxMVvXrwKnhW93IkiD0KdUnoljdO0RYiL6suyEOGFlhmkeDF7xU2PS2EMtUTAG1gF+UNu98zWP0CViht/eyfSq9oDRVsZ1Lz0A6DR2zkIKkTxxq0AJ6D1R3D7QN1A+VvBTZGNadoYh7Ww3tti2S7NXinFS2sOlaAvOPraTgiTHEFR6aP1i8xjn4Sfw3nERJofoFhi83oucNJcHpuKaNWbpwICn+l+1XPAeXWFN4zGDnYLv2lI1GKmD SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jan 2018 06:54:41.1641 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9900f79a-ae3f-42df-4a8e-08d5687782cd X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR07MB2520 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 06:54:47 -0000 -----Original Message----- > > > 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 > > > > Capture the return value for rte_event_dev_start. Return the result back to > > user. > > > > Coverity issue: 257000 > > Fixes: 9c38b704d280 ("eventdev: add eth Rx adapter implementation") > > Cc: nikhil.rao@intel.com > > > > Signed-off-by: Vipin Varghese > > --- > > lib/librte_eventdev/rte_event_eth_rx_adapter.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > 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 = rte_event_dev_start(dev_id); > > Currently the a non-zero return value at this point signifies an error returned from rte_event_dev_configure(), so I suggest that the return value is typecasted to void. If I understand it correctly, Any one of the failure(configure() or start()) should result in bad state. Right? i.e If some reason PMD is not able to start() even after failure configuration() would result in bad state. If so, one option could be combine the error like ret |= operation or create a new logical error in Rx adapter which denotes this new error. > > > return ret; > > } > > > > @@ -617,7 +617,7 @@ static uint16_t gcd_u16(uint16_t a, uint16_t b) > > conf->event_port_id = port_id; > > conf->max_nb_rx = 128; > > if (started) > > - rte_event_dev_start(dev_id); > > + ret = rte_event_dev_start(dev_id); > This change looks good to me. > > > rx_adapter->default_cb_arg = 1; > > return ret; > > } > > -- > > 1.9.1 >