From: Thomas Monjalon <thomas@monjalon.net>
To: Jerin Jacob <jerinjacobk@gmail.com>
Cc: "Gaëtan Rivet" <grive@u256.net>,
"Manish Chopra" <manishc@marvell.com>,
"Ferruh Yigit" <ferruh.yigit@intel.com>,
"Igor Russkikh" <irusskikh@marvell.com>, dpdk-dev <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2 1/7] lib/librte_pci: add rte_pci_regs.h
Date: Thu, 16 Jul 2020 14:49:57 +0200 [thread overview]
Message-ID: <1914663.Rf5fFZbPsG@thomas> (raw)
In-Reply-To: <CALBAE1OHy_pRN3e++6rORbS-UA37VrtkMtduOR8CtzN1xzhiHQ@mail.gmail.com>
16/07/2020 13:55, Jerin Jacob:
> On Thu, Jul 16, 2020 at 4:57 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> >
> > 16/07/2020 12:27, Jerin Jacob:
> > > On Thu, Jul 16, 2020 at 3:48 PM Gaëtan Rivet <grive@u256.net> wrote:
> > > >
> > > > On 16/07/20 12:08 +0200, Gaëtan 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 <manishc@marvell.com>
> > > > > > Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
> > > > > > ---
> > > > > > 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_regs.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 well
> > > > > 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).
> >
> > If symbols can be found in /usr/include/, don't add anything.
>
> Not by default on all the distros. It is part of pciutils library.
> Moreover, we need these symbols for Windows OS as well.
> IMO, We should add absolute minimum constants that needed for DPDK as RTE_PCI_*
I am for mandating the dependency instead of copying it.
pciutils cannot be installed on Windows?
Why do you care about Windows?
I don't see any contribution for qede on Windows.
next prev parent reply other threads:[~2020-07-16 12:50 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-13 15:13 [dpdk-dev] [PATCH v2 0/7] qede: SR-IOV PF driver support Manish Chopra
2020-07-13 15:13 ` [dpdk-dev] [PATCH v2 1/7] lib/librte_pci: add rte_pci_regs.h Manish Chopra
2020-07-16 9:43 ` Gaëtan Rivet
2020-07-16 10:08 ` Gaëtan Rivet
2020-07-16 10:17 ` Gaëtan Rivet
2020-07-16 10:27 ` Jerin Jacob
2020-07-16 11:26 ` Thomas Monjalon
2020-07-16 11:55 ` Jerin Jacob
2020-07-16 12:49 ` Thomas Monjalon [this message]
2020-07-16 13:02 ` Jerin Jacob
2020-07-16 15:55 ` Thomas Monjalon
2020-07-16 16:43 ` Jerin Jacob
2020-07-16 16:57 ` Thomas Monjalon
2020-07-16 17:33 ` Jerin Jacob
2020-07-16 17:56 ` Gaëtan Rivet
2020-07-16 20:49 ` [dpdk-dev] [EXT] " Manish Chopra
2020-07-18 19:42 ` Manish Chopra
2020-07-19 8:47 ` Jerin Jacob
2020-07-20 8:57 ` Gaëtan Rivet
2020-07-13 15:13 ` [dpdk-dev] [PATCH v2 2/7] drivers: add generic API to find PCI extended cap Manish Chopra
2020-07-20 9:36 ` Gaëtan Rivet
2020-07-13 15:13 ` [dpdk-dev] [PATCH v2 3/7] net/qede: define PCI config space specific osals Manish Chopra
2020-07-13 15:13 ` [dpdk-dev] [PATCH v2 4/7] net/qede: configure VFs on hardware Manish Chopra
2020-07-13 15:13 ` [dpdk-dev] [PATCH v2 5/7] net/qede: add infrastructure support for VF load Manish Chopra
2020-07-13 15:13 ` [dpdk-dev] [PATCH v2 6/7] net/qede: initialize VF MAC and link Manish Chopra
2020-07-13 15:13 ` [dpdk-dev] [PATCH v2 7/7] net/qede: add VF FLR support Manish Chopra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1914663.Rf5fFZbPsG@thomas \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=grive@u256.net \
--cc=irusskikh@marvell.com \
--cc=jerinjacobk@gmail.com \
--cc=manishc@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).