DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] event/dsw: avoid reusing previously recorded events
@ 2020-05-04  9:30 Mattias Rönnblom
  2020-05-04 11:52 ` Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: Mattias Rönnblom @ 2020-05-04  9:30 UTC (permalink / raw)
  To: jerinj; +Cc: dev, Mattias Rönnblom, stable, Venky Venkatesh

From: Mattias Rönnblom <mattias.ronnblom@ericsson.com>

Avoid reusing recorded events when performing a migration, since this
may make the migration selection logic pick an already-moved flow.

Fixes: f6257b22e767 ("event/dsw: add load balancing")
Cc: stable@dpdk.org

Reported-by: Venky Venkatesh <vvenkatesh@paloaltonetworks.com>
Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
---
V2: rebase

 drivers/event/dsw/dsw_event.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c
index 832390373..367cf8590 100644
--- a/drivers/event/dsw/dsw_event.c
+++ b/drivers/event/dsw/dsw_event.c
@@ -821,6 +821,9 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw,
 	if (dsw->num_ports == 1)
 		return;
 
+	if (seen_events_len < DSW_MAX_EVENTS_RECORDED)
+	    return;
+
 	DSW_LOG_DP_PORT(DEBUG, source_port->id, "Considering emigration.\n");
 
 	/* Randomize interval to avoid having all threads considering
-- 
2.20.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH v2] event/dsw: avoid reusing previously recorded events
  2020-05-04  9:30 [dpdk-dev] [PATCH v2] event/dsw: avoid reusing previously recorded events Mattias Rönnblom
@ 2020-05-04 11:52 ` Jerin Jacob
  0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2020-05-04 11:52 UTC (permalink / raw)
  To: Mattias Rönnblom
  Cc: Jerin Jacob, dpdk-dev, Mattias Rönnblom, dpdk stable,
	Venky Venkatesh

On Mon, May 4, 2020 at 3:01 PM Mattias Rönnblom <hofors@lysator.liu.se> wrote:
>
> From: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
>
> Avoid reusing recorded events when performing a migration, since this
> may make the migration selection logic pick an already-moved flow.
>
> Fixes: f6257b22e767 ("event/dsw: add load balancing")
> Cc: stable@dpdk.org
>
> Reported-by: Venky Venkatesh <vvenkatesh@paloaltonetworks.com>
> Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
> ---
> V2: rebase


Fixed following checkpatch warnings and applied to
dpdk-next-eventdev/master. Thanks.

WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional
statements (8, 12)
#26: FILE: drivers/event/dsw/dsw_event.c:824:
+       if (seen_events_len < DSW_MAX_EVENTS_RECORDED)
+           return;

WARNING:TABSTOP: Statements should start on a tabstop
#27: FILE: drivers/event/dsw/dsw_event.c:825:
+           return;


>  drivers/event/dsw/dsw_event.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/event/dsw/dsw_event.c b/drivers/event/dsw/dsw_event.c
> index 832390373..367cf8590 100644
> --- a/drivers/event/dsw/dsw_event.c
> +++ b/drivers/event/dsw/dsw_event.c
> @@ -821,6 +821,9 @@ dsw_port_consider_emigration(struct dsw_evdev *dsw,
>         if (dsw->num_ports == 1)
>                 return;
>
> +       if (seen_events_len < DSW_MAX_EVENTS_RECORDED)
> +           return;
> +
>         DSW_LOG_DP_PORT(DEBUG, source_port->id, "Considering emigration.\n");
>
>         /* Randomize interval to avoid having all threads considering
> --
> 2.20.1
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-04 11:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-04  9:30 [dpdk-dev] [PATCH v2] event/dsw: avoid reusing previously recorded events Mattias Rönnblom
2020-05-04 11:52 ` Jerin Jacob

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).