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 82F2345E36; Thu, 5 Dec 2024 05:19:10 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0A27B402C4; Thu, 5 Dec 2024 05:19:10 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 19D5C402AE for ; Thu, 5 Dec 2024 05:19:08 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1213) id 3512620ACD60; Wed, 4 Dec 2024 20:19:07 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 3512620ACD60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1733372347; bh=5gvDCoKW4d+5Ex8o6kxJJxd1DETHWTGsT2p/r2/V0ho=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Zg6Qy6OvRymGhAqSM0QuopZKkuqsix+hM+H8vCZUdc1u23pjdoUJUA6+4NEWuqW4d wVc6e7I0WohY5zZJQoqR4tmhmZKftNHNuTVFJ/YEh5cjghUEzjfWM5CGrXnVvikWNM q1LawQf29T5/zKRXFxAuQFiuh/jhi9Y7Tiiz/a64= Date: Wed, 4 Dec 2024 20:19:07 -0800 From: Andre Muezerie To: Stephen Hemminger Cc: dev@dpdk.org Subject: Re: [PATCH 0/6] eliminate dependency on non-portable __SIZEOF_LONG__ Message-ID: <20241205041907.GA3550@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <1733342995-3722-1-git-send-email-andremue@linux.microsoft.com> <20241204135058.2dfc6164@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241204135058.2dfc6164@hermes.local> User-Agent: Mutt/1.5.21 (2010-09-15) 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, Dec 04, 2024 at 01:50:58PM -0800, Stephen Hemminger wrote: > On Wed, 4 Dec 2024 12:09:49 -0800 > Andre Muezerie wrote: > > > Macro __SIZEOF_LONG__ is not standardized and MSVC does not define it. > > Therefore the errors below are seen with MSVC: > > > > ../lib/mldev/mldev_utils_scalar.c(465): error C2065: > > '__SIZEOF_LONG__': undeclared identifier > > ../lib/mldev/mldev_utils_scalar.c(478): error C2051: > > case expression not constant > > > > ../lib/mldev/mldev_utils_scalar_bfloat16.c(33): error C2065: > > '__SIZEOF_LONG__': undeclared identifier > > ../lib/mldev/mldev_utils_scalar_bfloat16.c(49): error C2051: > > case expression not constant > > > > Turns out that the places where __SIZEOF_LONG__ is currently > > being used can equaly well use sizeof(long) instead. > > > > Andre Muezerie (6): > > drivers/bus: eliminate dependency on non-portable __SIZEOF_LONG__ > > drivers/common: eliminate dependency on non-portable __SIZEOF_LONG__ > > drivers/dma: eliminate dependency on non-portable __SIZEOF_LONG__ > > drivers/net: eliminate dependency on non-portable __SIZEOF_LONG__ > > drivers/raw: eliminate dependency on non-portable __SIZEOF_LONG__ > > lib/mldev: eliminate dependency on non-portable __SIZEOF_LONG__ > > > > drivers/bus/fslmc/mc/fsl_mc_cmd.h | 2 +- > > drivers/common/cnxk/roc_bits.h | 4 ++-- > > drivers/common/nfp/nfp_platform.h | 4 ++-- > > drivers/dma/dpaa/dpaa_qdma.h | 2 +- > > drivers/dma/hisilicon/hisi_dmadev.h | 2 +- > > drivers/net/ena/base/ena_plat_dpdk.h | 4 ++-- > > drivers/net/hns3/hns3_ethdev.h | 2 +- > > drivers/raw/ifpga/base/opae_osdep.h | 4 ++-- > > lib/mldev/mldev_utils_scalar.h | 2 +- > > 9 files changed, 13 insertions(+), 13 deletions(-) > > > > -- > > BITS_PER_LONG etc should be in rte_common.h not scattered > all over these drivers. Makes sense. I'll update the series, but will limit the additional changes to BITS_PER_LONG and BITS_PER_LONG_LONG to limit the size of this series. -- Andre Muezerie