From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 36E01A04AF; Mon, 4 May 2020 11:31:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 99FF11D407; Mon, 4 May 2020 11:31:23 +0200 (CEST) Received: from mail.lysator.liu.se (mail.lysator.liu.se [130.236.254.3]) by dpdk.org (Postfix) with ESMTP id C6DE51D381; Mon, 4 May 2020 11:31:21 +0200 (CEST) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 7550E40008; Mon, 4 May 2020 11:31:20 +0200 (CEST) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 624454000D; Mon, 4 May 2020 11:31:20 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on bernadotte.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,AWL autolearn=disabled version=3.4.2 X-Spam-Score: -1.0 Received: from isengard.friendlyfire.se (host-95-205-21-109.mobileonline.telia.com [95.205.21.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id DAB0040008; Mon, 4 May 2020 11:31:17 +0200 (CEST) From: =?UTF-8?q?Mattias=20R=C3=B6nnblom?= To: jerinj@marvell.com Cc: dev@dpdk.org, =?UTF-8?q?Mattias=20R=C3=B6nnblom?= , stable@dpdk.org, Venky Venkatesh Date: Mon, 4 May 2020 11:30:59 +0200 Message-Id: <20200504093059.12458-1-hofors@lysator.liu.se> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2] event/dsw: avoid reusing previously recorded events X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Mattias Rönnblom 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 --- 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