From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0047.outbound.protection.outlook.com [104.47.42.47]) by dpdk.org (Postfix) with ESMTP id CA3491E34 for ; Fri, 2 Feb 2018 13:13:01 +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=Pkh9LUYx8oVJsfnDQ+sd+eEZnml0BJYtDml37AhXnNE=; b=GEgjnZQhic190tV63urf/zRedeubflkjPmuAbQeCgcn7xKFcr8vLvCB7FpRspE9KUSp5KHHOO93Kw35NcPE1O6EJznTiJiTzFGyzAE7gI35KL2TXlgTavLRIzCZJhobitVa2UaiCa/gAVvNo+9ablP65T3r6Mtg22bUmXRpvndM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (106.201.34.24) by SN2PR07MB2528.namprd07.prod.outlook.com (2603:10b6:804:7::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.464.11; Fri, 2 Feb 2018 12:12:56 +0000 Date: Fri, 2 Feb 2018 17:42:37 +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: <20180202121234.GA12755@jerin> References: <1517352989-11720-1-git-send-email-vipin.varghese@intel.com> <1F668163772FA946975B9466A9DFF729E82E217A@ORSMSX110.amr.corp.intel.com> <20180131065407.GC24795@jerin> <4C9E0AB70F954A408CC4ADDBF0F8FA7D4D193E87@BGSMSX101.gar.corp.intel.com> <1F668163772FA946975B9466A9DFF729E82E351A@ORSMSX110.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1F668163772FA946975B9466A9DFF729E82E351A@ORSMSX110.amr.corp.intel.com> User-Agent: Mutt/1.9.3 (2018-01-21) X-Originating-IP: [106.201.34.24] X-ClientProxiedBy: MA1PR01CA0103.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:1::19) To SN2PR07MB2528.namprd07.prod.outlook.com (2603:10b6:804:7::6) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 959b2259-4930-431d-da00-08d56a364d1e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:SN2PR07MB2528; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2528; 3:HczUWshmEyPyQEIFg6z3q5KE9NYyfuWhpF1Wa6MhwLsieIkIDWX4JbERePCTwZ/kXid/4bhObPxm28dKazG+mf5DtQgd/xY8d9Dd0RBjm6fpHOM4ll+iko7mGR1a2dh+uwDQhGVncvbZZvdVAJIIaSWtfz2M7LNZhwLy9KVyfn9MQRhuIPG4y+JH00wygd4ftiLESS+RMQjyKNEoKbzTvOf58c81y+QkCx+4TfadNW9OgUcW5Oo9GfMJhljOycp1; 25:YLiqcTSSu9rDf0StJ3SQvNoOypU3onivPEYA3cl+XzjFXG4RS/iMsq8iYc+KY6IR/lk5sUqvWSuwWeYTYW8OatwIHBAyrVBb2hDfgJShvAKMN7pEkxfK0PjwP9I3VIUxu0IpSZdGMdns8oex9HB2xctE/W5qrxHZbxxeG2ct/ZSPdot4USAHStEsEUYfT9/GanxqG3iLfDQ1PCg530r516snQg1EfReoe82Jxg51IBh22nGrwZSx1Pvwp2k00y+oC9TrSKDg8UplFvnRTseNAlpTcEvCiczL3f0oziiIhUYNl2qWzfaYx9UwcZMR0HWyf8S4UV1/U1Bl+8Eh7zoLXg==; 31:xh3cX/oSRnWZMKyK6ACA1m1KIyoDE32wjUdr0dGaomkOWN2Ia8L3E+xvtmI2tUIljvEK7z8/LitHi2vQlqwCa1o4wPsnaFpvjnQvUeo0NkYXatEgi7ytm8P3CQff3EGo17niStrSRNMbtOdoPAfe73tF7wZMWVyNl9bn+GCGBocAp7bW1YpR41Dqua/zFUQ1MsWv/XUZANPNOJYhjpRNduT7E+2q3OtxgQ92A53Rsoo= X-MS-TrafficTypeDiagnostic: SN2PR07MB2528: X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2528; 20:GcE3vnRtHRDWJ65jEjCHtUoNZpxsQ3pvQtpBudkReI7MiA7zm+New40Z5J3JPC3BQLGMPCSBa4YuFCyCps6KeCXCL/c/e24G95tPl0kIbSebeCK0H947K8J5px1Ff5dWhTbmCC9x9/ErIvRBatiwG7pQuQx/DFohMYGUG9siadzElU6TGvsa7YQcqxkxXY2dzCrYgVX/NauiRZIISuCSgN6zfNuwJkB2m08nZP1srjeh1e+FvJ/bScruwBxtgM2bL+4aXUEyjZQ4i+F3JAoPKraRSar/B3jYRFcBxPhoxGRjG6R/CVW/eUZj8UbdPpkbP4W+FMln708YcjldRaSo3ShOXxwrXjhmd1Ypq7pwgYBa6VLlUlimuThQ1XlOCLgF4uK4D5A8CYRHEv8cnt2fRY+vRuEQ/GpEqXWkAy1gQ9A/nZo28NUSZA4wm8hAVGQieicTxv30RYNrKdy0ClzuS9BHLnhBEKGsuipyikLGxfdd5wVnmnzsfADymhzbWoPuNlYZTedfZhLgp5077t5Kkby1ye4238Brx5XnPQBk9UKUCRAQvnprWRZ9OQ6exnxespoIwKCwW2wM9TLIM0zOt8nUbUstWLBvq/YscEm0TiA= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(3231101)(2400082)(944501161)(10201501046)(3002001)(93006095)(6041288)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011); SRVR:SN2PR07MB2528; BCL:0; PCL:0; RULEID:; SRVR:SN2PR07MB2528; X-Microsoft-Exchange-Diagnostics: 1; SN2PR07MB2528; 4:btt5MdggQy6oyfcOD8ZniE8Zfc+93Kfz2BRP7nKLXZ3wSpnd42zl4oDcWljWu/Hoscx085kG4ApUU/R3loHF5ovlAtq+cDo3t4bzUGsm1nEOWk1ZXTMaXLWPu4K22BRWT4n3x9gW20KBRGhO+ZJ3bW81gym70p7y7Vy1icYOD3SafYYhmSMU6DVevKpy0My7Fglrz0J6AIVD4PYy6rIiLFlGyBtbn52MW6bj2tW2CS5MSgeisyiURxILPGM2jOceRTz6uGN7ZBzNS14jU9le1LDhG9be814OMMMVBWxR6IcGyM2PF7uKiYXIrtQ/gzl46j/L3gEa3yv6VnrvdZEeB2kzLJVZyOPzWaggeCgnkb0= X-Forefront-PRVS: 05715BE7FD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(366004)(39380400002)(39860400002)(396003)(346002)(189003)(13464003)(199004)(5660300001)(2906002)(105586002)(8656006)(7736002)(316002)(33716001)(16586007)(54906003)(58126008)(9686003)(6246003)(55016002)(305945005)(53936002)(33656002)(72206003)(229853002)(83506002)(478600001)(26005)(47776003)(66066001)(55236004)(8676002)(81166006)(68736007)(81156014)(25786009)(8936002)(6496006)(93886005)(386003)(6666003)(106356001)(59450400001)(52116002)(97736004)(50466002)(53546011)(42882006)(5009440100003)(6916009)(16526019)(33896004)(3846002)(76176011)(4326008)(6116002)(186003)(2950100002)(23726003)(1076002)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR07MB2528; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; SN2PR07MB2528; 23:SQeHHsHNUjXdTObr5Z5F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U4W8COmBVSMhc44=; 5:WMzuF4DuO0BTYlZt13KzDb2Dw3BrRrlR9orbzg4+Xsqg12g+yW1U97aqyPk/FoZlbB4PsI6SxRzr8sded4WcaHGccuIh59WmUqm8RYmFQH24xWWmD/0KlV3ymh+eiXezkF/kp4710dqpOnh0qXT3g+KhYoAXcQfagKrXnm5OfVY=; 24:mg50vRC4Q7QC/XajxL6JDnu6riHTv33lqkiMHgZRaJIGrcoIhU1bigpVM2E1oMuNWMreBM+STXwJQPlvuTo9GsiYG0ZHRwLKGeYtz3UCZa4=; 7:p6it87RdBfEx4+oR37PLhSo4ixmOtZwVONDpn0wQhJ1ve7WFAuWEeV7HFu+8pS4cJ6UC1rGuOINsZV8nmZpl9+oRPqiukrXk/9qeKLTsXL3C9eyVTwaTVxeTEkrQAXiMGjo+hQilx2xyZ5qG0iA1+QM1E33CoEKYOsBeQ7zI6Rij42EC3j3zHW24b76luHn0wvUBABE0tRrMurcj7WQA7uv/7cohu2oNE2BxqRa29z2CiiAGbV+eO+d1Ph2K4XhC SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2018 12:12:56.8644 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 959b2259-4930-431d-da00-08d56a364d1e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN2PR07MB2528 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: Fri, 02 Feb 2018 12:13:02 -0000 -----Original Message----- > Date: Fri, 2 Feb 2018 10:04:20 +0000 > From: "Rao, Nikhil" > To: "Varghese, Vipin" , Jerin Jacob > > CC: "dev@dpdk.org" , "Jacob, Jerin" > , "Van Haaren, Harry" > , Hemant Agrawal , > "Jain, Deepak K" > Subject: RE: [PATCH] event/rx_adapter: fix ignore return of event start > > > > -----Original Message----- > > From: Varghese, Vipin > > Sent: Friday, February 2, 2018 1:39 PM > > To: Jerin Jacob ; Rao, Nikhil > > > > Cc: dev@dpdk.org; Jacob, Jerin ; Van > > Haaren, Harry ; Hemant Agrawal > > ; Jain, Deepak K > > Subject: RE: [PATCH] event/rx_adapter: fix ignore return of event start > > > > > > > > > -----Original Message----- > > > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > > > Sent: Wednesday, January 31, 2018 6:54 AM > > > To: Rao, Nikhil > > > Cc: Varghese, Vipin ; dev@dpdk.org; Jacob, > > > Jerin ; Van Haaren, Harry > > > ; Hemant Agrawal > > ; > > > Jain, Deepak K > > > Subject: Re: [PATCH] event/rx_adapter: fix ignore return of event > > > start > > > > > > -----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. > > > > > > > So do we agree to ACK these changes to get the code fix to the mainline? > > Sorry, if my original email wasn't clear, if rte_event_dev_configure() returns an error and rte_eventdev_start() returns success that would be a problem, i.e., the fix is incorrect. > > Of the 2 options suggested by Jerin - Since ret is not a bitmask ret |= wouldn't work, if I understand the option correctly . A new error would work. > > How about EIO ? and we also update the documentation to indicate that the event device would be in a stopped state if the return code is EIO. +1 for new error. You may consider EBUSY or EINPROGRESS also.No strong opinion for the name.