From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 03EA81B3A3 for ; Mon, 9 Jul 2018 16:37:43 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jul 2018 07:37:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,330,1526367600"; d="scan'208";a="53055807" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.237.220.102]) ([10.237.220.102]) by fmsmga007.fm.intel.com with ESMTP; 09 Jul 2018 07:37:41 -0700 To: Qi Zhang , thomas@monjalon.net Cc: konstantin.ananyev@intel.com, dev@dpdk.org, bruce.richardson@intel.com, ferruh.yigit@intel.com, benjamin.h.shelton@intel.com, narender.vangati@intel.com References: <20180607123849.14439-1-qi.z.zhang@intel.com> <20180709033706.27858-1-qi.z.zhang@intel.com> <20180709033706.27858-4-qi.z.zhang@intel.com> From: "Burakov, Anatoly" Message-ID: <87395ae9-7ebe-3cf3-8042-6360ad428097@intel.com> Date: Mon, 9 Jul 2018 15:37:37 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.0 MIME-Version: 1.0 In-Reply-To: <20180709033706.27858-4-qi.z.zhang@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v10 03/19] bus/pci: enable vfio unmap resource for secondary 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, 09 Jul 2018 14:37:44 -0000 On 09-Jul-18 4:36 AM, Qi Zhang wrote: > Subroutine to unmap VFIO resource is shared by secondary and > primary, and it does not work on the secondary process. > The patch adds a dedicate function to handle the situation > when a device is unmapped on a secondary process. > > Signed-off-by: Qi Zhang > --- Hi Qi, Please correct me if i'm wrong here, but it seems like the unmapping code is shared between primary and secondary, and the difference comes from interrupts, bus mastering, and removing the device from tailq. Can we separate out the common code somehow? -- Thanks, Anatoly