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 C5EAAA0546; Thu, 16 Jul 2020 19:33:55 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0E246F04; Thu, 16 Jul 2020 19:33:55 +0200 (CEST) Received: from mail-il1-f194.google.com (mail-il1-f194.google.com [209.85.166.194]) by dpdk.org (Postfix) with ESMTP id 39856E07 for ; Thu, 16 Jul 2020 19:33:54 +0200 (CEST) Received: by mail-il1-f194.google.com with SMTP id x9so5787278ila.3 for ; Thu, 16 Jul 2020 10:33:54 -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=OJj9R9Jq1IyoQyCjKHDPmV9eDNslik+krt3iSicIFtI=; b=qX1rq/TiVM+1rZ73QbjjGk+m1MylaBbJX97fGhG08vNJZXMY3Z1sT/C8fSJAPrjukP XKtJniUZU/9wWLuiTAgC28/WQDEn4jJQSaATNLqpgvhDOQIbtHntVE1JJ++0GwcAvQbm B9tOU1zilAoIKROsY+5+QBsmvrKbcjI5jlLLmpsgS305Za0dzPvEBix8cb82TGb/S1cf 6+Fsqy9K8NQDHXSFAf0F1fXS8SOOQUCtfkZsgsw3oEKxteztPIYMUZ+hNtWuNqa7I43g 7GwYotpG2Lx6ys+7JueDJa14l5Z4jVJa1y+NbIF5APVJcGXHrmfTYZjb72RyO8gWMixL rh1w== 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=OJj9R9Jq1IyoQyCjKHDPmV9eDNslik+krt3iSicIFtI=; b=QUkLsTXdlDf/QkkvzNMn/vgDtTDKemm7AAFJ4Cj9VWtzJ80pN0aNJ8df/eK80Rxpx4 kVF+1UlPWptdtpsPwxOfLX6couc4LeBrc4Qs7Aj8Z5CphShJNGEJ4tV6UQh28Wkkq9U/ Q8LWTZFDMysdklrkDn2kapZdNUhr+TM5wI+7qzvgUOMH02TbrA7LMQhlx9D4eCq6s1x4 4UnlgpLfSuC7++HxdvDQ9r1oDZTGvgugWgWhDLGaf1sBO0BSwtEYlJHehun1CqNWqkGb QyARgYFKEndZIAMiWMQueNxdSjax41Z2xb0VyQ7wT/On3B1H+vOonpKqIkWs2GOkq6zr LEHQ== X-Gm-Message-State: AOAM532uGW4REGA7bAT//5S80Q6bi0sAwSXIi9SuAtJrB9b1wdsEjQK2 0zdur5tY0psZJb2W4O9lsXGTIZf+66ENrcZzpDY= X-Google-Smtp-Source: ABdhPJx1GN2Omy8dGQGFW9+xl8Hz1VuO/PbiEykT2805lXc0JGz7GMdQojf8N3vNUAiIJsFykVss9Yr0sHFwWl22Ui4= X-Received: by 2002:a92:1547:: with SMTP id v68mr5883365ilk.294.1594920833331; Thu, 16 Jul 2020 10:33:53 -0700 (PDT) MIME-Version: 1.0 References: <20200713151319.17547-2-manishc@marvell.com> <72498440.BHRkrRebfW@thomas> <33229780.9rCRSYNQsn@thomas> In-Reply-To: <33229780.9rCRSYNQsn@thomas> From: Jerin Jacob Date: Thu, 16 Jul 2020 23:03:37 +0530 Message-ID: To: Thomas Monjalon Cc: =?UTF-8?Q?Ga=C3=ABtan_Rivet?= , Manish Chopra , Ferruh Yigit , 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 10:27 PM Thomas Monjalon wrot= e: > > 16/07/2020 18:43, Jerin Jacob: > > On Thu, Jul 16, 2020 at 9:25 PM Thomas Monjalon w= rote: > > > > > > 16/07/2020 15:02, Jerin Jacob: > > > > On Thu, Jul 16, 2020 at 6:20 PM Thomas Monjalon wrote: > > > > > > > > > > 16/07/2020 13:55, Jerin Jacob: > > > > > > On Thu, Jul 16, 2020 at 4:57 PM Thomas Monjalon wrote: > > > > > > > > > > > > > > 16/07/2020 12:27, Jerin Jacob: > > > > > > > > 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 system= s, 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 t= o avoid > > > > > > > > > > dependency of DPDK on linux headers". > > > > > > > > > > > > > > > > > > > > > > > > > > > > To add to it, if this is actually the motivation to add t= his header, I > > > > > > > > > don't think it is sufficient. > > > > > > > > > > > > > > > > > > You can restrict the function definition to the linux par= t 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/libr= te_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-sysca= ll-note */ > > > > > > > > > > > +/* > > > > > > > > > > > > > > > > > > > > This file is delivered alongside the PCI lib, targeting= userspace. > > > > > > > > > > This seems to be an exception to the license policy des= cribed in > > > > > > > > > > license/README. Code shared between kernel and userspac= e 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 boa= rd 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 namespac= e 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 libra= ry. > > > > > > Moreover, we need these symbols for Windows OS as well. > > > > > > IMO, We should add absolute minimum constants that needed for D= PDK as RTE_PCI_* > > > > > > > > > > I am for mandating the dependency instead of copying it. > > > > > > > > You mean _pciutils_ package as a mandatory dependency to DPDK. > > > > > > There is already this dependency: > > > #include > > > > I just checked in archlinux, PCI headers can be provided by > > > > # pacman -F /usr/include/pci/header.h > > usr/include/pci/header.h is owned by core/pciutils 3.7.0- > > > > # pacman -F /usr/include/linux/pci.h > > usr/include/linux/pci.h is owned by core/linux-api-headers 5.4.17-1 > > > > > > > I'm missing the real justification for this patch. > > > > See below. > > > > > Is there some missing definitions? > > > Is there some environments where this file is missing? > > > > > > > > pciutils cannot be installed on Windows? > > > > > Why do you care about Windows? > > > > > I don't see any contribution for qede on Windows. > > > > > > > > You closely review the patch, it not about qede. The proposed file > > > > comes at lib/librte_pci/rte_pci_regs.h which is common to Windows. > > > > > > The series is for qede. I'm trying to understand the motivation. > > > > First version of qede driver sent with defined generic PCI symbols and > > generic PCI function like pci_find_next_ext_capability() in qede driver= . > > That's a pity the v2 is not threaded with v1, > I would have found these explanations easily myself. > > > In the review, I suggested using generic rte_ function as > > a) It is not specific to qede. > > b) Other drivers also doing the same thing in their own driver space > > as there is no dpdk API for the same. > > This patches create generic API for pci_find_next_ext_capability() and > > remove duplicate implementation > > from the drivers. > > http://patches.dpdk.org/patch/73959/ > > I agree it's good to have an API for such thing. > > So far such feature is supported in drivers on Linux, > requiring only Linux headers to be installed. > Do we need more? We would need only Linux headers for Implementing rte_pci_find_next_ext_capability(). I leave, @Manish Chopra to comment on other PCI symbols requirements. > >