All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerin Jacob <jerin.jacob@caviumnetworks.com>
To: Nikhil Rao <nikhil.rao@intel.com>
Cc: bruce.richardson@intel.com, gage.eads@intel.com, dev@dpdk.org,
	thomas@monjalon.net, harry.van.haaren@intel.com,
	hemant.agrawal@nxp.com, nipun.gupta@nxp.com,
	narender.vangati@intel.com, erik.g.carrillo@intel.com,
	abhinandan.gujjar@intel.com, santosh.shukla@caviumnetworks.com
Subject: Re: [PATCH v4 4/4] eventdev: Add tests for event eth Rx adapter APIs
Date: Fri, 22 Sep 2017 17:42:26 +0530	[thread overview]
Message-ID: <20170922121225.GA22639@jerin> (raw)
In-Reply-To: <1506028634-22998-5-git-send-email-nikhil.rao@intel.com>

-----Original Message-----
> Date: Fri, 22 Sep 2017 02:47:14 +0530
> From: Nikhil Rao <nikhil.rao@intel.com>
> To: jerin.jacob@caviumnetworks.com, bruce.richardson@intel.com
> CC: gage.eads@intel.com, dev@dpdk.org, thomas@monjalon.net,
>  harry.van.haaren@intel.com, hemant.agrawal@nxp.com, nipun.gupta@nxp.com,
>  narender.vangati@intel.com, erik.g.carrillo@intel.com,
>  abhinandan.gujjar@intel.com, santosh.shukla@caviumnetworks.com
> Subject: [PATCH v4 4/4] eventdev: Add tests for event eth Rx adapter APIs
> X-Mailer: git-send-email 2.7.4
> 
> Add unit tests for rte_event_eth_rx_adapter_xxx() APIs
> 
> Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
> ---
>  test/test/test_event_eth_rx_adapter.c | 399 ++++++++++++++++++++++++++++++++++
>  test/test/Makefile                    |   1 +
>  2 files changed, 400 insertions(+)
>  create mode 100644 test/test/test_event_eth_rx_adapter.c
> 
> diff --git a/test/test/test_event_eth_rx_adapter.c b/test/test/test_event_eth_rx_adapter.c
> new file mode 100644
> index 000000000..5d448dc27
> --- /dev/null
> +++ b/test/test/test_event_eth_rx_adapter.c
> @@ -0,0 +1,399 @@
> +/*-
> + *   BSD LICENSE
> + *
> + *   Copyright(c) 2017 Intel Corporation. All rights reserved.
> + *
> + *   Redistribution and use in source and binary forms, with or without
> + *   modification, are permitted provided that the following conditions
> + *   are met:
> + *
> + *     * Redistributions of source code must retain the above copyright
> + *       notice, this list of conditions and the following disclaimer.
> + *     * Redistributions in binary form must reproduce the above copyright
> + *       notice, this list of conditions and the following disclaimer in
> + *       the documentation and/or other materials provided with the
> + *       distribution.
> + *     * Neither the name of Intel Corporation nor the names of its
> + *       contributors may be used to endorse or promote products derived
> + *       from this software without specific prior written permission.
> + *
> + *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
> + *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
> + *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
> + *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
> + *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> + *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> + *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
> + *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
> + *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> + *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> + *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> + */
> +#include <string.h>
> +#include <rte_common.h>
> +#include <rte_mempool.h>
> +#include <rte_mbuf.h>
> +#include <rte_ethdev.h>
> +#include <rte_eventdev.h>
> +
> +#include <rte_event_eth_rx_adapter.h>
> +
> +#include "test.h"
> +
> +/* i40e limits max to 64 */

This comment could be removed.

> +#define MAX_NUM_RX_QUEUE	64
> +#define NB_MBUFS		(8192 * num_ports * MAX_NUM_RX_QUEUE)
> +#define MBUF_CACHE_SIZE		512
> +#define MBUF_PRIV_SIZE		0
> +
> +struct event_eth_rx_adapter_test_params {
> +	struct rte_mempool *mp;
> +	uint16_t rx_rings, tx_rings;
> +	uint32_t caps;
> +};
> +
> +static struct event_eth_rx_adapter_test_params default_params;
> +
> +static int
> +testsuite_setup(void)
> +{
> +	int err;
> +	err = init_ports(rte_eth_dev_count());
> +	TEST_ASSERT(err == 0, "Port initialization failed err %d\n", err);

I guess, We check rte_event_dev_count() >= 1 before proceeding.

> +
> +	struct rte_event_dev_config config = {
> +			.nb_event_queues = 1,
> +			.nb_event_ports = 1,
> +			.nb_events_limit  = 4096,
> +			.nb_event_queue_flows = 1024,
> +			.nb_event_port_dequeue_depth = 16,
> +			.nb_event_port_enqueue_depth = 16
> +	};
> +
> +	err = rte_event_dev_configure(0, &config);
> +	TEST_ASSERT(err == 0, "Event device initialization failed err %d\n",
> +			err);
> +
> +	err = rte_event_eth_rx_adapter_caps_get(0, 0, &default_params.caps);
> +	TEST_ASSERT(err == 0, "Failed to get adapter cap err %d\n",
> +			err);
> +
> +	return err;
> +}
> +

  reply	other threads:[~2017-09-22 12:12 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-21 21:17 [PATCH v4 0/4] eventdev: cover letter: ethernet Rx queue event adapter Nikhil Rao
2017-09-21 21:17 ` [PATCH v4 1/4] eventdev: Add caps API and PMD callbacks for rte_event_eth_rx_adapter Nikhil Rao
2017-09-21 15:46   ` Jerin Jacob
2017-09-24 12:14     ` Rao, Nikhil
2017-10-02  8:48       ` Jerin Jacob
2017-09-21 21:17 ` [PATCH v4 2/4] eventdev: Add ethernet Rx adapter caps function to eventdev SW PMD Nikhil Rao
2017-09-22  2:49   ` Jerin Jacob
2017-09-22  5:27   ` santosh
2017-09-21 21:17 ` [PATCH v4 3/4] eventdev: Add eventdev ethernet Rx adapter Nikhil Rao
2017-09-21 15:43   ` Pavan Nikhilesh Bhagavatula
2017-09-23 11:35     ` Rao, Nikhil
2017-10-03  9:09       ` Pavan Nikhilesh Bhagavatula
2017-09-22  6:08   ` santosh
2017-10-02 10:20     ` Rao, Nikhil
2017-09-22  9:10   ` Jerin Jacob
2017-09-24 18:16     ` Rao, Nikhil
2017-09-25  2:59       ` Rao, Nikhil
2017-10-02 10:28         ` Rao, Nikhil
2017-10-02 10:39           ` Jerin Jacob
2017-10-05  8:54             ` Rao, Nikhil
2017-10-03 13:52       ` Jerin Jacob
2017-10-05  8:12         ` Rao, Nikhil
2017-09-21 21:17 ` [PATCH v4 4/4] eventdev: Add tests for event eth Rx adapter APIs Nikhil Rao
2017-09-22 12:12   ` Jerin Jacob [this message]
2017-09-24 18:24     ` Rao, Nikhil
2017-10-02 10:31       ` Jerin Jacob
2017-10-04 11:28         ` Rao, Nikhil
2017-10-03 11:36   ` Pavan Nikhilesh Bhagavatula
2017-10-05  5:57     ` Rao, Nikhil
2017-10-05  8:08       ` Pavan Nikhilesh Bhagavatula

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=20170922121225.GA22639@jerin \
    --to=jerin.jacob@caviumnetworks.com \
    --cc=abhinandan.gujjar@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=erik.g.carrillo@intel.com \
    --cc=gage.eads@intel.com \
    --cc=harry.van.haaren@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=narender.vangati@intel.com \
    --cc=nikhil.rao@intel.com \
    --cc=nipun.gupta@nxp.com \
    --cc=santosh.shukla@caviumnetworks.com \
    --cc=thomas@monjalon.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.