Skip to content

Commit

Permalink
event/dsw: flush buffers immediately on zero-sized enqueue
Browse files Browse the repository at this point in the history
[ upstream commit 5747c83 ]

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: 1c8e3ca ("event/dsw: add event scheduling and device start/stop")

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
  • Loading branch information
m-ronnblom authored and kevintraynor committed Feb 7, 2020
1 parent a4b2868 commit 2bc50a1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/event/dsw/dsw_event.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2bc50a1

Please sign in to comment.