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 30EBCA0549; Thu, 16 Jul 2020 12:28:07 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DC11B1BEBC; Thu, 16 Jul 2020 12:28:05 +0200 (CEST) Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by dpdk.org (Postfix) with ESMTP id 5160A1BEA8 for ; Thu, 16 Jul 2020 12:28:04 +0200 (CEST) Received: by mail-io1-f66.google.com with SMTP id a12so5423762ion.13 for ; Thu, 16 Jul 2020 03:28:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=vqN9y8RrWuPdUs00NWNiHxFcDz8Nwtt+FpnoenCrsNI=; b=sbc2yOiGh6wHJFUMonV7mKjM7Bcsxw4kIjwE6niVq8Mi6e/vx94esElL5nkBzLpyZV taZkIGia4Eqawv71TLdtRZ14EdwNiybgqDsQ8WCOQPKtrdsA4UhLVCSOLr5OWzngKSiU 99gBzdddRObCn4L6PGqWPH4VMtvPjgs5V/Cx1dTSKBLTCGlMtIqqcT8QmEdQFFTfNd19 P2REmz3lFKTQqbo0RfQJGH2x/8qsX8BsUCE34e6F4VCTuxSWC2Ruldw14FS5zl6nIpti pQw+u1a4x4fV4aBFCS+FfHsX2ahMPISeEmQd9LgZMh4esfwK2gFHsK3IOgZlhIosqkII 60/w== 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:content-transfer-encoding; bh=vqN9y8RrWuPdUs00NWNiHxFcDz8Nwtt+FpnoenCrsNI=; b=Tnpn00Q7C88er7QP8v1IdI/wVFRPlu0FPGwP4a4YS0Wn4f+9PyiYsgJD63mDKDGec1 jXCMrhyG7zSscEWm8CZ6g8HDpPVrptD5j9w0gvDBVLCcekw+QI3E3xixiy1f9XaU7dU9 S+lCGEBRGOiLJjL6YQd/OhYYhIbYBY0iFd9rK7i+okYhy8R0WKAhjB8yWFTVmWQ971Pu Lp4/UvAYuuJvkDRMr9cGpMzFk13M6eLBJjFweg0ASivS/t5aT1408HlMVXBTVZZaNObm 0leMQvRzTNYiXZe+aNTqEV47gW24c119lI/yxMSUwnVPRqeYk+pRcjE2Ib5xa/fEGu+U 2kHw== X-Gm-Message-State: AOAM531F3ylcxTFCrwAbn6jZZW98KUO+XWrFN+tmSlmb6FH2HedeIAHS 2e3sya9x8CVh8ksFwOzZUwuAiuCwyi2HiRVAezY= X-Google-Smtp-Source: ABdhPJwLgqsJw/0u5xpSJRzWWYbs1bdrdIelSUNh0hiQZCsbiOhErUz0am2lz5eFjCD+onpTXUiCjt2atYfK/Gbh7pw= X-Received: by 2002:a5e:8b44:: with SMTP id z4mr3902910iom.123.1594895283379; Thu, 16 Jul 2020 03:28:03 -0700 (PDT) MIME-Version: 1.0 References: <20200713151319.17547-2-manishc@marvell.com> <20200716100854.coasbvfl4fsliajh@u256.net> <20200716101753.722ld3p66bqrjss7@u256.net> In-Reply-To: <20200716101753.722ld3p66bqrjss7@u256.net> From: Jerin Jacob Date: Thu, 16 Jul 2020 15:57:46 +0530 Message-ID: To: =?UTF-8?Q?Ga=C3=ABtan_Rivet?= Cc: Manish Chopra , Ferruh Yigit , Thomas Monjalon , Igor Russkikh , dpdk-dev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v2 1/7] lib/librte_pci: add rte_pci_regs.h 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 Thu, Jul 16, 2020 at 3:48 PM Ga=C3=ABtan Rivet wrote: > > On 16/07/20 12:08 +0200, Ga=C3=ABtan Rivet wrote: > > Re-CCing dev@dpdk.org as it was removed from the reply. > > > > On 13/07/20 08:13 -0700, Manish Chopra wrote: > > > This is merely copy of latest linux/pci_regs.h in > > > order to avoid dependency of dpdk on user headers. > > > > > > > I guess this dependency is an issue on non-linux systems, when you must > > use those defines in a generic implementation. Can you confirm this is > > the motivation here? > > > > If so, I think it would be clearer to state "in order to avoid > > dependency of DPDK on linux headers". > > > > To add to it, if this is actually the motivation to add this header, I > don't think it is sufficient. > > You can restrict the function definition to the linux part of the > PCI bus driver instead, using stubs for other systems. > > > > Signed-off-by: Manish Chopra > > > Signed-off-by: Igor Russkikh > > > --- > > > drivers/bus/pci/linux/pci_uio.c | 2 +- > > > drivers/bus/pci/linux/pci_vfio.c | 2 +- > > > drivers/net/bnx2x/bnx2x.h | 2 +- > > > drivers/net/hns3/hns3_ethdev_vf.c | 2 +- > > > drivers/vdpa/ifc/base/ifcvf_osdep.h | 2 +- > > > lib/librte_pci/Makefile | 1 + > > > lib/librte_pci/meson.build | 2 +- > > > lib/librte_pci/rte_pci_regs.h | 1075 +++++++++++++++++++++++++= ++ > > > 8 files changed, 1082 insertions(+), 6 deletions(-) > > > create mode 100644 lib/librte_pci/rte_pci_regs.h > > > > > > > [...] > > > > > diff --git a/lib/librte_pci/rte_pci_regs.h b/lib/librte_pci/rte_pci_r= egs.h > > > new file mode 100644 > > > index 000000000..1d11f4de5 > > > --- /dev/null > > > +++ b/lib/librte_pci/rte_pci_regs.h > > > @@ -0,0 +1,1075 @@ > > > +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ > > > +/* > > > > This file is delivered alongside the PCI lib, targeting userspace. > > This seems to be an exception to the license policy described in > > license/README. Code shared between kernel and userspace is expected > > to be dual-licensed BSD-3 and GPL-2.0. > > > > As it is a copy of Linux user includes, re-licensing it as BSD-3 as wel= l > > is not possible. > > > > So I think it might require a techboard + governing board exception > > approval. Ferruh or Thomas, what do you think? I think, instead of importing GPL-2.0 file, We can add the constants as need by the DPDK as symbols start from RTE_PCI_*(It will fix up the namespace as well). > > > > -- > > Ga=C3=ABtan > > -- > Ga=C3=ABtan