DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Trahe, Fiona" <fiona.trahe@intel.com>
To: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "Doherty, Declan" <declan.doherty@intel.com>,
	"Trahe, Fiona" <fiona.trahe@intel.com>
Subject: Re: [dpdk-dev] [PATCH] cryptodev: fix cryptodev start return value
Date: Wed, 7 Jun 2017 15:54:23 +0000	[thread overview]
Message-ID: <348A99DA5F5B7549AA880327E580B43589219317@IRSMSX101.ger.corp.intel.com> (raw)
In-Reply-To: <1496831804-28265-1-git-send-email-pbhagavatula@caviumnetworks.com>

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 <declan.doherty@intel.com>; Pavan Nikhilesh Bhagavatula
> <pbhagavatula@caviumnetworks.com>
> Subject: [dpdk-dev] [PATCH] cryptodev: fix cryptodev start return value
> 
> From: Pavan Nikhilesh Bhagavatula <pbhagavatula@caviumnetworks.com>
> 
> 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 <pbhagavatula@caviumnetworks.com>
> ---
>  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?
However, as it is an API change doesn't it need to be flagged in a release before the change is made?


}
> 
>  	diag = (*dev->dev_ops->dev_start)(dev);
> --
> 2.7.4

  reply	other threads:[~2017-06-07 15:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-07 10:36 Pavan Nikhilesh
2017-06-07 15:54 ` Trahe, Fiona [this message]
2017-06-08  8:12   ` Pavan Nikhilesh Bhagavatula
2017-07-11 14:08     ` De Lara Guarch, Pablo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=348A99DA5F5B7549AA880327E580B43589219317@IRSMSX101.ger.corp.intel.com \
    --to=fiona.trahe@intel.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    --cc=pbhagavatula@caviumnetworks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).