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 D0F23A00E6 for ; Mon, 5 Aug 2019 19:44:36 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C23D81BD52; Mon, 5 Aug 2019 19:44:36 +0200 (CEST) Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id A674B1BD52; Mon, 5 Aug 2019 19:44:34 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 37A6E21540; Mon, 5 Aug 2019 13:44:34 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 05 Aug 2019 13:44:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=VTzgjrAEcGTPOQNPwaDZOt13TgpBRHNeNZ+4G84mcRc=; b=M9upWIfGRSpd IvCNE8ogTgePP+DsyFEa2kp+4FWL4wp38YrsPETvpbiflKnLc8T6N7p7jjIouxjI WIbWJoHekeptwC3RkPhPOhoHIGBcf6qDPfaMj6ChLcZynLVNnrSBgrOPumj/qBVX ePoRa1R6kOFZfWJljDVn4o5bpdf30KM= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=VTzgjrAEcGTPOQNPwaDZOt13TgpBRHNeNZ+4G84mc Rc=; b=J/tC/HhJQxCDBfgfpOARwQnhDmo3sPRp+aSoCk6esLVx15UNlEtF1bQwI oiV5h7/aTY+W2DZpqNbNhykq8cujYWfj1VJY9H2cdgg+w7GQ0ohaKURBIdV5zK8q 5aBzgPcdfULKPd6HCHvupQM+S2SjGS47AOQdMWnL2+Px2NyODPCiDE77spaWkulC m8uomt3jibvr5Od5EoGaCWpICA8glCk+RV1IoMXa/w7Q5oSyZDXYJQLvQSwK/Ryk 4/PhZiWJZxjwqIYb8ngYecsNTvwC6K4SZrruiWWy5zaZ3GeRznfQFj8xA58L3pXj TEji4YtNTr+lEo+f7GA+tob0pDMuQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddruddtjedgudduiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufffkjghfggfgtgesthhqredttddtjeenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc fkphepleefrddvfedrudeirddvvdelnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhho mhgrshesmhhonhhjrghlohhnrdhnvghtnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.localnet (229.16.23.93.rev.sfr.net [93.23.16.229]) by mail.messagingengine.com (Postfix) with ESMTPA id CA42E8006D; Mon, 5 Aug 2019 13:44:30 -0400 (EDT) From: Thomas Monjalon To: =?utf-8?B?TWljaGHFgg==?= Krawczyk Cc: stable@dpdk.org, Maciej Bielski , dev@dpdk.org, Marcin Wojtas , Guy Tzalik , Evgeny Schemeilin , Eduard Serra , igorc.mail@gmail.com Date: Mon, 05 Aug 2019 19:44:25 +0200 Message-ID: <2289104.F6p8LDoDFh@xps> In-Reply-To: References: <20190801114536.318-1-mba@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-stable] [PATCH] net/ena: fix L4 cksum flags condition for TX X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" 01/08/2019 14:08, Micha=C5=82 Krawczyk: > czw., 1 sie 2019 o 13:45 Maciej Bielski napisa=C5=82(a= ): > > > > During an if-condition evaluation, a 2-bit flag evaluates to 'true' for > > '0x1', '0x2' and '0x3'. Thus, from this perspective these flags are > > indistinguishable. To make them distinct, respective bits must be > > extracted with a mask and then checked for strict equality. > > > > Specifically here, even if `PKT_TX_UDP_CKSUM` (value '0x3') was set, the > > expression `mbuf->ol_flags & PKT_TX_TCP` (the second flag of value > > '0x1') is evaluated first and the result is 'true'. In consequence, for > > UDP packets the execution flow enters an incorrect branch. > > > > Fixes: 56b8b9b7e5d2 (net/ena: convert to new Tx offloads API) > > Cc: stable@dpdk.org > > > > Signed-off-by: Maciej Bielski > > Reported-by: Eduard Serra > Acked-by: Michal Krawczyk Applied, thanks