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 ED5A6A057D; Wed, 18 Mar 2020 16:18:04 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D34192B9E; Wed, 18 Mar 2020 16:18:03 +0100 (CET) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id D2809292D; Wed, 18 Mar 2020 16:18:01 +0100 (CET) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 642525C00F5; Wed, 18 Mar 2020 11:18:01 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 18 Mar 2020 11:18:01 -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=QW/pdAIACwXhsoBzUA21xYpuJdxYUIMEPSRawggNmAc=; b=eucA6EPyPSlV B9adqohCTJa2EsTtrFrFZprCvCxMifdq3rfDi9xCjkrKdFr/6JiFZB3S3j9CtYGQ YwVc/8WKuW5vq/hdMOYkqgf2oOkbTWQAuHlyHM2U/JOq+FqSaLyCrUVljcZ89SG9 4mysWZgGQKG7WvARmKWQzjn+ysndEow= 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=QW/pdAIACwXhsoBzUA21xYpuJdxYUIMEPSRawggNm Ac=; b=cTKtpV0MoDsEOPQvMmOJKAhuc09TWjYVtD7zhM6EKvAZblubYRTR5RE+A pdL58crgTVvQ7iUQhWarvkg8HqxMoqh1pfOolpFhlxY/W4k5ndZhoEsezZrJ9iv3 uhdeZeWY34oAd58/kY404DBTylD1o8VEevIrbQ95HsfC0Hnnb8p+fPV2cZ1x4iXu BfbAqnEtrK9MX9dxE5eDxd+Wc5LKf4wdHFL2epglXKIn1FxD746MdciZ8LJnaj0b 3wWt0wZECfH5RYzyms/HBTuHCuM8k+eE0VYpIe7xSO2vp6jN+4S1NMkOk/4WoAiH BrU1OrFhqcikyh3LJPh4kA/FrnWiw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudefjedgjeefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukf hppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght 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 CCD5430618C1; Wed, 18 Mar 2020 11:17:59 -0400 (EDT) From: Thomas Monjalon To: Stephen Hemminger , Ferruh Yigit Cc: dev@dpdk.org, stable@dpdk.org Date: Wed, 18 Mar 2020 16:17:57 +0100 Message-ID: <3101970.h16uAIiOU7@xps> In-Reply-To: References: <20191222175551.17684-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] kni: fix kernel deadlock when using mlx devices 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" 17/01/2020 17:43, Ferruh Yigit: > On 12/22/2019 5:55 PM, Stephen Hemminger wrote: > > This fixes a deadlock when using KNI with bifurcated drivers. > > Bringing kni device up always times out when using Mellanox > > devices. > > > > The kernel KNI driver sends message to userspace to complete > > the request. For the case of bifurcated driver, this may involve > > an additional request to kernel to change state. This request > > would deadlock because KNI was holding the RTNL mutex. > > > > This was a bad design which goes back to the original code. > > A workaround is for KNI driver to drop RTNL while waiting. > > To prevent the device from disappearing while the operation > > is in progress, it needs to hold reference to network device > > while waiting. > > > > As an added benefit, an useless error check can also be removed. > > > > Fixes: 3fc5ca2f6352 ("kni: initial import") > > Cc: stable@dpdk.org > > Signed-off-by: Stephen Hemminger > > --- > > This patch cause a hang on my server, not sure what exactly was the problem but > kernel log was continuously printing "Cannot send to req_q". Will dig more. Ferruh, did you have a chance to check what is hanging? Stephen, is there any news on your side?