DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Gujjar, Abhinandan S" <abhinandan.gujjar@intel.com>
To: "Kundapura, Ganapati" <ganapati.kundapura@intel.com>,
	"Jayatheerthan, Jay" <jay.jayatheerthan@intel.com>,
	"jerinjacobk@gmail.com" <jerinjacobk@gmail.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [PATCH v1] eventdev/crypto_adapter: remove logically dead code
Date: Thu, 24 Feb 2022 03:11:12 +0000	[thread overview]
Message-ID: <PH0PR11MB4824B04508E04502129A7CE3E83D9@PH0PR11MB4824.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20220223073443.647695-1-ganapati.kundapura@intel.com>

Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>

> -----Original Message-----
> From: Kundapura, Ganapati <ganapati.kundapura@intel.com>
> Sent: Wednesday, February 23, 2022 1:05 PM
> To: Jayatheerthan, Jay <jay.jayatheerthan@intel.com>;
> jerinjacobk@gmail.com; Gujjar, Abhinandan S
> <abhinandan.gujjar@intel.com>; dev@dpdk.org
> Subject: [PATCH v1] eventdev/crypto_adapter: remove logically dead code
> 
> eca_cryptodev_cdev_flush() is internal function and called with valid range
> of cdevs.
> 
> crypto_cdev_info structure is allocated at adapter creation time and
> retrieved from the adapter for a valid cdevs which cannot be NULL and
> hence no need for NULL check.
> 
> Fixes: 2ae84b39ae7b ("eventdev/crypto: store operations in circular buffer")
> 
> Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
> 
> diff --git a/lib/eventdev/rte_event_crypto_adapter.c
> b/lib/eventdev/rte_event_crypto_adapter.c
> index 0b484f3..f624f50 100644
> --- a/lib/eventdev/rte_event_crypto_adapter.c
> +++ b/lib/eventdev/rte_event_crypto_adapter.c
> @@ -529,10 +529,8 @@ eca_crypto_cdev_flush(struct
> event_crypto_adapter *adapter,
>  	uint16_t qp;
> 
>  	curr_dev = &adapter->cdevs[cdev_id];
> -	if (unlikely(curr_dev == NULL))
> -		return 0;
> -
>  	dev = rte_cryptodev_pmd_get_dev(cdev_id);
> +
>  	for (qp = 0; qp < dev->data->nb_queue_pairs; qp++) {
> 
>  		curr_queue = &curr_dev->qpairs[qp];
> --
> 2.6.4


  parent reply	other threads:[~2022-02-24  3:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-23  7:34 Ganapati Kundapura
2022-02-23 16:58 ` Jerin Jacob
2022-02-24  3:11 ` Gujjar, Abhinandan S [this message]
2022-02-24  5:22   ` Jerin Jacob

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=PH0PR11MB4824B04508E04502129A7CE3E83D9@PH0PR11MB4824.namprd11.prod.outlook.com \
    --to=abhinandan.gujjar@intel.com \
    --cc=dev@dpdk.org \
    --cc=ganapati.kundapura@intel.com \
    --cc=jay.jayatheerthan@intel.com \
    --cc=jerinjacobk@gmail.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).