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 D1F5DA054F for ; Sun, 16 Feb 2020 10:47:45 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 994E21BF78; Sun, 16 Feb 2020 10:47:45 +0100 (CET) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 5924E2B93; Sun, 16 Feb 2020 10:47:43 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id CD5BD20EAA; Sun, 16 Feb 2020 04:47:40 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 16 Feb 2020 04:47:40 -0500 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=XuqvGcyQxaKpxT1emxqYgjR1VK6Ve2lE1+dHRHc0Cd8=; b=QfZs3gX0kCUD iTAQEShcI+WaFkHScMDga6cnkM/09kHe90xse1rWhQeeQYFYJDR5QhNRxPgf6MyJ fSNBm1Aaui7LTuCqpVIi9Cb2OCwwRidV/KYpYFJaCtEkniGjS4x84fM42oRMwkwd g6BE8e7G5xJqsLjvs1PTbfzukyEtHQM= 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=fm2; bh=XuqvGcyQxaKpxT1emxqYgjR1VK6Ve2lE1+dHRHc0C d8=; b=iqKHDfAltozfcz51VLbDBZKIaaZockJQ0R6kNfAVSgDOFsoXjNFFPsa9D TpNT4xPgRwWo9S4+zYwp9lbzkkWyXwAMBE2X/feIzWASLBXtjUInmdFWkhnMBrcm Rx2iv5WaYQerv18soekcl5Qpip4cR1JSS+c1fnAPKqCNGGb/2JRbuXNK2jVW96Dg eRxb1ylKiDdxEeFcDOhx9uxE6X/XcHEGkYKsaHxTn0uv6u8lD+6jLEsOQO5MFZ2m 7qTcIkOn3NTiE1vmeqrBcFcUE+nh8B7qxF5XYyJLf7UtTOIFD9n5HDBA+ZC2ixiw TShv1tQqSLB6ve1TDJxOCga6aypFg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrjeeggddtkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 453193280059; Sun, 16 Feb 2020 04:47:39 -0500 (EST) From: Thomas Monjalon To: Matan Azrad , ktraynor@redhat.com Cc: "dev@dpdk.org" , "ferruh.yigit@intel.com" , "stable@dpdk.org" , Wenzhuo Lu , Jingjing Wu , Bernard Iremonger Date: Sun, 16 Feb 2020 10:47:37 +0100 Message-ID: <1635098.Ii9rTq9gLj@xps> In-Reply-To: References: <20200213155226.1024939-1-thomas@monjalon.net> <20200213155226.1024939-3-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-stable] [PATCH 2/2] app/testpmd: fix hot-unplug detaching 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" 16/02/2020 09:09, Matan Azrad: > Hi Thomas > > Thanks for the patches, I Saw it just now. > please see small comment below: > > From: Thomas Monjalon > > There is a possible race condition in the hotplug path in rmv_port_callback(). > > If a port is created between > > close_port(port_id) and detach_port_device(port_id), then the port_id will > > have been reallocated to a different device which will be wrongly detached. > > > > Since a check was added in detach_port_device() for manual detach case, > > the hotplug path was even more broken. > > It became impossible to run because the new check prevented to run > > detach_port_device() after the port is closed. > > > > The solution for both issues is to not rely on the port_id for detaching the > > rte_device. > > The function detach_port_device() is split to allow calling > > detach_device() directly with the rte_device pointer, saved before closing > > the port. > > > > Fixes: 43d0e304980a ("app/testpmd: fix invalid port detaching") > > If you fix the race, Don't you think you need to add fixes line for the patch which created the race? Yes, you're right, I forgot it. It is too late now unfortunately, but we may request to backport it properly in 18.11 as well. Please Kevin, add this tag so it will be part of 18.11: Fixes: cbb4c648c5df ("ethdev: use device handle to detach") > > Cc: stable@dpdk.org