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 CD0924331F; Mon, 13 Nov 2023 23:28:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6B683402C9; Mon, 13 Nov 2023 23:28:57 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id BEEEE40151 for ; Mon, 13 Nov 2023 23:28:56 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id F390620B74C1; Mon, 13 Nov 2023 14:28:55 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com F390620B74C1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1699914536; bh=WE5hkDEwsNzXpXJ2CZz7EQL2fboEmUwEnNj2p0xJXQc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=b6zdknYOyrxn8E7DSPOa9E3qXtTqeBUrhOb9vgV3aHCkZhB0vp9OQbttkXahOXzva IIXAyBNTEL98KoOCRqkaiWPRlvQk8bhFJKBmn3LjMRBC9SaUqyaxh3Qa9i99v58wWD gm1HWt8nW+UujwePsAB/7LMZjk/97Yfs2Ye10C50= Date: Mon, 13 Nov 2023 14:28:55 -0800 From: Tyler Retzlaff To: Stephen Hemminger Cc: dev@dpdk.org, ivan.malov@oktetlabs.ru, Andrew Rybchenko , Ivan Malov Subject: Re: [PATCH v2 2/3] net/sfc: fix non-constant expression inr RTE_BUILD_BUG_ON() Message-ID: <20231113222855.GA26065@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20231111172153.57461-1-stephen@networkplumber.org> <20231113170605.408281-1-stephen@networkplumber.org> <20231113170605.408281-3-stephen@networkplumber.org> <20231113141326.0df15fd6@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231113141326.0df15fd6@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 Mon, Nov 13, 2023 at 02:13:26PM -0800, Stephen Hemminger wrote: > On Mon, 13 Nov 2023 09:06:04 -0800 > Stephen Hemminger wrote: > > > The macro RTE_MIN has some hidden assignments to provide type > > safety which means the statement can not be fully evaluted in > > first pass of compiler. Replace RTE_MIN() with equivalent macro. > > > > This will cause errors from checkpatch about multiple evaluations > > of same expression in macro but it is ok in this case. > > > > Fixes: 4f936666d790 ("net/sfc: support TSO for EF100 native datapath") > > Cc: ivan.malov@oktetlabs.ru > > Signed-off-by: Stephen Hemminger > > Building with clang finds another issue. > ../drivers/net/sfc/sfc_rx.c:158:3: error: expected expression > RTE_BUILD_BUG_ON(RTE_MBUF_F_RX_IP_CKSUM_UNKNOWN != 0); > yet > lib/mbuf/rte_mbuf_core.h:#define RTE_MBUF_F_RX_IP_CKSUM_UNKNOWN 0 curious. do you have the gcc -E / clang -E preprocessed output for the expansion? wonder what it looks like.