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 7BB09A0542; Wed, 26 Oct 2022 11:10:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9CE9B40E28; Wed, 26 Oct 2022 11:10:47 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by mails.dpdk.org (Postfix) with ESMTP id CF24F40041 for ; Wed, 26 Oct 2022 11:10:46 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e8KgV196vikM2blY1ZHLavf99hXEln9VMtM5/ADJEW2YRSFev0BZE3evjq1omNpr6B5gG9fjzWZxUWDye7BvK4aRK9u1XgEp3qdSZImnFGWpLgBF58j/h7y+ur/nVFQpjSFSg7ig3i8ZbBX/p1C+/JdcIMDJX8VQ3zR6Pt4S0K0zRhVb1EbJ+Dz37GltVoCDhnBqQ40zN1vjtiQgQUvGHxRbwPE7xYUlkVSi205sYgurJNXFYFjQNRL7FZL6AWzvprXpFLYvafm6oWTaqSGeg3hzv3X4iskxBfZ8a22jMgXgzvrx85+zGjVcqUt1XL38+0vPl9UyKlsAH/oOffvL3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=zI1N93E6aEUM48Vj6kZPAoi0XBxk6J3f7FNxm0HdInE=; b=HtiGfndL/IrQ+jVP6nAUNJ8RvBiVRratMcqypIMCxT1/l8zmOiaz3YOyi5xKoyj0DIyKAek7SYjdxyjTgxg9Zs5EP2t3bWMt6keu2OzCr6+crea2pFsEvxP3qJvGWz8XGpGn41blqpXMJ7BtN+d1P0MmwT2f2weqCWnU62tcHJLkswjizOCAa3j8Stl+TlgpyGOgODOTfM0Nt/v9AiqFqmejWvBm/dQbohhB9n7ZaeFbKdNhBl4BJo9bGDeKZFui9nZJesTJwbtZnC/rspveMJ8WYPRmUBy6cStTtN7K31hkUBI68tmYosws3BKUZZOk67YeXvI/CWw4LtVDEvkfVA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zI1N93E6aEUM48Vj6kZPAoi0XBxk6J3f7FNxm0HdInE=; b=QtxzCN88YWE87f+3ouMSJ06Ggqi6LouutkzGXFExcofkzM9yZfdi8LNcsxPbex6+oDgATo5QW4g+JB/O0q5KtfyGVaVfaojldLP8VQpEczxiyuPyL80ck1bQNiuLLD/j3dlt4Mf1fLwPOQN1HXq73DBnZ1WZzt+W3MWWmRwc0Wk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from MN2PR12MB4301.namprd12.prod.outlook.com (2603:10b6:208:1d4::22) by BL3PR12MB6452.namprd12.prod.outlook.com (2603:10b6:208:3bb::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.28; Wed, 26 Oct 2022 09:10:43 +0000 Received: from MN2PR12MB4301.namprd12.prod.outlook.com ([fe80::7900:1b25:bc:104c]) by MN2PR12MB4301.namprd12.prod.outlook.com ([fe80::7900:1b25:bc:104c%8]) with mapi id 15.20.5746.028; Wed, 26 Oct 2022 09:10:43 +0000 Message-ID: <67f72e30-5247-6055-88cb-b019a85328ab@amd.com> Date: Wed, 26 Oct 2022 10:10:36 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH] net/gve: fix meson build failure on non-Linux platforms Content-Language: en-US To: David Marchand , 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 References: <20221026084244.22083-1-junfeng.guo@intel.com> From: Ferruh Yigit In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0083.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:190::16) To MN2PR12MB4301.namprd12.prod.outlook.com (2603:10b6:208:1d4::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR12MB4301:EE_|BL3PR12MB6452:EE_ X-MS-Office365-Filtering-Correlation-Id: 780746ce-e71c-4b18-76ac-08dab731f5d9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Me92TghowfeTigrF+hQnChEdxKSaS+vj14afOTmIciO34MQNdawbleP0N8t6/Ln3mq81Xr+Mjnzp+XaxGrxgFJDwlR/hAPx8bdmm6/jusfUpjZOmQ/lXQ8fqHYRNY2KMhk+THKvmLbt9kPOKmegJsgHgfev+NdVgjRBSsFuI+nHvY6hVa5Ju42zusn8yH5E967cM5/S0iA76UPRWgYHMD1zqHWVsX+4AkSgLXLyLlzl/CU8JLHNyezX6ZQkKflpuj57ji0dGjQtFR3qIdwbrUc/XxZb3O4wtl8gVt+PA4vU71eqQdHdkM13yp9wRDgfu9Q98G/CU6SdlV21ZofzpbEA41LyeG+Uc9QZEBA2PdBpq4wEo7+8UuuWd9I5I/THC4PfV46JjNageaxMatx9uRbN0ZhnK4KJi1HtTQUeaNOY/jwb6F3Ck0bAKM2yiOaUV9O4E+PLV/i4+For5H7yC5ob8HJszfDoR/XJyn1HYsOdpyAJKm73iFGeDopwas5/QFqF8V6Gy193V2fbNlNKuyB/5F7U7L5ZKHz5frVGi0egoMpe04N35m4w+s4hBamJciQUz7SEi5BLrtvBOcPJT76dHmuRkmZA9biBYnQGKR9JknmYtYojxtfaZ9g9hgTlMhg+ORPu3YuX6JIGdbZC0ttfoZP9xvZ0ikU8mun6y7/M2XHIYcKIdWs1wL47GVpVhAembLxsuvpFwzYVeZdj/nRcaknTomHQTtSWJjT85L6TCVd/Scv1xEyeZt//LSJn1R5zysB9xajdzP5IqiuTYiIUirQb/zcgG0hLboAiH60Y= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR12MB4301.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(376002)(39860400002)(136003)(366004)(346002)(396003)(451199015)(6486002)(31686004)(6666004)(66946007)(316002)(53546011)(6506007)(478600001)(66476007)(4326008)(8676002)(66556008)(110136005)(36756003)(26005)(6512007)(38100700002)(7416002)(8936002)(5660300002)(44832011)(86362001)(41300700001)(2616005)(31696002)(186003)(2906002)(83380400001)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VlVxWXRhbDY4dkhSNXFkT0lwMlQ3NSt1VEVOeDc1T0daakorbWpDVmNOTXlv?= =?utf-8?B?Sml2VHJxbC9ITVVNV0hzTjhHM0ozRnZaVDl5MXRiby8yT1dXTEtPclRsL1l0?= =?utf-8?B?VDJoMnpIY1M1QjVYNWVIeS9BZndGSktobVpLV1QvL0lRaXBrOG1kMGp1Skgz?= =?utf-8?B?ZU15U3BTTE11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kyRnV6anQxUnpZ?= =?utf-8?B?a0pSVFgwYmNFdGE3OTZqNmNERWhqd013elVvUzlqNUp1cXB5NXZqNkd6WUxp?= =?utf-8?B?NTBPYUswOEVOV0h6Qkg4aTNabGRsaUZqVkcwV0lCa1U5MmFTOEpDdE56YTda?= =?utf-8?Q?/I6cO9FK0aUQkFZTtJxDGpsfE?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 780746ce-e71c-4b18-76ac-08dab731f5d9 X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB4301.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Oct 2022 09:10:43.3858 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Ae7HnUML/xDMDeWFWLNvHmxdrTnkLb1q3zUKaVgRBklW/mq3W+wlD0htrDoNzyb+ X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR12MB6452 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 10/26/2022 9:51 AM, David Marchand wrote: > CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email. > > > 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. > 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.