From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id EB7477CEE for ; Fri, 25 Aug 2017 11:34:28 +0200 (CEST) Received: by mail-wm0-f46.google.com with SMTP id b189so7436017wmd.0 for ; Fri, 25 Aug 2017 02:34:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Z8iefuc7ch3CPBFXN9fpTGcKQ41LqkJC/e8BTiw3OAc=; b=DwiZ4AU8RJUW6TWP7emcq5M3QVU0Y0nqiD7wiCuvd+sGlFH5WiSxS59OmIpoKUpVnI dT/jc9IOxYDVYpsgJFWvGuM9weJa6qyEMXnD6Ac1AP5MGIjn1pdBV18gnubMuZCasxSN IQmhQq+uFIkKfZ99bFHADDUvqf8Kl44vYqMg8o6g/Kiv9CMXQxPlZDWa0nEATyFXT0XI BFagjl7z58FxMHhKCqZzsmIhb9VyLMawrpjDNnc0ZZTx9+RUjipYguZ16FHYsBr0RhDL fxoTBgmO+6i3aK5CUQOX0/8fY7Ufg3LOWzJLC5vfoAutjmeAhiF0evYxWYfxwIT3YSIc 1vHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=Z8iefuc7ch3CPBFXN9fpTGcKQ41LqkJC/e8BTiw3OAc=; b=Ecz7liB6z/c/1JGE1OrlOHpO+dpRCfrTezQmISPXSPgC2OvglTiyXDct6LMfiKwNUK OH7yI7xTuOqa0xC0u6uMueI+cN1TS6/i2s+eYKvN5fXo/Txi6Kt+6zBJIOuhcnC3XOBv qW925AeIq1TRbB2U95Qz9AfQEdyRCCYoFE/ySUQwyfb4oCEdIaFtNvual9jPL1AmN6ak r0X71UxO9l5IxuQEZE0WBkup3aIIEAmGrrOzl0fsmIOjZOHmD13PhECb1esimdjVV/Zg Vu7JimWofLXSdgJiGv3ckyKOddclmcmlTfbxt0dqvxNDnEcgrWDYW554fD7kPKL/fnD9 Y53w== X-Gm-Message-State: AHYfb5gJB10dScpF2+9HAAFFcnq8fowP1b85mBLnwbeSRjN3xRu2rreh qwHrHu6ook4wgnyW X-Received: by 10.28.125.74 with SMTP id y71mr832499wmc.70.1503653668188; Fri, 25 Aug 2017 02:34:28 -0700 (PDT) Received: from bidouze.vm.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id b5sm265799wrb.64.2017.08.25.02.34.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Aug 2017 02:34:27 -0700 (PDT) Date: Fri, 25 Aug 2017 11:34:17 +0200 From: =?iso-8859-1?Q?Ga=EBtan?= Rivet To: Luca Boccassi Cc: dev@dpdk.org Message-ID: <20170825093417.GC8124@bidouze.vm.6wind.com> References: <1503653465.31398.2.camel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1503653465.31398.2.camel@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH 05/13] pci: introduce PCI lib and bus 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: , X-List-Received-Date: Fri, 25 Aug 2017 09:34:29 -0000 On Fri, Aug 25, 2017 at 10:31:05AM +0100, Luca Boccassi wrote: > On Fri, 2017-08-25 at 11:04 +0200, Gaetan Rivet wrote: > > The PCI lib defines the types and methods allowing to use PCI > > elements. > > > > The PCI bus implements a bus driver for PCI devices by constructing > > rte_bus elements using the PCI lib. > > > > Move the relevant code out of the EAL to their expected place. > > > > Signed-off-by: Gaetan Rivet > > --- > >  config/common_base                             |  15 + > >  drivers/bus/Makefile                           |   2 + > >  drivers/bus/pci/Makefile                       |  60 ++ > >  drivers/bus/pci/bsd/Makefile                   |  32 ++ > >  drivers/bus/pci/bsd/rte_pci.c                  | 670 > > +++++++++++++++++++++++ > >  drivers/bus/pci/include/rte_bus_pci.h          | 387 +++++++++++++ > >  drivers/bus/pci/linux/Makefile                 |  37 ++ > >  drivers/bus/pci/linux/rte_pci.c                | 723 > > +++++++++++++++++++++++++ > >  drivers/bus/pci/linux/rte_pci_init.h           |  97 ++++ > >  drivers/bus/pci/linux/rte_pci_uio.c            | 567 > > +++++++++++++++++++ > >  drivers/bus/pci/linux/rte_pci_vfio.c           | 674 > > +++++++++++++++++++++++ > >  drivers/bus/pci/linux/rte_vfio_mp_sync.c       | 424 +++++++++++++++ > >  drivers/bus/pci/private.h                      | 173 ++++++ > >  drivers/bus/pci/rte_bus_pci_version.map        |  21 + > >  drivers/bus/pci/rte_pci_common.c               | 542 > > ++++++++++++++++++ > >  drivers/bus/pci/rte_pci_common_uio.c           | 234 ++++++++ > >  lib/Makefile                                   |   2 + > >  lib/librte_eal/bsdapp/eal/Makefile             |   3 - > >  lib/librte_eal/bsdapp/eal/eal_pci.c            | 670 ------------- > > ---------- > >  lib/librte_eal/common/Makefile                 |   2 +- > >  lib/librte_eal/common/eal_common_pci.c         | 580 ------------- > > ------- > >  lib/librte_eal/common/eal_common_pci_uio.c     | 233 -------- > >  lib/librte_eal/common/include/rte_pci.h        | 598 ------------- > > ------- > >  lib/librte_eal/linuxapp/eal/Makefile           |  10 - > >  lib/librte_eal/linuxapp/eal/eal_pci.c          | 723 ------------- > > ------------ > >  lib/librte_eal/linuxapp/eal/eal_pci_init.h     |  97 ---- > >  lib/librte_eal/linuxapp/eal/eal_pci_uio.c      | 567 ------------- > > ------ > >  lib/librte_eal/linuxapp/eal/eal_pci_vfio.c     | 674 ------------- > > ---------- > >  lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c | 424 --------------- > >  lib/librte_ether/rte_ethdev.h                  |   2 - > >  lib/librte_pci/Makefile                        |  49 ++ > >  lib/librte_pci/include/rte_pci.h               | 279 ++++++++++ > >  lib/librte_pci/rte_pci.c                       |  92 ++++ > >  lib/librte_pci/rte_pci_version.map             |   8 + > >  mk/rte.app.mk                                  |   3 + > >  35 files changed, 5092 insertions(+), 4582 deletions(-) > >  create mode 100644 drivers/bus/pci/Makefile > >  create mode 100644 drivers/bus/pci/bsd/Makefile > >  create mode 100644 drivers/bus/pci/bsd/rte_pci.c > >  create mode 100644 drivers/bus/pci/include/rte_bus_pci.h > >  create mode 100644 drivers/bus/pci/linux/Makefile > >  create mode 100644 drivers/bus/pci/linux/rte_pci.c > >  create mode 100644 drivers/bus/pci/linux/rte_pci_init.h > >  create mode 100644 drivers/bus/pci/linux/rte_pci_uio.c > >  create mode 100644 drivers/bus/pci/linux/rte_pci_vfio.c > >  create mode 100644 drivers/bus/pci/linux/rte_vfio_mp_sync.c > >  create mode 100644 drivers/bus/pci/private.h > >  create mode 100644 drivers/bus/pci/rte_bus_pci_version.map > >  create mode 100644 drivers/bus/pci/rte_pci_common.c > >  create mode 100644 drivers/bus/pci/rte_pci_common_uio.c > >  delete mode 100644 lib/librte_eal/bsdapp/eal/eal_pci.c > >  delete mode 100644 lib/librte_eal/common/eal_common_pci.c > >  delete mode 100644 lib/librte_eal/common/eal_common_pci_uio.c > >  delete mode 100644 lib/librte_eal/common/include/rte_pci.h > >  delete mode 100644 lib/librte_eal/linuxapp/eal/eal_pci.c > >  delete mode 100644 lib/librte_eal/linuxapp/eal/eal_pci_init.h > >  delete mode 100644 lib/librte_eal/linuxapp/eal/eal_pci_uio.c > >  delete mode 100644 lib/librte_eal/linuxapp/eal/eal_pci_vfio.c > >  delete mode 100644 lib/librte_eal/linuxapp/eal/eal_vfio_mp_sync.c > >  create mode 100644 lib/librte_pci/Makefile > >  create mode 100644 lib/librte_pci/include/rte_pci.h > >  create mode 100644 lib/librte_pci/rte_pci.c > >  create mode 100644 lib/librte_pci/rte_pci_version.map > > > > diff --git a/lib/librte_pci/Makefile b/lib/librte_pci/Makefile > > new file mode 100644 > > index 0000000..e3c6ca5 > > --- /dev/null > > +++ b/lib/librte_pci/Makefile > > @@ -0,0 +1,49 @@ > > +#   BSD LICENSE > > +# > > +#   Copyright(c) 2017 6WIND S.A. > > +#   All rights reserved. > > +# > > +#   Redistribution and use in source and binary forms, with or > > without > > +#   modification, are permitted provided that the following > > conditions > > +#   are met: > > +# > > +#     * Redistributions of source code must retain the above > > copyright > > +#       notice, this list of conditions and the following > > disclaimer. > > +#     * Redistributions in binary form must reproduce the above > > copyright > > +#       notice, this list of conditions and the following disclaimer > > in > > +#       the documentation and/or other materials provided with the > > +#       distribution. > > +#     * Neither the name of 6WIND nor the names of its > > +#       contributors may be used to endorse or promote products > > derived > > +#       from this software without specific prior written > > permission. > > +# > > +#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND > > CONTRIBUTORS > > +#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT > > NOT > > +#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND > > FITNESS FOR > > +#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE > > COPYRIGHT > > +#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, > > INCIDENTAL, > > +#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT > > +#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF > > USE, > > +#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND > > ON ANY > > +#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR > > TORT > > +#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF > > THE USE > > +#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH > > DAMAGE. > > + > > +include $(RTE_SDK)/mk/rte.vars.mk > > + > > +# library name > > +LIB = librte_pci.a > > + > > +CFLAGS += -O3 > > +CFLAGS += $(WERROR_FLAGS) > > +CFLAGS += -I$(SRCDIR) -I$(SRCDIR)/include > > This breaks build reproducibility, please use something like: > > CFLAGS := -I$(SRCDIR)/include -I$(SRCDIR) $(CFLAGS) > CFLAGS += $(WERROR_FLAGS) -O3 > > See http://dpdk.org/dev/patchwork/patch/27639/ > Sure, thanks for the heads up. > -- > Kind regards, > Luca Boccassi -- Gaëtan Rivet 6WIND