From: Mattias Rönnblom Date: Mon, 4 May 2020 09:30:59 +0000 (+0200) Subject: event/dsw: avoid reusing previously recorded events X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=52b66b2f208aea74e5fc3b004c1e14056bb22970;p=dpdk.git event/dsw: avoid reusing previously recorded events 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 --- 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