From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH] igb_uio: issue FLR during open and release of device file Date: Thu, 6 Jul 2017 17:41:40 +0100 Message-ID: References: <1496228966-18573-1-git-send-email-shijith.thotton@caviumnetworks.com> <1497260285-27536-1-git-send-email-shijith.thotton@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: Stephen Hemminger , Qi Zhang , Wenzhuo Lu , Thomas Monjalon , Jianfeng Tan , Gregory Etelson To: Shijith Thotton , dev@dpdk.org Return-path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id D5B571094 for ; Thu, 6 Jul 2017 18:41:44 +0200 (CEST) In-Reply-To: <1497260285-27536-1-git-send-email-shijith.thotton@caviumnetworks.com> Content-Language: en-US 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 6/12/2017 10:38 AM, Shijith Thotton wrote: > Set UIO info device file operations open and release. Call pci reset > function inside open and release to clear device state at start and end. > Copied this behaviour from vfio_pci kernel module code. With this patch, > it is not mandatory to issue FLR by PMD's during init and close. > > Bus master enable and disable are added in open and release respectively > to take care of device DMA. > > Signed-off-by: Shijith Thotton This patch, and Gregory's patch [1] are very similar and main target is to leave device in a more proper state when DPDK application quits unexpectedly. Difference between two are, this one implements both .open and .release ops, and sets / clears bus master accordingly. Although main concern is .reset, I am OK to follow vfio_pci approach here, and clearing bus master on .reset can prevent unwanted DMA access. So, I am for this patch and I am testing it for a few days without a problem. But Gregory reported a crash with older version of this patch, without more detail, we should clear that first. With Gregory's Tested-by, I am OK with this patch. Gregory, Are you using your version, what are the results? And would you mind testing this patch? Thanks, ferruh [1] http://dpdk.org/dev/patchwork/patch/25061/