event/dsw: immediately flush buffers on zero-sized enqueue

Message ID 20191217111344.27468-1-mattias.ronnblom@ericsson.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series event/dsw: immediately flush buffers on zero-sized enqueue |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/travis-robot warning Travis build: failed
ci/Intel-compilation fail apply issues

Commit Message

Mattias Rönnblom Dec. 17, 2019, 11:13 a.m. UTC
  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 | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Jerin Jacob Kollanukkaran Jan. 14, 2020, 5:24 p.m. UTC | #1
> -----Original Message-----
> From: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
> Sent: Tuesday, December 17, 2019 4:44 PM
> To: Jerin Jacob Kollanukkaran <jerinj@marvell.com>
> Cc: dev@dpdk.org; niclas.storm@ericsson.com; Mattias Rönnblom
> <mattias.ronnblom@ericsson.com>; stable@dpdk.org
> Subject: [EXT] [PATCH] event/dsw: immediately flush buffers on zero-sized
> enqueue
> 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>

Applied to dpdk-next-eventdev/master. Thanks.


> ---
>  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 61a66fabf..1641c2d06 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.17.1
  

Patch

diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c
index 61a66fabf..1641c2d06 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;
 	}