[dpdk-dev] [PATCH 3/4] app/eventdev: add perf pipeline test
Pavan Nikhilesh Bhagavatula
pbhagavatula at caviumnetworks.com
Fri Dec 1 06:19:35 CET 2017
Hi Gage,
Thanks for the review, will clean it up in v2.
On Thu, Nov 30, 2017 at 05:15:14PM +0000, Eads, Gage wrote:
> Hi Pavan,
>
> > -----Original Message-----
> > From: Pavan Nikhilesh [mailto:pbhagavatula at caviumnetworks.com]
> > Sent: Thursday, November 30, 2017 1:24 AM
> > To: jerin.jacobkollanukkaran at cavium.com; Eads, Gage
> > <gage.eads at intel.com>; Van Haaren, Harry <harry.van.haaren at intel.com>;
> > Richardson, Bruce <bruce.richardson at intel.com>; hemant.agrawal at nxp.com;
> > nipun.gupta at nxp.com; Rao, Nikhil <nikhil.rao at intel.com>
> > Cc: dev at dpdk.org; Pavan Nikhilesh <pbhagavatula at caviumnetworks.com>
> > Subject: [dpdk-dev] [PATCH 3/4] app/eventdev: add perf pipeline test
> >
> > This is a performance test case that aims at testing the following:
> > 1. Measure the end-to-end performance of an event dev with a ethernet dev.
> > 2. Maintain packet ordering from Rx to Tx.
> >
> > The perf pipeline test configures the eventdev with Q queues and P ports, where
> > Q is nb_ethdev * nb_stages and P is nb_workers.
> >
> > The user can choose the number of workers and number of stages through the --
> > wlcores and the --stlist application command line arguments respectively.
> > The probed ethernet devices act as producer(s) for this application.
> >
> > The ethdevs are configured as event Rx adapters that enables them to injects
> > events to eventdev based the first stage schedule type list requested by the user
> > through --stlist the command line argument.
> >
> > Based on the number of stages to process(selected through --stlist), the
> > application forwards the event to next upstream queue and when it reaches last
> > stage in the pipeline if the event type is ATOMIC it is enqueued onto ethdev Tx
> > queue else to maintain ordering the event type is set to ATOMIC and enqueued
> > onto the last stage queue.
> > On packet Tx, application increments the number events processed and print
> > periodically in one second to get the number of events processed in one second.
> >
> > Note: The --prod_type_ethdev is mandatory for running the application.
> >
> > Example command to run perf pipeline test:
> > sudo build/app/dpdk-test-eventdev -c 0xf -s 0x8 --vdev=event_sw0 -- \ --
> > test=perf_pipeline --wlcore=1 --prod_type_ethdev --stlist=ao
> >
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula at caviumnetworks.com>
>
> </snip>
>
> > +static int
> > +perf_pipeline_eventdev_setup(struct evt_test *test, struct evt_options
> > +*opt) {
> > + int ret;
> > + int nb_ports;
> > + int nb_queues;
> > + int nb_stages = opt->nb_stages;
> > + uint8_t queue;
> > + uint8_t port;
> > + uint8_t atq = evt_has_all_types_queue(opt->dev_id);
> > + struct test_perf *t = evt_test_priv(test);
> > +
> > + nb_ports = evt_nr_active_lcores(opt->wlcores);
> > + nb_queues = rte_eth_dev_count() * (nb_stages);
> > + nb_queues += atq ? 0 : rte_eth_dev_count();
> > +
> > + const struct rte_event_dev_config config = {
> > + .nb_event_queues = nb_queues,
> > + .nb_event_ports = nb_ports,
> > + .nb_events_limit = 4096,
> > + .nb_event_queue_flows = opt->nb_flows,
> > + .nb_event_port_dequeue_depth = 128,
> > + .nb_event_port_enqueue_depth = 128,
> > + };
> > +
> > + ret = rte_event_dev_configure(opt->dev_id, &config);
> > + if (ret) {
> > + evt_err("failed to configure eventdev %d", opt->dev_id);
> > + return ret;
> > + }
> > +
> > + struct rte_event_queue_conf q_conf = {
> > + .priority = RTE_EVENT_DEV_PRIORITY_NORMAL,
> > + .nb_atomic_flows = opt->nb_flows,
> > + .nb_atomic_order_sequences = opt->nb_flows,
> > + };
> > + /* queue configurations */
> > + for (queue = 0; queue < nb_queues; queue++) {
> > + if (atq) {
> > + q_conf.event_queue_cfg =
> > RTE_EVENT_QUEUE_CFG_ALL_TYPES;
> > + } else {
> > + uint8_t slot;
> > +
> > + slot = queue % (nb_stages + 1);
> > + q_conf.schedule_type = slot == nb_stages ?
> > + RTE_SCHED_TYPE_ATOMIC :
> > + opt->sched_type_list[slot];
> > + }
> > +
> > + ret = rte_event_queue_setup(opt->dev_id, queue, &q_conf);
> > + if (ret) {
> > + evt_err("failed to setup queue=%d", queue);
> > + return ret;
> > + }
> > + }
> > +
> > + /* port configuration */
> > + const struct rte_event_port_conf p_conf = {
> > + .dequeue_depth = opt->wkr_deq_dep,
> > + .enqueue_depth = 64,
> > + .new_event_threshold = 4096,
> > + };
> > +
>
> For the hard-coded event device (new_event_threshold, port_dequeue_depth, enqueue_depth) and port configuration (enqueue_depth, new_event_threshold) values, it would be better to use the values from rte_event_dev_info_get() and rte_event_port_default_conf_get() instead.
>
> Thanks,
> Gage
More information about the dev
mailing list