From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9DB90C38A2D for ; Wed, 26 Oct 2022 08:52:00 +0000 (UTC) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7545240A7F; Wed, 26 Oct 2022 10:51:59 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 5B241400D6 for ; Wed, 26 Oct 2022 10:51:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1666774317; 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=6Ak1Q1pNihH1SdQM330NShHFJ0QWWWi0QHnOkB8eD8o=; b=UZ3WeKcidR0t0yzSG5rzobW6MtVplMUZm7RlRkuSTosbxb98CKUYK5aNJ1IfhD180IBz2/ KeH5uWSeExNKSDnuz5dpTbkxnkshsurPspxhlKvlroiPe/T+TzYDn4oqvMa09drNXcu+QS 93HUmlXEGhwS+3khUz1yl8of+MEPMUw= 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-133-iRbbCc8PMFuLlCXZNJEYDQ-1; Wed, 26 Oct 2022 04:51:54 -0400 X-MC-Unique: iRbbCc8PMFuLlCXZNJEYDQ-1 Received: by mail-pl1-f200.google.com with SMTP id e10-20020a17090301ca00b00183d123e2a5so9700965plh.14 for ; Wed, 26 Oct 2022 01:51:53 -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=6Ak1Q1pNihH1SdQM330NShHFJ0QWWWi0QHnOkB8eD8o=; b=vytHN8InzE6+hLkQcGtLLzzgI+n6CMFU0doUnhmL7bE0Bhgj54jkBudwo5YgHxTVHf Z+i3G11qq/X5GDfPEaJkXSfHZxpSBxJfYTqEYYXMsi8OlbBMbJpIpNO/qwwRq0wJd1sC 0HHBI6+z1NDF31/x2HLz1TAf1/Ng2QXx4yQUcqDC8TTklsIxfU+d7s4+YXbpu+qamkhG j7pMk7W1n+aD1MH+QRQ9B+1kHjJ1O3Xunh6zTwxVhIAzXx/9SK8TzkUT4RsbWD5kE8pr atO3YlNidwLcpO8b2werahH0WCi9tkBlbpWjW1mhnZ6gekBvlALnPKcNxT10PqPvackq rF8g== X-Gm-Message-State: ACrzQf3vwXiYUW+mw0gzRZuJ3WVfooz9FHmrytqjfNnd2znCrQFJL06m wvpTTgtVNtKcQFhca2kdO4WL64KBjbEo3qUXj+2HlVV5FFwnGyFzsXrQtQOMg2QI+mn3v/9JeIN JO8pt9dlWNimdwEQBX4c= X-Received: by 2002:a63:854a:0:b0:46f:45ab:31a with SMTP id u71-20020a63854a000000b0046f45ab031amr893321pgd.190.1666774313135; Wed, 26 Oct 2022 01:51:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5+O84wuxb6hoqSTP5quX7FY6viYkNtCsYkOPYWnto/fUIr9JMENhHqh5IACqMs+obgYxKxED8KefhUrOlmMV0= X-Received: by 2002:a63:854a:0:b0:46f:45ab:31a with SMTP id u71-20020a63854a000000b0046f45ab031amr893298pgd.190.1666774312904; Wed, 26 Oct 2022 01:51:52 -0700 (PDT) MIME-Version: 1.0 References: <20221026084244.22083-1-junfeng.guo@intel.com> In-Reply-To: <20221026084244.22083-1-junfeng.guo@intel.com> From: David Marchand Date: Wed, 26 Oct 2022 10:51:41 +0200 Message-ID: Subject: Re: [PATCH] net/gve: fix meson build failure on non-Linux platforms To: 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 10:44 AM Junfeng Guo wrote: > > Meson build may fail on FreeBSD with gcc and clang, due to missing > the header file linux/pci_regs.h on non-Linux platform. Thus, in > this patch, we removed the file include and added the used Macros > derived from linux/pci_regs.h. > > Fixes: 3047a5ac8e66 ("net/gve: add support for device initialization") > Cc: stable@dpdk.org ... No need for Cc: stable. > > Signed-off-by: Junfeng Guo > --- > drivers/net/gve/gve_ethdev.c | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > > 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. -- David Marchand