From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3F834A0542; Wed, 26 Oct 2022 11:33:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9AAC940E28; Wed, 26 Oct 2022 11:33:27 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 5163A40041 for ; Wed, 26 Oct 2022 11:33:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666776805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=nlOp2/eLW6JBnFDycCMQGDj0rjgY+bppABBdgm+dDhw=; b=SFDUmwE1pYd2BkWl34iV3baToV/wv+qkDudr5OH2+fghj/3TOuVJlwLNUy7IMw5DWTP4Ig AsG1yt5OtSXxk7Iw+uF5vqybapVcfJ7N6IXcVcPIHycE15+JAEBUD15rWMjWb+N5RRI8vJ 8mX4PVI4VysGMPsVQqLqyYtMBVyvwjI= Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-558-6nwr_cpCMlO34uadfC1P2w-1; Wed, 26 Oct 2022 05:33:20 -0400 X-MC-Unique: 6nwr_cpCMlO34uadfC1P2w-1 Received: by mail-pl1-f200.google.com with SMTP id c10-20020a170902d48a00b001825736b382so9914335plg.15 for ; Wed, 26 Oct 2022 02:33:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=nlOp2/eLW6JBnFDycCMQGDj0rjgY+bppABBdgm+dDhw=; b=4NpF2NAktyLF/cDfkphfHYguGwjWohBMUu1Vlpt56w6GA6cTBzR+kTVeWNjZ8J1dEh HGPawf8jWa/YVuqq9gXDJiNwVuy7WtIEZF0+6/jXFhrQZ0EqKl+Da+mICv46hRDh8U/K DAeRRuwq+wsid1VXDObQ7Clr3/ltMqpwhhavagOz6PqwpCkV/x6YdXFCCGtKAFYWCQC9 phDMOTNuGHHMHHdHNYJ91yG2yb7K2aOCPvmiVwUiS8TtVbqzGzsJTIeKnqd3THMejlWk tkt41anKADfE7U3Y3gZE5pO3x8KUUl37n+aQo6VjLd0fsROoUo8nMQc7uJp3zzCRPPcc RBUg== X-Gm-Message-State: ACrzQf05kLOyfpOuUZZuuaQ6kkAHV/latxTQ7u06jr2zDlS1nZtEq9yP pz5qsLWm9r/3Qg4DkmEOWcN/Fe1YtrcvXaV2mXE4o4/sFKqvrXMDybKDGaLX9xAeyFJ4AJm4VxN WWby7nYod6gZ1x7tEjNk= X-Received: by 2002:a17:90a:428e:b0:205:d5fe:e0b3 with SMTP id p14-20020a17090a428e00b00205d5fee0b3mr3175001pjg.33.1666776799323; Wed, 26 Oct 2022 02:33:19 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7zs4lwIKd8QofcU1vmRKfa+mtW0AZd7eCN30SXGUPcYmJ2tUEcBxDKJ6X/Peq02UvUCAkMi2hCc2WN5YYSBiY= X-Received: by 2002:a17:90a:428e:b0:205:d5fe:e0b3 with SMTP id p14-20020a17090a428e00b00205d5fee0b3mr3174978pjg.33.1666776799070; Wed, 26 Oct 2022 02:33:19 -0700 (PDT) MIME-Version: 1.0 References: <20221026084244.22083-1-junfeng.guo@intel.com> <67f72e30-5247-6055-88cb-b019a85328ab@amd.com> In-Reply-To: <67f72e30-5247-6055-88cb-b019a85328ab@amd.com> From: David Marchand Date: Wed, 26 Oct 2022 11:33:07 +0200 Message-ID: Subject: Re: [PATCH] net/gve: fix meson build failure on non-Linux platforms To: Ferruh Yigit , Junfeng Guo 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 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, Oct 26, 2022 at 11:10 AM Ferruh Yigit 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 > >> > >> #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