DPDK patches and discussions
 help / color / mirror / Atom feed
From: Aakash Sasidharan <asasidharan@marvell.com>
To: "Gujjar, Abhinandan S" <abhinandan.gujjar@intel.com>
Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
	Shijith Thotton <sthotton@marvell.com>,
	Anoob Joseph <anoobj@marvell.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [PATCH 2/3] test/event_crypto_adapter: skip unsupported test
Date: Wed, 23 Aug 2023 07:48:39 +0000	[thread overview]
Message-ID: <SJ0PR18MB45106ABD46827C8E65BD48A7A11CA@SJ0PR18MB4510.namprd18.prod.outlook.com> (raw)
In-Reply-To: <PH0PR11MB5832D149DE6AB135E59AF14CE81CA@PH0PR11MB5832.namprd11.prod.outlook.com>

Hi Abhinandan,

Please see inline.

> -----Original Message-----
> From: Gujjar, Abhinandan S <abhinandan.gujjar@intel.com>
> Sent: Wednesday, August 23, 2023 10:04 AM
> To: Aakash Sasidharan <asasidharan@marvell.com>
> Cc: Jerin Jacob Kollanukkaran <jerinj@marvell.com>; Shijith Thotton
> <sthotton@marvell.com>; Anoob Joseph <anoobj@marvell.com>;
> dev@dpdk.org
> Subject: [EXT] RE: [PATCH 2/3] test/event_crypto_adapter: skip unsupported
> test
> 
> External Email
> 
> ----------------------------------------------------------------------
> 
> 
> > -----Original Message-----
> > From: Aakash Sasidharan <asasidharan@marvell.com>
> > Sent: Tuesday, August 22, 2023 6:47 PM
> > To: Gujjar, Abhinandan S <abhinandan.gujjar@intel.com>
> > Cc: jerinj@marvell.com; sthotton@marvell.com; anoobj@marvell.com;
> > dev@dpdk.org; asasidharan@marvell.com
> > Subject: [PATCH 2/3] test/event_crypto_adapter: skip unsupported test
> >
> > Skip the test if rte_event_crypto_adapter_caps_get()
> > returns -ENOTSUP.
> >
> > Signed-off-by: Aakash Sasidharan <asasidharan@marvell.com>
> > ---
> >  app/test/test_event_crypto_adapter.c | 17 +++++++++++++++++
> >  1 file changed, 17 insertions(+)
> >
> > diff --git a/app/test/test_event_crypto_adapter.c
> > b/app/test/test_event_crypto_adapter.c
> > index 24f66be69f..00b20fa443 100644
> > --- a/app/test/test_event_crypto_adapter.c
> > +++ b/app/test/test_event_crypto_adapter.c
> > @@ -284,6 +284,9 @@ test_crypto_adapter_params(void)
> >  	};
> >
> >  	err = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID,
> &cap);
> > +	if (err == -ENOTSUP)
> > +		return TEST_SKIPPED;
> > +
> >  	TEST_ASSERT_SUCCESS(err, "Failed to get adapter capabilities\n");
> >
> >  	if (cap &
> > RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND) {
> @@
> > -1252,8 +1255,13 @@ test_crypto_adapter_create(void)
> >  		.enqueue_depth = 8,
> >  		.new_event_threshold = 1200,
> >  	};
> > +	uint32_t cap;
> >  	int ret;
> >
> > +	ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID,
> > &cap);
> > +	if (ret == -ENOTSUP)
> > +		return ret;
> > +
> rte_event_crypto_adapter_caps_get() is basic thing to check what is
> supported or not.
> Not sure, purpose of this patch. Did you come across a case whether existing
> test was not working?
> If so, please mention that in the patch commit.
> 
[Aakash] This is required for event_cnxk because it can support crypto adapter
only with crypto_cnxk and not with other cryptodevs.

> >  	/* Create adapter with default port creation callback */
> >  	ret = rte_event_crypto_adapter_create(TEST_ADAPTER_ID,
> >  					      evdev,
> > @@ -1274,6 +1282,9 @@ test_crypto_adapter_qp_add_del(void)
> >  	int ret;
> >
> >  	ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID,
> &cap);
> > +	if (ret == -ENOTSUP)
> > +		return TEST_SKIPPED;
> > +
> >  	TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n");
> >
> >  	if (cap &
> > RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND) {
> @@
> > -1309,6 +1320,9 @@ configure_event_crypto_adapter(enum
> > rte_event_crypto_adapter_mode mode)
> >  	int ret;
> >
> >  	ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID,
> &cap);
> > +	if (ret == -ENOTSUP)
> > +		return ret;
> > +
> >  	TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n");
> >
> >  	/* Skip mode and capability mismatch check for SW eventdev */ @@
> > -1475,6 +1489,9 @@ crypto_adapter_teardown(void)  {
> >  	int ret;
> >
> > +	if (!crypto_adapter_setup_done)
> > +		return;
> > +
> >  	ret = rte_event_crypto_adapter_stop(TEST_ADAPTER_ID);
> >  	if (ret < 0)
> >  		RTE_LOG(ERR, USER1, "Failed to stop adapter!");
> > --
> > 2.25.1


  reply	other threads:[~2023-08-23  7:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-22 13:16 [PATCH 1/3] event/cnxk: fix return values for capability API Aakash Sasidharan
2023-08-22 13:16 ` [PATCH 2/3] test/event_crypto_adapter: skip unsupported test Aakash Sasidharan
2023-08-23  4:01   ` Anoob Joseph
2023-08-23  4:33   ` Gujjar, Abhinandan S
2023-08-23  7:48     ` Aakash Sasidharan [this message]
2023-08-23  8:16       ` Aakash Sasidharan
2023-08-23  8:37       ` Gujjar, Abhinandan S
2023-08-22 13:16 ` [PATCH 3/3] test/event_crypto_adapter: fix crypto null dev creation Aakash Sasidharan
2023-08-23  4:00   ` Anoob Joseph
2023-08-23  4:48   ` Gujjar, Abhinandan S
2023-08-23  5:47     ` Anoob Joseph
2023-08-23  6:17       ` Gujjar, Abhinandan S
2023-08-23 14:20         ` Jerin Jacob
2023-08-23  3:59 ` [PATCH 1/3] event/cnxk: fix return values for capability API Anoob Joseph

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=SJ0PR18MB45106ABD46827C8E65BD48A7A11CA@SJ0PR18MB4510.namprd18.prod.outlook.com \
    --to=asasidharan@marvell.com \
    --cc=abhinandan.gujjar@intel.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=sthotton@marvell.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).