DPDK patches and discussions
 help / color / mirror / Atom feed
From: Akhil Goyal <akhil.goyal@nxp.com>
To: Abhinandan Gujjar <abhinandan.gujjar@intel.com>,
	jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com,
	akhil.goyal@nxp.com, dev@dpdk.org
Cc: narender.vangati@intel.com, nikhil.rao@intel.com, gage.eads@intel.com
Subject: Re: [dpdk-dev] [v2,4/6] test: add event crypto adapter auto-test
Date: Wed, 25 Apr 2018 20:10:16 +0530	[thread overview]
Message-ID: <4750e560-5c72-8f1d-ac8e-99af53f5bc20@nxp.com> (raw)
In-Reply-To: <1524573807-168522-5-git-send-email-abhinandan.gujjar@intel.com>

Hi Abhinandan,
On 4/24/2018 6:13 PM, Abhinandan Gujjar wrote:
> Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
> ---
>  test/test/Makefile                    |   1 +
>  test/test/test_event_crypto_adapter.c | 915 ++++++++++++++++++++++++++++++++++
>  2 files changed, 916 insertions(+)
>  create mode 100644 test/test/test_event_crypto_adapter.c
>
> diff --git a/test/test/Makefile b/test/test/Makefile
> index c9c007c9..3200daa 100644
> --- a/test/test/Makefile
> +++ b/test/test/Makefile
> @@ -186,6 +186,7 @@ SRCS-y += test_eventdev.c
>  SRCS-y += test_event_ring.c
>  SRCS-y += test_event_eth_rx_adapter.c
>  SRCS-y += test_event_timer_adapter.c
> +SRCS-y += test_event_crypto_adapter.c
>  endif
>
>  ifeq ($(CONFIG_RTE_LIBRTE_RAWDEV),y)
> diff --git a/test/test/test_event_crypto_adapter.c b/test/test/test_event_crypto_adapter.c
> new file mode 100644
> index 0000000..ea13e3b
> --- /dev/null
> +++ b/test/test/test_event_crypto_adapter.c
> @@ -0,0 +1,915 @@
> +/* SPDX-License-Identifier: BSD-3-Clause
> + * Copyright(c) 2018 Intel Corporation
> + */
> +
> +#include <string.h>
> +#include <rte_common.h>
> +#include <rte_mempool.h>
> +#include <rte_mbuf.h>
> +#include <rte_cryptodev.h>
> +#include <rte_eventdev.h>
> +#include <rte_bus_vdev.h>
> +#include <rte_service.h>
> +#include <rte_event_crypto_adapter.h>
> +#include "test.h"
> +
> +#define PKT_TRACE                  0
> +#define NUM                        1
> +#define DEFAULT_NUM_XFORMS        (2)
> +#define NUM_MBUFS                 (8191)
> +#define MBUF_CACHE_SIZE           (256)
> +#define MAXIMUM_IV_LENGTH         (16)
> +#define DEFAULT_NUM_OPS_INFLIGHT  (128)
> +#define TEST_APP_PORT_ID           0
> +#define TEST_APP_EV_QUEUE_ID       0
> +#define TEST_CRYPTO_EV_QUEUE_ID    1
> +#define TEST_ADAPTER_ID            0
> +#define TEST_CDEV_ID               0
> +#define TEST_CDEV_QP_ID            0
> +#define PACKET_LENGTH              64
> +#define NB_TEST_PORTS              1
> +#define NB_TEST_QUEUES             2
> +#define CRYPTODEV_NAME_NULL_PMD    crypto_null
I think the supported cryptodevs should be more than just null
It should be done similar to other test and example applications.
> +
> +#define MBUF_SIZE              (sizeof(struct rte_mbuf) + \
> +				RTE_PKTMBUF_HEADROOM + PACKET_LENGTH)
> +#define IV_OFFSET              (sizeof(struct rte_crypto_op) + \
> +				sizeof(struct rte_crypto_sym_op) + \
> +				DEFAULT_NUM_XFORMS * \
> +				sizeof(struct rte_crypto_sym_xform))
> +
> +
> +static const uint8_t text_64B[] = {
> +	0x05, 0x15, 0x77, 0x32, 0xc9, 0x66, 0x91, 0x50,
> +	0x93, 0x9f, 0xbb, 0x4e, 0x2e, 0x5a, 0x02, 0xd0,
> +	0x2d, 0x9d, 0x31, 0x5d, 0xc8, 0x9e, 0x86, 0x36,
> +	0x54, 0x5c, 0x50, 0xe8, 0x75, 0x54, 0x74, 0x5e,
> +	0xd5, 0xa2, 0x84, 0x21, 0x2d, 0xc5, 0xf8, 0x1c,
> +	0x55, 0x1a, 0xba, 0x91, 0xce, 0xb5, 0xa3, 0x1e,
> +	0x31, 0xbf, 0xe9, 0xa1, 0x97, 0x5c, 0x2b, 0xd6,
> +	0x57, 0xa5, 0x9f, 0xab, 0xbd, 0xb0, 0x9b, 0x9c
> +};
> +
> +struct event_crypto_adapter_test_params {
> +	struct rte_mempool *mbuf_pool;
> +	struct rte_mempool *op_mpool;
> +	struct rte_mempool *session_mpool;
> +	struct rte_cryptodev_config *config;
> +	uint8_t crypto_event_port_id;
> +};
> +
> +struct rte_event response_info = {
> +	.queue_id = TEST_APP_EV_QUEUE_ID,
> +	.sched_type = RTE_SCHED_TYPE_ATOMIC,
> +	.flow_id = 0xAABB,
I believe all fields shall be filled here. In some GCC version it will 
give warning.
> +};
> +
> +struct rte_event_crypto_request request_info = {
> +	.cdev_id = TEST_CDEV_ID,
> +	.queue_pair_id = TEST_CDEV_QP_ID
> +};
> +
> +static struct event_crypto_adapter_test_params params;
> +static uint8_t crypto_adapter_setup_done;
> +static uint32_t slcore_id;
> +static int evdev;
> +

Regards,
Akhil

  reply	other threads:[~2018-04-25 14:40 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-24 12:43 [dpdk-dev] [v2,0/6] eventdev: cover letter - crypto adapter Abhinandan Gujjar
2018-04-24 12:43 ` [dpdk-dev] [v2,1/6] eventdev: introduce event " Abhinandan Gujjar
2018-04-25 12:42   ` Akhil Goyal
2018-04-26  6:07     ` Gujjar, Abhinandan S
2018-04-26  7:16       ` Akhil Goyal
2018-05-03  6:10         ` Gujjar, Abhinandan S
2018-04-29 16:08   ` Jerin Jacob
2018-05-03  6:03     ` Gujjar, Abhinandan S
2018-05-03  9:02       ` Jerin Jacob
2018-04-24 12:43 ` [dpdk-dev] [v2, 2/6] eventdev: add APIs and PMD callbacks for " Abhinandan Gujjar
2018-04-29 16:14   ` Jerin Jacob
2018-04-30 11:15     ` Gujjar, Abhinandan S
2018-04-24 12:43 ` [dpdk-dev] [v2,3/6] eventdev: add crypto adapter implementation Abhinandan Gujjar
2018-04-25 14:14   ` [dpdk-dev] [v2, 3/6] " Akhil Goyal
2018-04-26  6:20     ` Gujjar, Abhinandan S
2018-04-29 16:22   ` Jerin Jacob
2018-04-30 11:18     ` Gujjar, Abhinandan S
2018-04-24 12:43 ` [dpdk-dev] [v2,4/6] test: add event crypto adapter auto-test Abhinandan Gujjar
2018-04-25 14:40   ` Akhil Goyal [this message]
2018-04-26  4:58     ` Gujjar, Abhinandan S
2018-04-24 12:43 ` [dpdk-dev] [v2, 5/6] eventdev: add event crypto adapter to meson build system Abhinandan Gujjar
2018-04-29 16:25   ` Jerin Jacob
2018-04-30 11:21     ` Gujjar, Abhinandan S
2018-04-30 11:27       ` Jerin Jacob
2018-04-24 12:43 ` [dpdk-dev] [v2,6/6] doc: add event crypto adapter documentation Abhinandan Gujjar
2018-04-25 10:31   ` [dpdk-dev] [v2, 6/6] " Kovacevic, Marko
2018-04-25 12:15     ` Gujjar, Abhinandan S
2018-04-29 16:30   ` Jerin Jacob
2018-04-30 11:33     ` Gujjar, Abhinandan S

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=4750e560-5c72-8f1d-ac8e-99af53f5bc20@nxp.com \
    --to=akhil.goyal@nxp.com \
    --cc=abhinandan.gujjar@intel.com \
    --cc=dev@dpdk.org \
    --cc=gage.eads@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=narender.vangati@intel.com \
    --cc=nikhil.rao@intel.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).