event/dsw: ignore scheduling type for single-link queues

Message ID 20190510094723.3627-1-mattias.ronnblom@ericsson.com (mailing list archive)
State Superseded, archived
Headers
Series event/dsw: ignore scheduling type for single-link queues |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/intel-Performance-Testing success Performance Testing PASS
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/Intel-compilation success Compilation OK

Commit Message

Mattias Rönnblom May 10, 2019, 9:47 a.m. UTC
  The scheduling type parameter is not applicable for single link
queues. DSW would, at the time of rte_event_queue_setup(), erroneously
verify that scheduling type was one of the supported types, and
returned -ENOTSUP in case of RTE_SCHED_TYPE_ORDERED.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
 drivers/event/dsw/dsw_evdev.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
  

Comments

Mattias Rönnblom May 10, 2019, 9:53 a.m. UTC | #1
On 2019-05-10 11:47, Mattias Rönnblom wrote:
> The scheduling type parameter is not applicable for single link
> queues. DSW would, at the time of rte_event_queue_setup(), erroneously
> verify that scheduling type was one of the supported types, and
> returned -ENOTSUP in case of RTE_SCHED_TYPE_ORDERED.
> 
> Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>

Adding stable@dpdk.org.
  
Kevin Traynor May 10, 2019, 10:26 a.m. UTC | #2
On 10/05/2019 10:53, Mattias Rönnblom wrote:
> On 2019-05-10 11:47, Mattias Rönnblom wrote:
>> The scheduling type parameter is not applicable for single link
>> queues. DSW would, at the time of rte_event_queue_setup(), erroneously
>> verify that scheduling type was one of the supported types, and
>> returned -ENOTSUP in case of RTE_SCHED_TYPE_ORDERED.
>>
>> Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
> 
> Adding stable@dpdk.org.
> 

Please add it and a Fixes tag in the commit msg, so it won't be missed
later, thanks.
http://doc.dpdk.org/guides/contributing/stable.html#what-changes-should-be-backported
  

Patch

diff --git a/drivers/event/dsw/dsw_evdev.c b/drivers/event/dsw/dsw_evdev.c
index 4157d130c..9387d4149 100644
--- a/drivers/event/dsw/dsw_evdev.c
+++ b/drivers/event/dsw/dsw_evdev.c
@@ -102,9 +102,6 @@  dsw_queue_setup(struct rte_eventdev *dev, uint8_t queue_id,
 	if (RTE_EVENT_QUEUE_CFG_ALL_TYPES & conf->event_queue_cfg)
 		return -ENOTSUP;
 
-	if (conf->schedule_type == RTE_SCHED_TYPE_ORDERED)
-		return -ENOTSUP;
-
 	/* SINGLE_LINK is better off treated as TYPE_ATOMIC, since it
 	 * avoid the "fake" TYPE_PARALLEL flow_id assignment. Since
 	 * the queue will only have a single serving port, no
@@ -113,8 +110,12 @@  dsw_queue_setup(struct rte_eventdev *dev, uint8_t queue_id,
 	 */
 	if (RTE_EVENT_QUEUE_CFG_SINGLE_LINK & conf->event_queue_cfg)
 		queue->schedule_type = RTE_SCHED_TYPE_ATOMIC;
-	else /* atomic or parallel */
+	else {
+		if (conf->schedule_type == RTE_SCHED_TYPE_ORDERED)
+			return -ENOTSUP;
+		/* atomic or parallel */
 		queue->schedule_type = conf->schedule_type;
+	}
 
 	queue->num_serving_ports = 0;