DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
To: Ankur Dwivedi <adwivedi@marvell.com>
Cc: dpdk-dev <dev@dpdk.org>,
	"Gujjar, Abhinandan S" <abhinandan.gujjar@intel.com>,
	 Jerin Jacob <jerinj@marvell.com>,
	Anoob Joseph <anoobj@marvell.com>
Subject: Re: [dpdk-dev] [PATCH 1/3] test/event_crypto_adapter: return error with unsupported mode
Date: Thu, 8 Oct 2020 14:42:09 +0530	[thread overview]
Message-ID: <CALBAE1NA9w=urU-VPOsCanM_-0sG6hfgEE6N-NmxpZF6y0qnHQ@mail.gmail.com> (raw)
In-Reply-To: <20200908091534.24305-2-adwivedi@marvell.com>

On Tue, Sep 8, 2020 at 2:48 PM Ankur Dwivedi <adwivedi@marvell.com> wrote:
>
> The capability of a event device should be checked before creating
> a event crypto adapter in a particular mode. The test case returns
> error if the mode is not supported.
>
> Signed-off-by: Ankur Dwivedi <adwivedi@marvell.com>

Hi Ankur,

Please fix git-log.sh error[1] the following in this series and send
the version.

Headline too long:
        test/event_crypto_adapter: return error with unsupported mode
Wrong tag:
        acked-by: abhinandan.gujjar@intel.com
        acked-by: abhinandan.gujjar@intel.com
        acked-by: abhinandan.gujjar@intel.com
Missing 'Fixes' tag:
        test/event_crypto_adapter: fix function arguments

[1]
./devtools/check-git-log.sh -n 3
./devtools/checkpatches.sh -n 3


> ---
>  app/test/test_event_crypto_adapter.c | 30 ++++++++++++++++++----------
>  1 file changed, 20 insertions(+), 10 deletions(-)
>
> diff --git a/app/test/test_event_crypto_adapter.c b/app/test/test_event_crypto_adapter.c
> index 8d42462d8..930c2a9bc 100644
> --- a/app/test/test_event_crypto_adapter.c
> +++ b/app/test/test_event_crypto_adapter.c
> @@ -750,15 +750,23 @@ configure_event_crypto_adapter(enum rte_event_crypto_adapter_mode mode)
>         uint32_t cap;
>         int ret;
>
> +       ret = rte_event_crypto_adapter_caps_get(evdev, TEST_CDEV_ID, &cap);
> +       TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n");
> +
> +       if ((mode == RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD) &&
> +           !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_FWD))
> +               return -ENOTSUP;
> +
> +       if ((mode == RTE_EVENT_CRYPTO_ADAPTER_OP_NEW) &&
> +           !(cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_OP_NEW))
> +               return -ENOTSUP;
> +
>         /* Create adapter with default port creation callback */
>         ret = rte_event_crypto_adapter_create(TEST_ADAPTER_ID,
> -                                             TEST_CDEV_ID,
> +                                             evdev,
>                                               &conf, mode);
>         TEST_ASSERT_SUCCESS(ret, "Failed to create event crypto adapter\n");
>
> -       ret = rte_event_crypto_adapter_caps_get(TEST_ADAPTER_ID, evdev, &cap);
> -       TEST_ASSERT_SUCCESS(ret, "Failed to get adapter capabilities\n");
> -
>         if (cap & RTE_EVENT_CRYPTO_ADAPTER_CAP_INTERNAL_PORT_QP_EV_BIND) {
>                 ret = rte_event_crypto_adapter_queue_pair_add(TEST_ADAPTER_ID,
>                                 TEST_CDEV_ID, TEST_CDEV_QP_ID, &response_info);
> @@ -813,6 +821,8 @@ test_crypto_adapter_conf(enum rte_event_crypto_adapter_mode mode)
>                         TEST_ASSERT(ret >= 0, "Failed to link queue %d "
>                                         "port=%u\n", qid,
>                                         params.crypto_event_port_id);
> +               } else {
> +                       return ret;
>                 }
>                 crypto_adapter_setup_done = 1;
>         }
> @@ -845,24 +855,24 @@ static int
>  test_crypto_adapter_conf_op_forward_mode(void)
>  {
>         enum rte_event_crypto_adapter_mode mode;
> +       int ret;
>
>         mode = RTE_EVENT_CRYPTO_ADAPTER_OP_FORWARD;
> -       TEST_ASSERT_SUCCESS(test_crypto_adapter_conf(mode),
> -                               "Failed to config crypto adapter");
> +       ret = test_crypto_adapter_conf(mode);
>
> -       return TEST_SUCCESS;
> +       return ret;
>  }
>
>  static int
>  test_crypto_adapter_conf_op_new_mode(void)
>  {
>         enum rte_event_crypto_adapter_mode mode;
> +       int ret;
>
>         mode = RTE_EVENT_CRYPTO_ADAPTER_OP_NEW;
> -       TEST_ASSERT_SUCCESS(test_crypto_adapter_conf(mode),
> -                               "Failed to config crypto adapter");
> +       ret = test_crypto_adapter_conf(mode);
>
> -       return TEST_SUCCESS;
> +       return ret;
>  }
>
>
> --
> 2.28.0
>

  parent reply	other threads:[~2020-10-08  9:12 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-08  9:15 [dpdk-dev] [PATCH 0/3] Bug fixes in event crypto adapter test application Ankur Dwivedi
2020-09-08  9:15 ` [dpdk-dev] [PATCH 1/3] test/event_crypto_adapter: return error with unsupported mode Ankur Dwivedi
2020-09-11  7:37   ` Gujjar, Abhinandan S
2020-09-18  7:10     ` Gujjar, Abhinandan S
2020-09-18 14:34       ` Ankur Dwivedi
2020-09-18 14:42         ` Gujjar, Abhinandan S
2020-09-18 15:03           ` Ankur Dwivedi
2020-09-23  5:31             ` Ankur Dwivedi
2020-09-23  7:17               ` Gujjar, Abhinandan S
2020-10-08  9:12   ` Jerin Jacob [this message]
2020-09-08  9:15 ` [dpdk-dev] [PATCH 2/3] test/event_crypto_adapter: fix function arguments Ankur Dwivedi
2020-09-08  9:15 ` [dpdk-dev] [PATCH 3/3] test/event_crypto_adapter: free resources during exit Ankur Dwivedi
2020-09-25  7:28 ` [dpdk-dev] [PATCH v2 0/3] Bug fixes in event crypto adapter test application Ankur Dwivedi
2020-09-25  7:28   ` [dpdk-dev] [PATCH v2 1/3] test/event_crypto_adapter: return error with unsupported mode Ankur Dwivedi
2020-09-25  7:28   ` [dpdk-dev] [PATCH v2 2/3] test/event_crypto_adapter: fix function arguments Ankur Dwivedi
2020-10-06 10:21     ` Gujjar, Abhinandan S
2020-10-06 12:57       ` Ankur Dwivedi
2020-09-25  7:28   ` [dpdk-dev] [PATCH v2 3/3] test/event_crypto_adapter: free resources during exit Ankur Dwivedi
2020-10-06 10:21     ` Gujjar, Abhinandan S
2020-10-06 10:29       ` Gujjar, Abhinandan S
2020-10-06 13:00         ` Ankur Dwivedi
2020-10-05  9:43   ` [dpdk-dev] [PATCH v2 0/3] Bug fixes in event crypto adapter test application Jerin Jacob
2020-10-05  9:48     ` Gujjar, Abhinandan S
2020-10-07  5:26   ` [dpdk-dev] [PATCH v3 0/3] Bug fixes in event crypto adapter test Ankur Dwivedi
2020-10-07  5:26     ` [dpdk-dev] [PATCH v3 1/3] test/event_crypto_adapter: return error with unsupported mode Ankur Dwivedi
2020-10-08  7:25       ` Gujjar, Abhinandan S
2020-10-07  5:26     ` [dpdk-dev] [PATCH v3 2/3] test/event_crypto_adapter: fix function arguments Ankur Dwivedi
2020-10-08  7:26       ` Gujjar, Abhinandan S
2020-10-07  5:26     ` [dpdk-dev] [PATCH v3 3/3] test/event_crypto_adapter: free resources during exit Ankur Dwivedi
2020-10-08  7:26       ` Gujjar, Abhinandan S
2020-10-08 12:52     ` [dpdk-dev] [PATCH v4 0/3] Bug fixes in event crypto adapter test Ankur Dwivedi
2020-10-08 12:52       ` [dpdk-dev] [PATCH v4 1/3] test/event_crypto_adapter: return error for unsupported mode Ankur Dwivedi
2020-10-08 12:52       ` [dpdk-dev] [PATCH v4 2/3] test/event_crypto_adapter: fix function arguments Ankur Dwivedi
2020-10-08 12:52       ` [dpdk-dev] [PATCH v4 3/3] test/event_crypto_adapter: free resources during exit Ankur Dwivedi
2020-10-08 15:00       ` [dpdk-dev] [PATCH v4 0/3] Bug fixes in event crypto adapter test 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='CALBAE1NA9w=urU-VPOsCanM_-0sG6hfgEE6N-NmxpZF6y0qnHQ@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=abhinandan.gujjar@intel.com \
    --cc=adwivedi@marvell.com \
    --cc=anoobj@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@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).