From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B3CF6A0032 for ; Mon, 11 Jul 2022 22:43:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D94F40156; Mon, 11 Jul 2022 22:43:28 +0200 (CEST) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by mails.dpdk.org (Postfix) with ESMTP id D422140156; Mon, 11 Jul 2022 22:43:26 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 56F2F320092A; Mon, 11 Jul 2022 16:43:25 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 11 Jul 2022 16:43:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1657572204; x= 1657658604; bh=Gv9uGKBPxjsxcXGQno0OHAHw2jm958yfUoZxUjlRbQw=; b=Y d+O7ZlwU+qaojL91E5dwouvr0Ci1f6M3CIwwywc+vS7tmjTgFB1nHUmuGbDDOJeL 3vLBKYulop7JLEZBofoJ++m+9rsJ8tR6X7ksXe4Zv1C+eyuiMfSh1SChPRMoYDWB PrLIJvtcMZL0ZDYGPhtDrxyMeZ+qHsc8Ki+9rs4LUcb7G8YnKdOXPPHkaYMdcD0B ia0t8Lu9XDkn5VtODQsCWfhX2Ik0AC3MzUlQNiAgmVsUHr9Tw23PR1hrNPbs84A4 9pvu3Tt8ImAzkGDp2WlkaN7OXpxltykodAdbzeI4Cm/aKCo5WNueS2ORCUKgR+Rn gTLOiDwXNLy6YsjN4771g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1657572204; x= 1657658604; bh=Gv9uGKBPxjsxcXGQno0OHAHw2jm958yfUoZxUjlRbQw=; b=N orLj/KaahaWnYV8Zqr2woXf7JSV+7XtDR+j7mrPUQgTfLz5c1ymMyh6O7Fjk7LVr h415jO0Lfexs4Gwqux7tB/MKIAir9R/jlTj+AP2GtOUUupfF8QEGHdnWXuVFaalZ OBHVGFrZWMs/UMd2rldTU4Mi0QOCYbc6cxHRWbHgRbIgjiD0y93YIXOiNrKvcUxH V4rm8woIiD9iNU7Ef5jgdU/yXNfkCtJhexk/IPcA2CXj2imVNkPUVb3o5LrD8c6i pnbTK1zTBi7yYzQYEtPFLyduvanCF5Hy2O9LviAuuzVOBZyLwIxD81h/GN0HK1Kv udXNCJJXVfwouTlWiYFkg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudejfedgudehfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkfgjfhgggfgtsehtqhertddttddunecuhfhrohhmpefvhhho mhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqne cuggftrfgrthhtvghrnhepfefhjeeluedvvedtuddtuedtvefhieejtefhffeujefhtedu udevtdektdeikeffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 11 Jul 2022 16:43:23 -0400 (EDT) From: Thomas Monjalon To: Mattias =?ISO-8859-1?Q?R=F6nnblom?= , Mattias =?ISO-8859-1?Q?R=F6nnblom?= Cc: dev@dpdk.org, Jerin Jacob , dpdk stable , Jerin Jacob Subject: Re: [PATCH] event/dsw: fix migration bug Date: Mon, 11 Jul 2022 22:43:22 +0200 Message-ID: <3811024.d4nMDBE73Y@thomas> In-Reply-To: References: <20220707114325.3098735-1-hofors@lysator.liu.se> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 11/07/2022 14:45, Jerin Jacob: > On Thu, Jul 7, 2022 at 5:13 PM Mattias R=F6nnblom = wrote: > > > > From: Mattias R=F6nnblom > > > > Fix bug in flow migration, which under certain conditions causes > > reordering and violation of atomicity guarantees. > > > > The issue occurs when the processing of a flow (on an atomic queue) > > has resulted in events enqueued to a flow currently being migrated, > > and the former (producer) flow is also selected for migration. The > > events are buffered ("paused") on the originating port, and released > > (forwarded) when the migration has completed. However, at the time of > > "unpausing" the latter (consumer) flow, processing of the producer > > flow on the port to which it was migrated may have already produced > > events, for the same paused flow. This constitutes a race condition, > > and depending on which port wins, reordering may have been introduced. > > > > This patch forbids migration when a port has paused events, since > > those events may have been the result of processing a to-be-migrated > > flow. > > > > This patch also disallows processing events pertaining to a flow under > > migration, for the same reason. A new buffer is introduced, which > > holds such not-yet-processed events dequeued from the port's input > > ring. Such events are forwarded to the target port as a part of the > > migration process. > > > > The 'forwarding' migration state is eliminated, and instead background > > processing is only performed if there are no unreleased events on the > > port. > > > > The bug is primarily triggered in situations where multiple flows are > > migrated as one transaction, but may occur even if only a single flow > > is migrated (e.g., with older DSW versions, which does not support > > multi-flow migration). > > > > Fixes: f6257b22e767 ("event/dsw: add load balancing") > > Cc: stable@dpdk.org > > > > Signed-off-by: Mattias R=F6nnblom >=20 > + @Thomas Monjalon to merge to the main tree directly. No sorry, it would not be serious to merge such a big patch in the last minute. And it is not a new bug.