From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 5BCFDF933; Mon, 19 Dec 2016 13:26:24 +0100 (CET) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP; 19 Dec 2016 04:26:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,373,1477983600"; d="scan'208";a="44679416" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.29]) ([10.237.220.29]) by fmsmga006.fm.intel.com with ESMTP; 19 Dec 2016 04:26:22 -0800 To: Stefan Puiu , dev@dpdk.org References: <1481902617-16050-1-git-send-email-stefan.puiu@gmail.com> <1482140453-49649-1-git-send-email-stefan.puiu@gmail.com> <8e9b361a-566c-2c25-5497-da0ee0e7c818@intel.com> Cc: yongwang@vmware.com, mac_leehk@yahoo.com.hk, dpdk stable From: Ferruh Yigit Message-ID: <006e2ee9-f586-8b40-a06c-d386833dee10@intel.com> Date: Mon, 19 Dec 2016 12:26:21 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <8e9b361a-566c-2c25-5497-da0ee0e7c818@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v4] vmxnet3: fix Rx deadlock 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: , X-List-Received-Date: Mon, 19 Dec 2016 12:26:26 -0000 On 12/19/2016 10:41 AM, Ferruh Yigit wrote: > On 12/19/2016 9:40 AM, Stefan Puiu wrote: >> Our use case is that we have an app that needs to keep mbufs around >> for a while. We've seen cases when calling vmxnet3_post_rx_bufs() from >> vmxet3_recv_pkts(), it might not succeed to add any mbufs to any RX >> descriptors (where it returns -err). Since there are no mbufs that the >> virtual hardware can use, no packets will be received after this; the >> driver won't refill the mbuf after this so it gets stuck in this >> state. I call this a deadlock for lack of a better term - the virtual >> HW waits for free mbufs, while the app waits for the hardware to >> notify it for data (by flipping the generation bit on the used Rx >> descriptors). Note that after this, the app can't recover. >> >> This fix is a rework of this patch by Marco Lee: >> http://dpdk.org/dev/patchwork/patch/6575/. I had to forward port >> it, address review comments and also reverted the allocation >> failure handling to the first version of the patch >> (http://dpdk.org/ml/archives/dev/2015-July/022079.html), since >> that's the only approach that seems to work, and seems to be what >> other drivers are doing (I checked ixgbe and em). Reusing the mbuf >> that's getting passed to the application doesn't seem to make >> sense, and it was causing weird issues in our app. Also, reusing >> rxm without checking if it's NULL could cause the code to crash. >> >> Signed-off-by: Stefan Puiu > > Applied to dpdk-next-net/master, thanks. > CC:stable@dpdk.org