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 4A8DC2C3F for ; Wed, 31 May 2017 19:11:44 +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; 31 May 2017 10:11:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,275,1493708400"; d="scan'208";a="93306493" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.81]) ([10.237.220.81]) by orsmga004.jf.intel.com with ESMTP; 31 May 2017 10:11:41 -0700 To: Stephen Hemminger Cc: Shijith Thotton , Gregory Etelson , dev@dpdk.org, Qi Zhang , Wenzhuo Lu , Thomas Monjalon , Jianfeng Tan References: <1748341.rbpcFmWp0q@polaris> <1496228966-18573-1-git-send-email-shijith.thotton@caviumnetworks.com> <20170531083010.228859c3@xeon-e3> From: Ferruh Yigit Message-ID: Date: Wed, 31 May 2017 18:11:40 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170531083010.228859c3@xeon-e3> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [RFC 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: Wed, 31 May 2017 17:11:44 -0000 On 5/31/2017 4:30 PM, Stephen Hemminger wrote: > 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. If so, should open() call pci_set_master(), currently it has been only called by igbuio_pci_probe() once?