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 9AB33A0352; Wed, 6 May 2020 02:15:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C18871D669; Wed, 6 May 2020 02:15:05 +0200 (CEST) Received: from mail-pj1-f66.google.com (mail-pj1-f66.google.com [209.85.216.66]) by dpdk.org (Postfix) with ESMTP id ABA161D643 for ; Wed, 6 May 2020 02:15:03 +0200 (CEST) Received: by mail-pj1-f66.google.com with SMTP id ms17so3965pjb.0 for ; Tue, 05 May 2020 17:15:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZDZIfHMkvOVbv7QKvxwFK6nUSA86TOpOh+GvqVXhutk=; b=m//Pql4QrNmNi//Is8gw1fJ0PBEw2Ok7nYXpJQF4yn737T48wqo6n/wl2/iVuPQZ+e S2Q+PNpewBG+WAMOk8ZLqogpmYvAmWWBjhMFIZEabJc2MxneY+KPYuvX5pC4y4gZ0sBo u5KRhp40cEep6hTa8DX5baIguC3HBZ+z6FDNEOu4gjeS/WF13h58mPPVR0KgIskMlDmY GgIe8gYBovep/RONeHqf8mPcn1au7eWaBL5A9SHeAY5SL1A8LHqH7WyIryCzrIBmrA3r nOVKUkgjBJmE9Ck5GCgJ6sIs9GPElkEaNFCHzbi132ELfGPelrTpEpGwzkmBibXryHYc 6OIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZDZIfHMkvOVbv7QKvxwFK6nUSA86TOpOh+GvqVXhutk=; b=NKlF4cVjq+0NDPEbEQYy8KmU+kk0X3Qh7PMkpIOYU0eelmQIN3RIwnIf4JnvkjaLoI tJCP6SpX/CZEkXdGqP5eDQyIgyvle0VsfyLjwTu2c3WKe2SX7kn9P3hFdNZVAQXUZHnX iYj/9cehjaNFw/QE3Fm93urW6kQRvDu0jIFOnOn+j4txDCHYq7N32RwBc6edyOsrU6nx hpl4ZWKawvlL/Kx9xDHg8yuf53cOwWP5HG/Irt69XGTGeO6vxjep/YrWgQoBl0ZCTT75 jX0BgfY8yxlLUhjBziaaDlSnJrh6hC/ZjLUXhG6vn7mIZ938E9gKzoLEyxbN8SDZD6r+ nYng== X-Gm-Message-State: AGi0PuYyZC5Tqu0aELlnDh2xY2u70e/vTLvHjafkGZmoSsX0Im6atuEt G+99bIAuN8jF9w7Xefeltq4Zzw== X-Google-Smtp-Source: APiQypLxuIOHsyca5LZJRHb66bS6o8BFUOQgNIwwFLpDnTbcYof3pPEf/9/sFoTQ9Rjrvrb27yGpgg== X-Received: by 2002:a17:90a:3266:: with SMTP id k93mr6454959pjb.118.1588724102735; Tue, 05 May 2020 17:15:02 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id q23sm228334pgn.90.2020.05.05.17.15.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2020 17:15:02 -0700 (PDT) Date: Tue, 5 May 2020 17:14:54 -0700 From: Stephen Hemminger To: Thomas Monjalon Cc: Ferruh Yigit , dev@dpdk.org, stable@dpdk.org Message-ID: <20200505171454.00274f10@hermes.lan> In-Reply-To: <3101970.h16uAIiOU7@xps> References: <20191222175551.17684-1-stephen@networkplumber.org> <3101970.h16uAIiOU7@xps> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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" On Wed, 18 Mar 2020 16:17:57 +0100 Thomas Monjalon wrote: > 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? > > It did not hang when I tested it. The bug report is still open