From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 40DDB374 for ; Fri, 7 Jul 2017 12:16:58 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Jul 2017 03:16:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,322,1496127600"; d="scan'208";a="105791557" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.91]) ([10.237.220.91]) by orsmga004.jf.intel.com with ESMTP; 07 Jul 2017 03:16:54 -0700 To: Shijith Thotton , Gregory Etelson Cc: dev@dpdk.org, Stephen Hemminger , Qi Zhang , Wenzhuo Lu , Thomas Monjalon , Jianfeng Tan References: <1496228966-18573-1-git-send-email-shijith.thotton@caviumnetworks.com> <1497260285-27536-1-git-send-email-shijith.thotton@caviumnetworks.com> <2058901.cGOP7o7VZP@polaris> <20170707100311.GA6000@localhost.localdomain> From: Ferruh Yigit Message-ID: <44df4782-3a31-ea07-5424-138a45e00388@intel.com> Date: Fri, 7 Jul 2017 11:16:54 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170707100311.GA6000@localhost.localdomain> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] igb_uio: issue FLR during open and release of device file 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: Fri, 07 Jul 2017 10:16:58 -0000 On 7/7/2017 11:03 AM, Shijith Thotton wrote: > On Thu, Jul 06, 2017 at 08:27:17PM +0300, Gregory Etelson wrote: >> I could not reproduce server crash with http://dpdk.org/dev/patchwork/patch/25267/ [1] >> However, pci_try_reset_function() API used in that patch is not defined in RedHat-6.x Linux-2.6.32 kernels >> Therefore I work with http://dpdk.org/dev/patchwork/patch/25061/ patch [2]. >> [2] was successfully tested with IXGBE & I40e VFs on RH 6.x, RH 7.x Ubuntu 14.04 and SLES-11.4 >> >> Regards, >> Gregory >> >> On Thursday, 6 July 2017 19:41:40 IDT Ferruh Yigit wrote: >>> 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/ >>> >>> > > Hi Gregory, > > Please try the following change: > s/pci_try_reset_function/pci_reset_function/ > > pci_try_reset_function is same as pci_reset_function, except it returns -EAGAIN > if unable to lock the device[1]. > > If everyone agrees, I can submit v2 with this change. pci_try_reset_function() not being available in older kernel versions seems a problem and blocking Gregory. To move forward, I would suggest sending the v2, and we can continue discussion based on it. Thanks, ferruh > > 1. http://elixir.free-electrons.com/linux/latest/source/drivers/pci/pci.c#L4293 > > Thanks, > Shijith >