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

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).