From 52b66b2f208aea74e5fc3b004c1e14056bb22970 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mattias=20R=C3=B6nnblom?= Date: Mon, 4 May 2020 11:30:59 +0200 Subject: [PATCH] event/dsw: avoid reusing previously recorded events MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Mattias Rönnblom --- 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 8323903736..e5e3597aae 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