From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DD246A0487 for ; Wed, 3 Jul 2019 09:36:39 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 35B8D1BE0; Wed, 3 Jul 2019 09:36:39 +0200 (CEST) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by dpdk.org (Postfix) with ESMTP id 10529F04 for ; Wed, 3 Jul 2019 09:36:38 +0200 (CEST) Received: by mail-io1-f67.google.com with SMTP id i10so2399282iol.13 for ; Wed, 03 Jul 2019 00:36:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lEDo2aOkAjKvGtjW59q9qS4+9TrVxSCr/bKaLIsKb04=; b=mYtnN3d3fo0+IEeiMWHjUYPU7oioVJxXd1ZNeSRznQ8C0aAyxIWXIrg6Y2aFEPn3tP OuRQ55/lQd7afgTGztbSnUgTtw8AGMDpai5/NczllsKtvM45HTTTRqDyyP7jt1YnAHc+ zB1T0k2Vk0pWgIHx1cRRSwea7oHdIlrhX/RQwPzgBv2+Lzclvze481I2jECOZ8U58rr3 gi2pCvobi34uFZQz9YZahjAFHJTM6yrPtyFtwQGiKaCu9/5+l5Vyg/HdXyAjWT2243As tDzc20/Vnh+qKtfsPy0CKYO1/nwM+ECGk1kcvEPq0CYhPERnHqvUPb3bigVRCDqVt7iU fgNw== X-Gm-Message-State: APjAAAU1z3Ys/PKla7y75n1aJN9MKl+8GIz98+agfcZEVNo++QpgiEQ1 0vUnvlkw1VfjmnfTGP2FdNAkgVlUYhHfw3PxNHM9gA== X-Google-Smtp-Source: APXvYqzHm8LTrPyZFdxRf1HDmeUfQiVTSHfq0Rea8XjoRW3SFYTmiEegfaGnBI8VjNam/NsQXxht1fDcDzT8dgpgz0o= X-Received: by 2002:a6b:7109:: with SMTP id q9mr36430344iog.30.1562139397458; Wed, 03 Jul 2019 00:36:37 -0700 (PDT) MIME-Version: 1.0 References: <20190703054508.22824-1-tiwei.bie@intel.com> <20190703073314.GA18868@___> In-Reply-To: <20190703073314.GA18868@___> From: David Marchand Date: Wed, 3 Jul 2019 09:36:26 +0200 Message-ID: To: Tiwei Bie Cc: dev , "Burakov, Anatoly" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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" On Wed, Jul 3, 2019 at 9:35 AM Tiwei Bie wrote: > 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 > > Ok, thanks. So we can wait for mdev to be ready before working on this. -- David Marchand