From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB03DC5B578 for ; Wed, 3 Jul 2019 07:34:43 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 9DDDB21881 for ; Wed, 3 Jul 2019 07:34:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9DDDB21881 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2EF3B3DC; Wed, 3 Jul 2019 09:34:42 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 363822AB for ; Wed, 3 Jul 2019 09:34:39 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jul 2019 00:34:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,446,1557212400"; d="scan'208";a="169044575" Received: from npg-dpdk-virtio-tbie-2.sh.intel.com (HELO ___) ([10.67.104.151]) by orsmga006.jf.intel.com with ESMTP; 03 Jul 2019 00:34:38 -0700 Date: Wed, 3 Jul 2019 15:33:14 +0800 From: Tiwei Bie To: David Marchand Cc: dev , "Burakov, Anatoly" Message-ID: <20190703073314.GA18868@___> References: <20190703054508.22824-1-tiwei.bie@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [RFC PATCH] bus/pci: avoid depending on private value in kernel source 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi David, On Wed, Jul 03, 2019 at 09:02:59AM +0200, David Marchand wrote: > Hello, > > On Wed, Jul 3, 2019 at 7:47 AM Tiwei Bie wrote: > > The value 40 used in VFIO_GET_REGION_ADDR() is a private value > (VFIO_PCI_OFFSET_SHIFT) defined in Linux kernel source [1]. It > is not part of VFIO API, and we should not depend on it. > > [1] https://github.com/torvalds/linux/blob/6fbc7275c7a9/drivers/vfio/pci/ > vfio_pci_private.h#L19 > > > > I did not follow linux kernel changes, is there something that would change > this offset? > It looks like a cleanup (did not look into the details yet), do we need this > now? In VFIO/mdev [1], the offset can be something different. It depends on the parent device. It's not just a cleanup. It's a preparation for the mdev support in DPDK. [1] https://github.com/torvalds/linux/blob/master/Documentation/vfio-mediated-device.txt Thanks, Tiwei > > -- > David Marchand