From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <stable-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id B3CF6A0032
	for <public@inbox.dpdk.org>; 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: <xms:bIvMYh1My1cHFL-DCVQEgFU9veJTc4K8CoaY7eZHSyRbCkvsdDMH0w>
 <xme:bIvMYoGSo6DsiT9mzifT9q_4w7JpzE1-034czROpz2jMKv4MqPLLkmILbmT0Pt0Sf
 6Ho7Lz_LwtYOCpseg>
X-ME-Received: <xmr:bIvMYh6fkT80hJuVn19M1NOe6rw7r0_QuxxYKuncXFeW9PMd0WMMlF73OTmr6KAttrjvXMelsaIABohxOBPDl3UylA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudejfedgudehfecutefuodetggdotefrod
 ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh
 necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd
 enucfjughrpefhvfevufffkfgjfhgggfgtsehtqhertddttddunecuhfhrohhmpefvhhho
 mhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqne
 cuggftrfgrthhtvghrnhepfefhjeeluedvvedtuddtuedtvefhieejtefhffeujefhtedu
 udevtdektdeikeffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh
 hfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth
X-ME-Proxy: <xmx:bIvMYu0fgd66pH4jMilYwLSVFROX9apjTstjfTEb0m1KPSU9Yv0UTw>
 <xmx:bIvMYkFKafDVrh88NxHQ-x968HUpwia8sd3_cCKDkcVHBHpKq6xSGA>
 <xmx:bIvMYv-fXUi70_9RqL8BPjaTrA9o-7ut15QmKxFJmsJNZ60tc3Uorg>
 <xmx:bIvMYghEurKZWZbS4lkNsPJK4eYUEXs95ssB-cQsxl5c6ePISLSO-Q>
Feedback-ID: i47234305:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
 11 Jul 2022 16:43:23 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: Mattias =?ISO-8859-1?Q?R=F6nnblom?= <hofors@lysator.liu.se>,
 Mattias =?ISO-8859-1?Q?R=F6nnblom?= <mattias.ronnblom@ericsson.com>
Cc: dev@dpdk.org, Jerin Jacob <jerinj@marvell.com>,
 dpdk stable <stable@dpdk.org>, Jerin Jacob <jerinjacobk@gmail.com>
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: <CALBAE1O9EpvPsj_nZ=G0kEvrXpLhMZRpqW+2u9QwmsnkO=V5Cg@mail.gmail.com>
References: <20220707114325.3098735-1-hofors@lysator.liu.se>
 <CALBAE1O9EpvPsj_nZ=G0kEvrXpLhMZRpqW+2u9QwmsnkO=V5Cg@mail.gmail.com>
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 <stable.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=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 <hofors@lysator.liu.se>=
 wrote:
> >
> > From: Mattias R=F6nnblom <mattias.ronnblom@ericsson.com>
> >
> > 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 <mattias.ronnblom@ericsson.com>
>=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.