DPDK patches and discussions
 help / color / mirror / Atom feed
From: Akhil Goyal <gakhil@marvell.com>
To: "Dybkowski, AdamX" <adamx.dybkowski@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Doherty, Declan" <declan.doherty@intel.com>,
	"Kusztal, ArkadiuszX" <arkadiuszx.kusztal@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2 1/2] test/crypto: close PMD after tests
Date: Thu, 8 Apr 2021 12:15:46 +0000
Message-ID: <MW2PR18MB22848F5B74B63209F30DA368D8749@MW2PR18MB2284.namprd18.prod.outlook.com> (raw)
In-Reply-To: <SN6PR11MB2575A32C97330345E4777676ED769@SN6PR11MB2575.namprd11.prod.outlook.com>

> The pmd is initialized in the setup function.
> This patch adds one extra step inside the teardown function: the call to the
> rte_cryptodev_close apart of the call to rte_cryptodev_stop function that
> existed before.
> 
> I don't see any sense of calling the stop function inside the setup, in my
> opinion it's much better to do it during the teardown.
> 

Sorry, I wanted to refer to testsuite_teardown() instead of ut_teardown().
The reason is that, vdevs are initialized in testsuite_setup and not ut_setup.
Hence corresponding reverse function should be in testsuite_teardown().

-akhil
> 
> > -----Original Message-----
> > From: Akhil Goyal <gakhil@marvell.com>
> > Sent: Monday, 5 April, 2021 20:59
> > To: Akhil Goyal <gakhil@marvell.com>; Dybkowski, AdamX
> > <adamx.dybkowski@intel.com>; dev@dpdk.org; Doherty, Declan
> > <declan.doherty@intel.com>; Kusztal, ArkadiuszX
> > <arkadiuszx.kusztal@intel.com>
> > Subject: RE: [dpdk-dev] [PATCH v2 1/2] test/crypto: close PMD after tests
> >
> > Hi Adam/Arek,
> >
> > Could you please reply to the below query.
> >
> > > > This patch adds closing of the PMD after running the tests.
> > > >
> > > > Signed-off-by: Adam Dybkowski <adamx.dybkowski@intel.com>
> > > > ---
> > > >  app/test/test_cryptodev.c | 6 +++++-
> > > >  1 file changed, 5 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
> > > > index f91debc16..ea965a64a 100644
> > > > --- a/app/test/test_cryptodev.c
> > > > +++ b/app/test/test_cryptodev.c
> > > > @@ -928,6 +928,7 @@ ut_teardown(void)
> > > >  	struct crypto_testsuite_params *ts_params = &testsuite_params;
> > > >  	struct crypto_unittest_params *ut_params = &unittest_params;
> > > >  	struct rte_cryptodev_stats stats;
> > > > +	int res;
> > > >
> > > >  	/* free crypto session structure */  #ifdef RTE_LIB_SECURITY @@
> > > > -976,8 +977,11 @@ ut_teardown(void)
> > > >
> > > >  	rte_cryptodev_stats_get(ts_params->valid_devs[0], &stats);
> > > >
> > > > -	/* Stop the device */
> > > > +	/* Stop and close the device */
> > > >  	rte_cryptodev_stop(ts_params->valid_devs[0]);
> > > > +	res = rte_cryptodev_close(ts_params->valid_devs[0]);
> > > > +	if (res)
> > > > +		RTE_LOG(ERR, USER1, "Crypto device close error %d\n",
> > res);
> > >
> > > Shouldn't this be part of testsuite_setup() instead of ut_teardown()?
> > > In cases of vdev, devices are initialized as part of testsuite_setup().
> > >
> > > Should we also call rte_cryptodev_queue_pair_release from
> > ut_teardown?
> > >
> > > Regards,
> > > Akhil

  reply	other threads:[~2021-04-08 12:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-23 19:27 Akhil Goyal
2021-04-05 18:58 ` Akhil Goyal
2021-04-06  9:15   ` Dybkowski, AdamX
2021-04-08 12:15     ` Akhil Goyal [this message]
2021-04-09  8:56       ` Dybkowski, AdamX
  -- strict thread matches above, loose matches on Subject: below --
2021-03-01 12:21 [dpdk-dev] [PATCH " Adam Dybkowski
2021-03-08 12:57 ` [dpdk-dev] [PATCH v2 0/2] " Adam Dybkowski
2021-03-08 12:57   ` [dpdk-dev] [PATCH v2 1/2] " Adam Dybkowski

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=MW2PR18MB22848F5B74B63209F30DA368D8749@MW2PR18MB2284.namprd18.prod.outlook.com \
    --to=gakhil@marvell.com \
    --cc=adamx.dybkowski@intel.com \
    --cc=arkadiuszx.kusztal@intel.com \
    --cc=declan.doherty@intel.com \
    --cc=dev@dpdk.org \
    /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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git