On Thu, Jul 16, 2020 at 3:48 PM Gaëtan Rivet <gr...@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 <mani...@marvell.com>
> > > Signed-off-by: Igor Russkikh <irussk...@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).





> >
> > --
> > Gaëtan
>
> --
> Gaëtan

Reply via email to