event/dsw: flush buffers immediately on zero-sized enqueue
authorMattias Rönnblom <mattias.ronnblom@ericsson.com>
Tue, 17 Dec 2019 11:13:44 +0000 (12:13 +0100)
committerJerin Jacob <jerinj@marvell.com>
Tue, 14 Jan 2020 17:24:03 +0000 (18:24 +0100)
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 <mattias.ronnblom@ericsson.com>
drivers/event/dsw/dsw_event.c

index 61a66fa..1641c2d 100644 (file)
@@ -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;
        }