eventdev: ease single-link queue config requirements
PATCH 1/1 eventdev: ease single-link queue config requirements
Events sent through single-link queues are naturally in-order and atomic, without reordering or atomic scheduling. Logically the nb_atomic_flows and nb_atomic_order_sequences arguments don't apply to a single link queue, but applications must set these (depending on the queue config type) to bypass the is_valid_{ordered, atomic}_queue_conf() checks in the eventdev layer.
This commit updates those is_valid_* functions to ignore queues with the SINGLE_LINK flag, to simplify their configuration.
--- examples/eventdev_pipeline_sw_pmd/main.c | 6 +----- lib/librte_eventdev/rte_eventdev.c | 8 ++++++-- test/test/test_eventdev_sw.c | 4 ---- 3 files changed, 7 insertions(+), 11 deletions(-)
examples/eventdev_pipeline_sw_pmd/main.c +1 -5
@@ -696,11 +696,7 @@ setup_eventdev(struct prod_data *prod_data, };const struct rte_event_queue_conf tx_q_conf = { .priority =RTE_EVENT_DEV_PRIORITY_HIGHEST , - .event_queue_cfg = -RTE_EVENT_QUEUE_CFG_ATOMIC_ONLY | -RTE_EVENT_QUEUE_CFG_SINGLE_LINK , - .nb_atomic_flows =1024 , - .nb_atomic_order_sequences =1024 , + .event_queue_cfg =RTE_EVENT_QUEUE_CFG_SINGLE_LINK , };struct port_link worker_queues[MAX_NUM_STAGES ];
lib/librte_eventdev/rte_eventdev.c +6 -2
@@ -519,7 +519,9 @@ rte_event_queue_default_conf_get(uint8_t dev_id, uint8_t queue_id,static inline int is_valid_atomic_queue_conf (const struct rte_event_queue_conf *queue_conf) { - if (queue_conf && ( + if (queue_conf && + !(queue_conf->event_queue_cfg & + RTE_EVENT_QUEUE_CFG_SINGLE_LINK) && ( ((queue_conf->event_queue_cfg & RTE_EVENT_QUEUE_CFG_TYPE_MASK) == RTE_EVENT_QUEUE_CFG_ALL_TYPES) ||
@@ -535,7 +537,9 @@ is_valid_atomic_queue_conf(const struct rte_event_queue_conf *queue_conf)static inline int is_valid_ordered_queue_conf (const struct rte_event_queue_conf *queue_conf) { - if (queue_conf && ( + if (queue_conf && + !(queue_conf->event_queue_cfg & + RTE_EVENT_QUEUE_CFG_SINGLE_LINK) && ( ((queue_conf->event_queue_cfg & RTE_EVENT_QUEUE_CFG_TYPE_MASK) == RTE_EVENT_QUEUE_CFG_ALL_TYPES) ||
test/test/test_eventdev_sw.c +0 -4
@@ -267,8 +267,6 @@ create_directed_qids(struct test *t, int num_qids, const uint8_t ports[])static const struct rte_event_queue_conf conf = { .priority =RTE_EVENT_DEV_PRIORITY_NORMAL , .event_queue_cfg =RTE_EVENT_QUEUE_CFG_SINGLE_LINK , - .nb_atomic_flows =1024 , - .nb_atomic_order_sequences =1024 , };for (i = t->nb_qids; i < t->nb_qids + num_qids; i++) {
@@ -1334,8 +1332,6 @@ port_single_lb_reconfig(struct test *t)static const struct rte_event_queue_conf conf_single_link = { .priority =RTE_EVENT_DEV_PRIORITY_NORMAL , .event_queue_cfg =RTE_EVENT_QUEUE_CFG_SINGLE_LINK , - .nb_atomic_flows =1024 , - .nb_atomic_order_sequences =1024 , };if (rte_event_queue_setup (evdev,1 , &conf_single_link) <0 ) {printf ("%d: error creating qid\n" , __LINE__);
Signature · 1 line
2.7.4
-----Original Message-----
Quoted 16 lines
Date: Wed, 9 Aug 2017 14:58:04 -0500
From: Gage Eads <[email protected]>
To: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected], [email protected]
Subject: [PATCH] eventdev: ease single-link queue config requirements
X-Mailer: git-send-email 2.7.4Events sent through single-link queues are naturally in-order and atomic, without reordering or atomic scheduling. Logically the
nb_atomic_flowsandnb_atomic_order_sequencesarguments don't apply to a single link queue, but applications must set these (depending on the queue config type) to bypass the is_valid_{ordered, atomic}_queue_conf() checks in the eventdev layer.
Quoted 4 lines
This commit updates those is_valid_* functions to ignore queues with the
SINGLE_LINKflag, to simplify their configuration.Signed-off-by Gage Eads <[email protected]>
Jerin Jacob
Applied-----Original Message-----
Quoted 25 lines
Date: Mon, 4 Sep 2017 11:39:13 +0530
From: Jerin Jacob <[email protected]>
To: Gage Eads <[email protected]>
Cc: [email protected], [email protected], [email protected],
[email protected], [email protected]
Subject: Re: [PATCH] eventdev: ease single-link queue config requirements
User-Agent: Mutt/1.9.0 (2017-09-02)-----Original Message-----
Quoted 16 lines
Date: Wed, 9 Aug 2017 14:58:04 -0500
From: Gage Eads <[email protected]>
To: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected], [email protected]
Subject: [PATCH] eventdev: ease single-link queue config requirements
X-Mailer: git-send-email 2.7.4Events sent through single-link queues are naturally in-order and atomic, without reordering or atomic scheduling. Logically the
nb_atomic_flowsandnb_atomic_order_sequencesarguments don't apply to a single link queue, but applications must set these (depending on the queue config type) to bypass the is_valid_{ordered, atomic}_queue_conf() checks in the eventdev layer.
Quoted 6 lines
Quoted 4 lines
This commit updates those is_valid_* functions to ignore queues with the
SINGLE_LINKflag, to simplify their configuration.Signed-off-by Gage Eads <[email protected]>Acked-by Jerin Jacob <[email protected]>
Updated the next-eventdev tree to dpdk/master.
Applied to dpdk-next-eventdev/master. Thanks.