From: David Marchand <david.marchand@redhat.com>
To: Ferruh Yigit <ferruh.yigit@amd.com>, Junfeng Guo <junfeng.guo@intel.com>
Cc: qi.z.zhang@intel.com, jingjing.wu@intel.com,
ferruh.yigit@xilinx.com, beilei.xing@intel.com, dev@dpdk.org,
xiaoyun.li@intel.com, awogbemila@google.com,
bruce.richardson@intel.com, hemant.agrawal@nxp.com,
stephen@networkplumber.org, chenbo.xia@intel.com,
helin.zhang@intel.com
Subject: Re: [PATCH] net/gve: fix meson build failure on non-Linux platforms
Date: Wed, 26 Oct 2022 11:33:07 +0200 [thread overview]
Message-ID: <CAJFAV8wkyyohtu8WJEK66hutcj5DOu+gzRbsjVZjYR4+yu-6LA@mail.gmail.com> (raw)
In-Reply-To: <67f72e30-5247-6055-88cb-b019a85328ab@amd.com>
On Wed, Oct 26, 2022 at 11:10 AM Ferruh Yigit <ferruh.yigit@amd.com> wrote:
> >> diff --git a/drivers/net/gve/gve_ethdev.c b/drivers/net/gve/gve_ethdev.c
> >> index b0f7b98daa..e968317737 100644
> >> --- a/drivers/net/gve/gve_ethdev.c
> >> +++ b/drivers/net/gve/gve_ethdev.c
> >> @@ -1,12 +1,24 @@
> >> /* SPDX-License-Identifier: BSD-3-Clause
> >> * Copyright(C) 2022 Intel Corporation
> >> */
> >> -#include <linux/pci_regs.h>
> >>
> >> #include "gve_ethdev.h"
> >> #include "base/gve_adminq.h"
> >> #include "base/gve_register.h"
> >>
> >> +/*
> >> + * Following macros are derived from linux/pci_regs.h, however,
> >> + * we can't simply include that header here, as there is no such
> >> + * file for non-Linux platform.
> >> + */
> >> +#define PCI_CFG_SPACE_SIZE 256
> >> +#define PCI_CAPABILITY_LIST 0x34 /* Offset of first capability list entry */
> >> +#define PCI_STD_HEADER_SIZEOF 64
> >> +#define PCI_CAP_SIZEOF 4
> >> +#define PCI_CAP_ID_MSIX 0x11 /* MSI-X */
> >> +#define PCI_MSIX_FLAGS 2 /* Message Control */
> >> +#define PCI_MSIX_FLAGS_QSIZE 0x07FF /* Table size */
> >
> > No, don't introduce such defines in a driver.
> > We have a PCI library, that provides some defines.
> > So fix your driver to use them.
> >
After chat with Ferruh, I am ok if we take this compilation fix for
now and unblock the CI..
>
> I can see 'bnx2x' driver is using some flags from 'dev/pci/pcireg.h'
> header for FreeBSD, unfortunately macro names are not same so a #ifdef
> is required. Also I don't know it has all macros or if the header is
> available in all versions etc..
>
> Other option can be to define them all for DPDK in common pci header? As
> far as I can see we don't have all defined right now.
>
If there are some missing definitions we can add them in the pci header indeed.
Those are constants, defined in the PCIE standard.
I can post a cleanup later, but I would be happy if someone else handles it.
Thanks.
--
David Marchand
next prev parent reply other threads:[~2022-10-26 9:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-26 8:42 Junfeng Guo
2022-10-26 8:51 ` David Marchand
2022-10-26 9:10 ` Ferruh Yigit
2022-10-26 9:33 ` David Marchand [this message]
2022-10-26 10:01 ` Ferruh Yigit
2022-10-26 10:24 ` Guo, Junfeng
2022-10-26 10:05 ` Gao, DaxueX
2022-10-26 10:23 ` [PATCH v2] " Junfeng Guo
2022-10-26 11:11 ` Ferruh Yigit
2022-10-27 3:08 ` Gao, DaxueX
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=CAJFAV8wkyyohtu8WJEK66hutcj5DOu+gzRbsjVZjYR4+yu-6LA@mail.gmail.com \
--to=david.marchand@redhat.com \
--cc=awogbemila@google.com \
--cc=beilei.xing@intel.com \
--cc=bruce.richardson@intel.com \
--cc=chenbo.xia@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=ferruh.yigit@xilinx.com \
--cc=helin.zhang@intel.com \
--cc=hemant.agrawal@nxp.com \
--cc=jingjing.wu@intel.com \
--cc=junfeng.guo@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=stephen@networkplumber.org \
--cc=xiaoyun.li@intel.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).