From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [RFC PATCH] igb_uio: issue FLR during open and release of device file Date: Wed, 31 May 2017 08:30:10 -0700 Message-ID: <20170531083010.228859c3@xeon-e3> References: <1748341.rbpcFmWp0q@polaris> <1496228966-18573-1-git-send-email-shijith.thotton@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Shijith Thotton , Gregory Etelson , dev@dpdk.org, Qi Zhang , Wenzhuo Lu , Thomas Monjalon , Jianfeng Tan To: Ferruh Yigit Return-path: Received: from mail-pf0-f171.google.com (mail-pf0-f171.google.com [209.85.192.171]) by dpdk.org (Postfix) with ESMTP id 308F57D00 for ; Wed, 31 May 2017 17:30:13 +0200 (CEST) Received: by mail-pf0-f171.google.com with SMTP id n23so12192404pfb.2 for ; Wed, 31 May 2017 08:30:13 -0700 (PDT) In-Reply-To: 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, 31 May 2017 13:20:08 +0100 Ferruh Yigit wrote: > On 5/31/2017 12:09 PM, 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 > > change, it is not mandatory to issue FLR by PMD's during init and close. > > Cc: Jianfeng Tan > > Jianfeng also implemented following patch: > http://dpdk.org/dev/patchwork/patch/17495/ > > Which also implements release and open ops, for slightly different > reason (prevent DMA access after app exit), but mainly both are to > gracefully handle application exit status. > > btw, for Jianfeng's case, can adding pci_clear_master() in release and > moving pci_set_master() to open help preventing unwanted DMA? > > > Gregory, > > Can you please check if this patch fixes your issue? > > Thanks, > ferruh pci_reset should stop all DMA. It also clears master status.