From 5747c83257306ad8e546e456fcfe8e89dac48bf9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20R=C3=B6nnblom?= Date: Tue, 17 Dec 2019 12:13:44 +0100 Subject: [PATCH] event/dsw: flush buffers immediately on zero-sized enqueue MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fix DSW's rte_event_enqueue_burst(), so that a call with a zero-sized event array immediately flushes the port's output buffers. Prior to this patch, the flush operation would be deferred to the next enqueue or dequeue call, which is inconsistent with DSW documentation. Fixes: 1c8e3caa3bfb ("event/dsw: add event scheduling and device start/stop") Cc: stable@dpdk.org Signed-off-by: Mattias Rönnblom --- drivers/event/dsw/dsw_event.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c index 61a66fabf3..1641c2d06e 100644 --- a/drivers/event/dsw/dsw_event.c +++ b/drivers/event/dsw/dsw_event.c @@ -1047,6 +1047,7 @@ dsw_event_enqueue_burst_generic(void *port, const struct rte_event events[], */ if (unlikely(events_len == 0)) { dsw_port_note_op(source_port, DSW_MAX_PORT_OPS_PER_BG_TASK); + dsw_port_flush_out_buffers(dsw, port); return 0; } -- 2.20.1