From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0081.outbound.protection.outlook.com [104.47.34.81]) by dpdk.org (Postfix) with ESMTP id 6E17E2BB8 for ; Thu, 8 Jun 2017 10:13:07 +0200 (CEST) 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=ztBLd/cb1WaYjKGphHVMag22lzkIm8PeP/MnJG7Dfmk=; b=D49mWFZmm5v3sT8TpLA1Jehb6dDtXgs6OetqhxlvZxVk/ockFIYSbF35UpLUps7Qh/d5n6TNZifdH+ScC37aEbd7RYQIJFaNcfNkSB9FpZiox3UqcC0SjQ7vObXB0tPPbNQ86MtOZLV/oKhdH0jYGFzpfpS5ZBwkHpil2gp7g2k= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from PBHAGAVATULA-LT (111.93.218.67) by MWHPR07MB3472.namprd07.prod.outlook.com (10.164.192.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1157.12; Thu, 8 Jun 2017 08:13:04 +0000 Date: Thu, 8 Jun 2017 13:42:43 +0530 From: Pavan Nikhilesh Bhagavatula To: "dev@dpdk.org" , "Trahe, Fiona" Cc: "Doherty, Declan" , Pavan Nikhilesh Message-ID: <20170608081242.GA19599@PBHAGAVATULA-LT> References: <1496831804-28265-1-git-send-email-pbhagavatula@caviumnetworks.com> <348A99DA5F5B7549AA880327E580B43589219317@IRSMSX101.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <348A99DA5F5B7549AA880327E580B43589219317@IRSMSX101.ger.corp.intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MA1PR01CA0115.INDPRD01.PROD.OUTLOOK.COM (10.174.56.159) To MWHPR07MB3472.namprd07.prod.outlook.com (10.164.192.23) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR07MB3472: X-MS-Office365-Filtering-Correlation-Id: 8aee36ca-3db0-4e2f-d239-08d4ae4630de X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:MWHPR07MB3472; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3472; 3:8XdZy1PrESQ0yqLuGuTK38ESt/H7vPeETTvmPE7QZizlz0M/EGBVZVF+8QHPg2kI1dSxOH6jbM0359RMN7KgN5Fy3tsTumEnjbKIJ/zS81YQQdka6weYqxfO7pJ6nRaXPbeoJ7Nc7FpZl28inrSo9tToCsThFJhBziyiPfgTKySkX8kWN2kqCqz19TJFiMwPlMFF/M6e7Czqwe5oBtwiq6wJawQHwDCUAiYxZRAXaoffZ7Jjk9ajakZVWWO5T9K7lZV3R58T0/YsnCRat5HlnPpfjsDJ5FlRNK88T4K1x0k6xPE9mOaVxmtwtvBeBne+vagH26liLy/R8kDw8Gkysw==; 25:bUQtWnPGHvuWuAX76WGZPHHBspD0boQNMoyYzfMk0RYfZC9EeT56Mua7uKSodst2UKLX52IsMNeuM/ZV5RHXHZXBpJhd5DDz6u9dj7oTFUISiTpKji7GvmulI1bUodcE5vjiATiYBrcqXXSA1On43sgU/Y3XIXBI3jb/jtOfGkXav66LLQKvQf9gqSZNRXS2PykLRHeaq/5OxOlCnzZsBiO62Bd65Rcl5e3Im0FaK5npnj1mWfgszHcTnTma8dzRg6jbC3D//QJ4ghxcE6xVoPNhMQDA3b+CEucOna2mqMttJXkzYPMuxaoIdCyEJWpt/fk2WOXvpDbG+TuTexXpVNPALZJwlLIaoqIRF62jE7PfE4y+32J7IQ+8Bg+NwNpX5GYBUjiJXfHPBvZtw2jbG7855yN0fHa1uUp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Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(6041248)(20161123560025)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR07MB3472; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR07MB3472; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR07MB3472; 4:p8UreUocsTrn25lz+MIKW6nQ685Y4XAH0PUeUg23M9?= =?us-ascii?Q?j6qJALTNeuaYi07GbRfXvXyIjH22yiNDj6tMpNs/lMnTIjx8Sn339nycq4DX?= =?us-ascii?Q?7CpSPFOs/nj6gvL5p/xVykgiLglOCuVYik/uMCd9sDlmsi7yVkYbxJeDZKZj?= =?us-ascii?Q?RO0B4mXENCW88+a5OmwfqLOSWnm0N8I08j4/stullKe+DJhWvWUKXLBNk1uH?= =?us-ascii?Q?Y/hELXtwBdc+iDu93jJHsHPySdEPw1cESFei/rhzwWz5XkmmktIFFCelyckO?= =?us-ascii?Q?L54g49xvBacS0H3x6SSzE/YdmDk6RLoRPBSSV9rt2nxcd1mhjYqTkfBoIbSk?= =?us-ascii?Q?RvosyWDuU+2Y6Zpm513YL1lE4eUs/uXiQC2kJOTASf/zMjDcB6wqc08B+PvL?= =?us-ascii?Q?ev44ar9TkZu475O4A+/YFcPGx/cPyP93a8K4BLrs4+UARL/sMTUjIez8SpCd?= =?us-ascii?Q?aTpikRmRD8m4O9UF+WrJ4dLfde1KxUTxi5+DoiCBIIsmg4zyjzb1/l+oz19c?= =?us-ascii?Q?I7tnA2wJj5Oa5pQrnZ1wEx5fmltJtc4OUqXWwlpuhuajJ5HdypWjF2w1/2YC?= =?us-ascii?Q?kG7PS9SEqMt0ELDZZ21s/9U8qS+8fnMn70lrtTj7aZq+GAWKpVIl/fzAmnKY?= =?us-ascii?Q?8F7TdWY+voB7IydeIiQJPUIuX+q6xlw21gXFf8TJbNEKs9pOlom4Aw+wn17G?= =?us-ascii?Q?8qxMyJZLF9i1WojfnOdeDpWsZQEr4BjeeLW5FMSA+8308c7N9NumMoCaYV5W?= =?us-ascii?Q?G7dIGbP6cCE+1VAUbtrQBrYvm5iGHKod/wToAff+88q3ijJGCvwyRDo1ftse?= =?us-ascii?Q?BsrWM9vUfJ/YKbArX/jUB+NZTXLm6MoRP+W8eFe1IOY3BojPFBzkJ0g1N4jH?= =?us-ascii?Q?iyJp7Ie5w80cRIcOQtxWOBZq/waqpVQiV6LdgxW+CmpsXxMTb6CyJ2GAr9EF?= =?us-ascii?Q?Fb3TiUl/fQlv3OBsvSV00QDLrkApqmDBK+AmdD5yQz6o5JJIb4BLUcyzSwpC?= =?us-ascii?Q?vfnWTfJLdU+JnpwxZYzhvETKrTQsA8RboAFdv44NwS9ySVbo0rRSHK/ARtq8?= =?us-ascii?Q?VLseeF5sZPIbJ4w0/adHit5M3XS6DKs25itAyrvFflG2cA/AV6AAS3XMTiLo?= =?us-ascii?Q?m+o8uU6F5lQxYU4LAg7zy4gGfyUS9M58YKph0+LKIkHbsALfGh4A=3D=3D?= X-Forefront-PRVS: 0332AACBC3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39400400002)(39840400002)(39410400002)(13464003)(24454002)(377454003)(3846002)(55016002)(33716001)(54906002)(72206003)(575784001)(9686003)(42882006)(2950100002)(5660300001)(189998001)(1076002)(33656002)(478600001)(23726003)(5009440100003)(6496005)(42186005)(6246003)(2906002)(4326008)(53546009)(25786009)(38730400002)(107886003)(305945005)(7736002)(76176999)(54356999)(53936002)(50986999)(81166006)(8676002)(2501003)(47776003)(66066001)(229853002)(6666003)(18370500001)(107986001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR07MB3472; H:PBHAGAVATULA-LT; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR07MB3472; 23:Lu4+VjOQMka6x0D2HUjcoB9yzdbT0CspAjSlY+j4O?= =?us-ascii?Q?KQTOaaPa4JugftEgsSj9OKcmRcgeNRoZBuUHyTwzl4rhAwO+rcbrTAZi5fCN?= =?us-ascii?Q?hCxC3+g8yK92iVtufPnzodZ72Z+mX7/o+oBKzPqT4NA/v5r3CvQTEDL3SO4Z?= =?us-ascii?Q?U6kuYcxrJH998vq5HvhoROxIShqhSRvy987F+SuNaCLbfhvVJ8FeV3xjuRJ+?= =?us-ascii?Q?+aL75k224f9x9NVt8p9BxofuAZd7EYlbVfhTJbWL79k/AKqpqGwiF20mjCPj?= =?us-ascii?Q?pTN4T9ToMxZrbRbiN+hZ5dhpQ/9hTuZ7PY/NdnjP0cF0MxLqYDp4jwipT6tR?= =?us-ascii?Q?KpQeh6KYzf7DzXS4VJpradZ71JBrepWUzNFjV3HF6V2lf/rFVYgl/kO5Xbbl?= =?us-ascii?Q?7IZeQBNF7x25nahjFGj//xgZBfyk7xbF+prOoRA6rQzfeLtMcirdfbDGkXmQ?= =?us-ascii?Q?bi2nO8UlQGva9lVCXkPzUP2CDpK1BIkQ30pXlPgeMjptdq+5sDlzI8OBeYxY?= =?us-ascii?Q?z5hwvHXNj/k5kJK+T3yynzB73cuqqLftl8uUSIJHnXw3A6p1d/aZDKeJJz4n?= =?us-ascii?Q?CGQTxB1KG8jCZeRn9BfVKOd00Fcj62GYYk9Lx1n7YMWNWdeEk35JExQdh88u?= =?us-ascii?Q?8VXK+hk4BMgXvtdnGVAVV5xolXi0rA3N56bS3xMtYOLeC89FNuJXgK6ZTArF?= =?us-ascii?Q?F76mniZAvLoMLBk99IZGnd+fPWdrFLXAUjoCzczfmPRWYedxVtrXi/WgvZtI?= =?us-ascii?Q?X19By18nWkSq5NIYM6ejZ+ZNH5MjEGRAEjXZQj6OArtJPQ6WjwyjiFClctky?= =?us-ascii?Q?BV4/6jblcZzaoX/kKEeZQQZxK86xtW0HuHekSdm8i+3c9ds46ksxHycd2qy8?= =?us-ascii?Q?jufhteyzoo5FzbRxoyLk8+jQANonrnttK26txO9K9FVe1ZMR45LWlKmTFZkC?= =?us-ascii?Q?c1QEZ304GgXc2Axr5bMutW72knXKz5WVPAhGy7EdPvTM2pMO2khG+Q/ekGjH?= =?us-ascii?Q?qxdqETs4TyX3WRAkqJUskHiAZ7Fg9K63kjyvEfqcOBVAXWDUwexua1u61XWU?= =?us-ascii?Q?WOLnKz32vXnS6scoeFhe54b3MLZDjlsc/wouOjZ3AUn1f9ZmUEKZSoPjS3OX?= =?us-ascii?Q?6bCMY3BICFpY4zE26zQe2o78yRXVy2BgUD6IMYvMayp7NcWANUGoJ6kEems9?= =?us-ascii?Q?ordsqpsVqGCQ0F5hgxC4CjB6VAajTSEARDW17H1SxMhgGG4ezph/HUtpQ=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3472; 6:Cw/+KZ2m1p8rmKZlYZAG8C9loIudiq++HZk/IU4JUa+msKkR9iPMMeg+Es6jDS+eTkk1mjsimjEN2ENUjjKPKb1fr/LzHm4MxRFxPwDv1xCtI4rMVfKLpjXxDy8QFaH7tN0yWcRaOjzxy9EPrzwIFpbcYewt6HxDKRy1glyc4TXQLkLFo2225FPtRVeoRiZoFN+vLSXIBAOE+D0t/EqNP+BGJLvhdb9eke9+4+xjgfZ74UnZmk+kmjERtZ3nYN/2dynGIi1qmSbE6J/AahDvW1f84LTCVIY4o6IpY8voLoL516+Cq5hJbt1cDmJeprJDxMhEaDVbyesc+Pnmtf8HHSQazQCMuB4FHlZkljij/5oYi60tVZiodhqf/QpED4m92+poLDT3wNMwSx95tab4xnPuA1KLdV70qwyPVtC60FFThKy5/PJ1q67z6tD5Wqv/wO1amWQZJ/hOFmI3wjKPEWA7CgffE3uulEmKeSp1Tb5iHwYfPbHuRSoNaPfrWAqvk20LllHO6Tsh/G5ff4bv2g== X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3472; 5:kDvxyF/jEx6+TYlkUwobUZ7QFSkyqbvvMFLblxAwEGdjrahyzRiR9Vp/LBuMJycoE/VlqqbEa5xtnqltN4vsdeLCo6M5dXfzE83KRZJIuNOSwEwCXF6Y2VM/2g6wcGgCim6LsmV+Usj7MsU7uzz+yFMiRfyeoY/RXZIZgSq71VGwhYLoaiRt3pmCCVV098nEp4b5rR6xpOSXQerjcLH7fttK0S1RwcKlKzyPSyRQRjsm0xeUv+MOGfXPvGm64M03zeQdruL7odjrTw4kRH8Z4HwkKqbhA+d8Ye8O69xnUpLWBi7GyyArMq5md6AHEo7gqydAMkf6/HIWTtaBf70BUcRQgBoxO7rgmnsfEIjCSMBbQbQZqcJcMmdti188NL19dIyuXfR6JyY6JHPvl0CvqymnscfcS4sviJYfJFQbHURmLSK73RdMp7cAdSsW594EqgKSWGCMHdFZRfBdHPMdYqGZWzF7FNd6m4bJxD4U5aYmGRrNHuvhVF2dFXFwkxy0; 24:78qP7wASNRJRecOagFZKSQudkDgIgtO/qZfQ3u7huwZHSnDN8rAvviLlzzjpOZK0FJlRCTqreLyWkHzAS/M6JLITUG1gB8n+tPrOpCSJ5Nc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3472; 7:HLEKQZGBuWSo9dEC3soSEINNh7UHdwJNu5Yar6KZHlBYBzyZhZxRI3EW6gDiQkI2bOTCr99SjQvAfdtsrnADdl7CxlJ5D6YbclU0w8rK7g7B4m7Oc4APSnUVDu9Nb2tor29UGx79udynY71wABeG/2Iijpjmvngxe/ETKBCq6ysitGsk6Ru8wUB2agpwDJbaya6JoHU5FBL89XXU6arWHXBvpw/hUbUfSZ/YrD8fWqbv1gWuqe+qBAbAjfmONzHOjRr06DOWYEidBza4x0+bDujvmnS00FZPjXQrKVGgXTA4wGamcRpikgxEDg8cr1xPaP2ZeiuHkO30Kvs0d/cIFA== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jun 2017 08:13:04.3966 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB3472 Subject: Re: [dpdk-dev] [PATCH] cryptodev: fix cryptodev start return 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: Thu, 08 Jun 2017 08:13:08 -0000 On Wed, Jun 07, 2017 at 03:54:23PM +0000, Trahe, Fiona wrote: > Hi Pavan, > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pavan Nikhilesh > > Sent: Wednesday, June 7, 2017 11:37 AM > > To: dev@dpdk.org > > Cc: Doherty, Declan ; Pavan Nikhilesh Bhagavatula > > > > Subject: [dpdk-dev] [PATCH] cryptodev: fix cryptodev start return value > > > > From: Pavan Nikhilesh Bhagavatula > > > > If cryptodev has already started it should return -EBUSY instead of 0 > > when rte_cryptodev_start is called. > > > > Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for crypto devices") > > > > Signed-off-by: Pavan Nikhilesh > > --- > > lib/librte_cryptodev/rte_cryptodev.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c > > index b65cd9c..c815038 100644 > > --- a/lib/librte_cryptodev/rte_cryptodev.c > > +++ b/lib/librte_cryptodev/rte_cryptodev.c > > @@ -1000,7 +1000,7 @@ rte_cryptodev_start(uint8_t dev_id) > > if (dev->data->dev_started != 0) { > > CDEV_LOG_ERR("Device with dev_id=%" PRIu8 " already started", > > dev_id); > > - return 0; > > + return -EBUSY; > It makes sense to me to return 0/success in this case, as the end result is the > same, the device is successfully started. > But I don't feel strongly about it if there's a good argument for making the change? I do agree with this but from an application perspective when the API is called again after the device has already started (without calling the stop API) it would mean that there is an underlying issue with the application's business logic and it would go undetected, so I feel that we should strictly enforce this scenario as an error. > However, as it is an API change doesn't it need to be flagged in a release before the change is made? I don't think that this would be an API change as it doesn't deprecate the existing ABI. Any thoughts about this from the community are welcome as the same issue affects multiple core libraries (crytodev, ethdev, eventdev). > > > } > > > > diag = (*dev->dev_ops->dev_start)(dev); > > -- > > 2.7.4 >