From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0EC7EA054F; Mon, 15 Mar 2021 18:17:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BEE0F242761; Mon, 15 Mar 2021 18:17:29 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id F177E242752 for ; Mon, 15 Mar 2021 18:17:27 +0100 (CET) IronPort-SDR: nmw1fJuItMjFAgLJjS4P57ktoQ8tiY/hhsZRn2zvaM+iWnRwbGVdqeQDTHDT2fgKL8LTb6leY5 Qnisis1Y0oUw== X-IronPort-AV: E=McAfee;i="6000,8403,9924"; a="176721470" X-IronPort-AV: E=Sophos;i="5.81,251,1610438400"; d="scan'208";a="176721470" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2021 10:17:24 -0700 IronPort-SDR: PcsONDDcitH5Yteqo3chQ+DOW9HWP8L2WgBQ5QCv9r8p/Xgbbp59SYL0x1b9/gE7SmOgG16jLN 4CGhSjIhlZyw== X-IronPort-AV: E=Sophos;i="5.81,251,1610438400"; d="scan'208";a="449432761" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.252.23.61]) ([10.252.23.61]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2021 10:17:22 -0700 To: Elad Nachman Cc: iryzhov@nfware.com, stephen@networkplumber.org, dev@dpdk.org References: <20201126144613.4986-1-eladv6@gmail.com> <20210225143239.14220-1-eladv6@gmail.com> From: Ferruh Yigit X-User: ferruhy Message-ID: Date: Mon, 15 Mar 2021 17:17:18 +0000 MIME-Version: 1.0 In-Reply-To: <20210225143239.14220-1-eladv6@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH 1/2] kni: fix kernel deadlock when using mlx devices X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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 2/25/2021 2:32 PM, Elad Nachman wrote: > This first part of v4 of the patch re-introduces Stephen Hemminger's > patch 64106 . This part changes the parameter kni_net_process_request() > gets and introduces the initial rtnl unlocking mechanism. > > Signed-off-by: Elad Nachman > --- > v4: > * for if down case, send asynchronously with rtnl locked and without > wait, returning immediately to avoid both kernel race conditions > and deadlock in user-space > v3: > * Include original patch and new patch as a series of patch, added a > comment to the new patch > v2: > * rebuild the patch as increment from patch 64106 > * fix comment and blank lines <...> > > + /* Since we need to wait and RTNL mutex is held > + * drop the mutex and hold reference to keep device > + */ > + dev_hold(dev); > + rtnl_unlock(); > + > ret_val = wait_event_interruptible_timeout(kni->wq, > kni_fifo_count(kni->resp_q), 3 * HZ); > + rtnl_lock(); > + dev_put(dev); > + Hi Elad, Let's drop rtnl lock/unlock form this patch, it will be changed in next patch already, and make this patch only function parameter change, as preparation to actual change.