From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 493622B91 for ; Wed, 7 Jun 2017 17:54:28 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Jun 2017 08:54:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,311,1493708400"; d="scan'208";a="1138935935" Received: from irsmsx108.ger.corp.intel.com ([163.33.3.3]) by orsmga001.jf.intel.com with ESMTP; 07 Jun 2017 08:54:25 -0700 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.242]) by IRSMSX108.ger.corp.intel.com ([169.254.11.133]) with mapi id 14.03.0319.002; Wed, 7 Jun 2017 16:54:24 +0100 From: "Trahe, Fiona" To: Pavan Nikhilesh , "dev@dpdk.org" CC: "Doherty, Declan" , "Trahe, Fiona" Thread-Topic: [dpdk-dev] [PATCH] cryptodev: fix cryptodev start return value Thread-Index: AQHS33ocWGcPl5Q+QUu9IdQnmOVP4KIZi0HA Date: Wed, 7 Jun 2017 15:54:23 +0000 Message-ID: <348A99DA5F5B7549AA880327E580B43589219317@IRSMSX101.ger.corp.intel.com> References: <1496831804-28265-1-git-send-email-pbhagavatula@caviumnetworks.com> In-Reply-To: <1496831804-28265-1-git-send-email-pbhagavatula@caviumnetworks.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: Wed, 07 Jun 2017 15:54:29 -0000 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 Bhagavatu= la > > Subject: [dpdk-dev] [PATCH] cryptodev: fix cryptodev start return value >=20 > From: Pavan Nikhilesh Bhagavatula >=20 > If cryptodev has already started it should return -EBUSY instead of 0 > when rte_cryptodev_start is called. >=20 > Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for crypto d= evices") >=20 > Signed-off-by: Pavan Nikhilesh > --- > lib/librte_cryptodev/rte_cryptodev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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 !=3D 0) { > CDEV_LOG_ERR("Device with dev_id=3D%" 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 th= e change? However, as it is an API change doesn't it need to be flagged in a release = before the change is made? } >=20 > diag =3D (*dev->dev_ops->dev_start)(dev); > -- > 2.7.4