DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Cc: hemant.agrawal@nxp.com, akhil.goyal@nxp.com, dev@dpdk.org,
	narender.vangati@intel.com, nikhil.rao@intel.com,
	gage.eads@intel.com
Subject: Re: [dpdk-dev] [v3,4/5] test: add event crypto adapter auto-test
Date: Mon, 7 May 2018 15:38:34 +0530	[thread overview]
Message-ID: <20180507100833.GA7848@jerin> (raw)
In-Reply-To: <1525546030-11204-5-git-send-email-abhinandan.gujjar@intel.com>

-----Original Message-----
> Date: Sun, 6 May 2018 00:17:09 +0530
> From: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
> To: jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com,
>  akhil.goyal@nxp.com, dev@dpdk.org
> CC: narender.vangati@intel.com, abhinandan.gujjar@intel.com,
>  nikhil.rao@intel.com, gage.eads@intel.com
> Subject: [v3,4/5] test: add event crypto adapter auto-test
> X-Mailer: git-send-email 1.9.1
> 
> Signed-off-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
> ---
> +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,
> +	.sub_event_type = 0,
> +	.event_type = 0,
> +	.priority = 0,
> +	.impl_opaque = 0
> +};

This may break old compiler.
see http://dpdk.org/dev/patchwork/patch/39398/

> +
> +struct rte_event_crypto_request request_info = {
> +	.cdev_id = TEST_CDEV_ID,
> +	.queue_pair_id = TEST_CDEV_QP_ID
> +};
> +
> +static int
> +test_crypto_adapter_stats(void)
> +{
> +	struct rte_event_crypto_adapter_stats stats;
> +
> +	rte_event_crypto_adapter_stats_get(TEST_ADAPTER_ID, &stats);
> +	printf(" +------------------------------------------------------+\n");
> +	printf(" + Crypto adapter stats for instance %u:\n", TEST_ADAPTER_ID);
> +	printf(" + Event port poll count          %lu\n",
> +		stats.event_poll_count);
> +	printf(" + Event dequeue count            %lu\n",
> +		stats.event_deq_count);
> +	printf(" + Cryptodev enqueue count        %lu\n",
> +		stats.crypto_enq_count);
> +	printf(" + Cryptodev enqueue failed count %lu\n",
> +		stats.crypto_enq_fail);
> +	printf(" + Cryptodev dequeue count        %lu\n",
> +		stats.crypto_deq_count);
> +	printf(" + Event enqueue count            %lu\n",
> +		stats.event_enq_count);
> +	printf(" + Event enqueue retry count      %lu\n",
> +		stats.event_enq_retry_count);
> +	printf(" + Event enqueue fail count       %lu\n",

Use PRIx64 to fix issue with 32b build target.

> +		stats.event_enq_fail_count);
> +	printf(" +------------------------------------------------------+\n");
> +
> +	rte_event_crypto_adapter_stats_reset(TEST_ADAPTER_ID);
> +	return TEST_SUCCESS;
> +}
> +
> +static int
> +configure_eventdev(void)
> +{
> +	const char *eventdev_name = "event_sw0";
> +	struct rte_event_queue_conf queue_conf;
> +	struct rte_event_dev_config devconf;
> +	struct rte_event_dev_info info;
> +	uint32_t queue_count;
> +	uint32_t port_count;
> +	int ret;
> +	uint8_t qid;
> +
> +	evdev = rte_event_dev_get_dev_id(eventdev_name);

No need to assume it is "event_sw0" driver. You can select 0th event
device for testing. If none of the event device is available then you can 
create "event_sw0" with vdev.

> +	if (evdev < 0) {
> +		if (rte_vdev_init(eventdev_name, NULL) < 0) {
> +			RTE_LOG(DEBUG, USER1, "Error creating eventdev\n");
> +			return TEST_FAILED;
> +		}
> +		evdev = rte_event_dev_get_dev_id(eventdev_name);
> +		if (evdev < 0) {
> +			RTE_LOG(DEBUG, USER1, "Error finding eventdev!\n");
> +			return TEST_FAILED;
> +		}
> +	}
> +
> +	ret = rte_event_dev_info_get(evdev, &info);
> +	TEST_ASSERT_SUCCESS(ret, "Failed to get event dev info\n");
> +
> +static struct unit_test_suite service_tests  = {

It is not "service_tests". Choose an appropriate name.

  parent reply	other threads:[~2018-05-07 10:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-05 18:47 [dpdk-dev] [v3,0/5] eventdev: cover letter - crypto adapter Abhinandan Gujjar
2018-05-05 18:47 ` [dpdk-dev] [v3,1/5] eventdev: introduce event " Abhinandan Gujjar
2018-05-07  9:35   ` Jerin Jacob
2018-05-07 12:32     ` Akhil Goyal
2018-05-07 13:07       ` Jerin Jacob
2018-05-08  7:34       ` Gujjar, Abhinandan S
2018-05-08 12:49         ` Jerin Jacob
2018-05-08 12:52           ` Gujjar, Abhinandan S
2018-05-05 18:47 ` [dpdk-dev] [v3, 2/5] eventdev: add APIs and PMD callbacks for " Abhinandan Gujjar
2018-05-07  9:52   ` Jerin Jacob
2018-05-08  8:39     ` Gujjar, Abhinandan S
2018-05-07 15:28   ` Akhil Goyal
2018-05-08  8:46     ` Gujjar, Abhinandan S
2018-05-05 18:47 ` [dpdk-dev] [v3,3/5] eventdev: add crypto adapter implementation Abhinandan Gujjar
2018-05-07  4:58   ` [dpdk-dev] [v3, 3/5] " Jerin Jacob
2018-05-07  6:50   ` Jerin Jacob
2018-05-05 18:47 ` [dpdk-dev] [v3,4/5] test: add event crypto adapter auto-test Abhinandan Gujjar
2018-05-07  5:20   ` Jerin Jacob
2018-05-07  5:58   ` Jerin Jacob
2018-05-07 10:08   ` Jerin Jacob [this message]
2018-05-08  8:27     ` Gujjar, Abhinandan S
2018-05-05 18:47 ` [dpdk-dev] [v3,5/5] doc: add event crypto adapter documentation Abhinandan Gujjar
2018-05-07 12:27   ` [dpdk-dev] [v3, 5/5] " 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=20180507100833.GA7848@jerin \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=abhinandan.gujjar@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=gage.eads@intel.com \
    --cc=hemant.agrawal@nxp.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).