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 53622438E4; Wed, 17 Jan 2024 19:26:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0930740EDB; Wed, 17 Jan 2024 19:25:58 +0100 (CET) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by mails.dpdk.org (Postfix) with ESMTP id 7BF2940DFD for ; Wed, 17 Jan 2024 19:25:54 +0100 (CET) Received: by mail-pj1-f43.google.com with SMTP id 98e67ed59e1d1-28e718874e1so1588501a91.0 for ; Wed, 17 Jan 2024 10:25:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1705515953; x=1706120753; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=W2p1YCG44ZFpp5dbBnEOITxlCt++kfGtm+IBaz64x5I=; b=JfvhOn0ZaOQUuEGfzUqDhbE3vZW9F2KfnGK8h14I3TsNPao5DSF/x00UYwBVK0DMA1 vqzVNxsbViNeYQiF3XIpKkFIQElaDlttJISEvkDw1igkabTdU/MWR6TYkt+0x9Dy75Pk M7hPZBNYa1cHwYGI5ori4jiqKIktIy747T6a6SPrsiM0dXGAvcRYlw35Xsx4ZGPUxZKI mrf0fwP7haHEwBRwQxzlXaRR7DUWbLC5YsCRsCfFkkdaJgadQa6gLfRlYojfM3qDnW3R rYuR5ygC4UjwaS7wumLfEoPZ3KFEranpO7lsdXenF7dIsq+NLZ7LWKau3lm95sHRciBs nH6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705515953; x=1706120753; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=W2p1YCG44ZFpp5dbBnEOITxlCt++kfGtm+IBaz64x5I=; b=pkvPGTfJWsUR9Fxe3JIDpokk1d8/RCfimq8cRtLewpeilxb/s4L+f6qMRY+1ibc9FA 32U61R0SODUhdlluGT/9egqAqtwoKJ0Pxg2fbgkBByTICzswhk1esxmj/Fi1F29R68fE wjr7VopygitXqWmgtiXgfY8qK6CIot+Hff0pkeT1jJHCJL+ej4TlzQqeI6wMy2436MPW LBk+sdZg7vVcsrArI4Xrg3ZEihpqaQZ536EhSGYigB51wIGQjACod/vNQQk7OVTxtIH+ 2JQ4dCR8AvNBYyZbT1E6yroINdVdSLljtS71wpmUXEqkEpCHfjAnaviIupr0fg2F1Slf 55FA== X-Gm-Message-State: AOJu0Ywxe34Bas7MSsBGuaCCcjSM6Fv4VJWD30WEc7+kp+vjWOUEKvZc DGyNYEDpuTtM3Q0XfgVZBRtPlvkEGFXz62RgNV/EOYALlIoKdw== X-Google-Smtp-Source: AGHT+IHwrEYcxcWeTktlPQ2dkfT2Q5N2bHV9KC6jzSQVsQ+z2WfvYZOnNro2CYCISkaQ0cMdM2nXVA== X-Received: by 2002:a17:90a:db07:b0:28e:eb9a:477d with SMTP id g7-20020a17090adb0700b0028eeb9a477dmr1527135pjv.79.1705515953707; Wed, 17 Jan 2024 10:25:53 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id qj15-20020a17090b28cf00b0028ce507cd7dsm14334124pjb.55.2024.01.17.10.25.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 10:25:53 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , ivan.malov@oktetlabs.ru, Tyler Retzlaff , Andrew Rybchenko , Ivan Malov Subject: [PATCH v4 3/6] net/sfc: fix non-constant expression in RTE_BUILD_BUG_ON() Date: Wed, 17 Jan 2024 10:19:57 -0800 Message-ID: <20240117182541.211125-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240117182541.211125-1-stephen@networkplumber.org> References: <20231111172153.57461-1-stephen@networkplumber.org> <20240117182541.211125-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The macro RTE_MIN has some hidden assignments to provide type safety which means the statement can not be fully evaluated in first pass of compiler. Replace RTE_MIN() with equivalent macro. Fixes: 4f936666d790 ("net/sfc: support TSO for EF100 native datapath") Cc: ivan.malov@oktetlabs.ru Signed-off-by: Stephen Hemminger Acked-by: Tyler Retzlaff --- drivers/net/sfc/sfc_ef100_tx.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/sfc/sfc_ef100_tx.c b/drivers/net/sfc/sfc_ef100_tx.c index 1b6374775f07..c49d004113d3 100644 --- a/drivers/net/sfc/sfc_ef100_tx.c +++ b/drivers/net/sfc/sfc_ef100_tx.c @@ -26,7 +26,6 @@ #include "sfc_ef100.h" #include "sfc_nic_dma_dp.h" - #define sfc_ef100_tx_err(_txq, ...) \ SFC_DP_LOG(SFC_KVARG_DATAPATH_EF100, ERR, &(_txq)->dp.dpq, __VA_ARGS__) @@ -563,8 +562,7 @@ sfc_ef100_tx_pkt_descs_max(const struct rte_mbuf *m) * (split into many Tx descriptors). */ RTE_BUILD_BUG_ON(SFC_EF100_TX_SEND_DESC_LEN_MAX < - RTE_MIN((unsigned int)EFX_MAC_PDU_MAX, - SFC_MBUF_SEG_LEN_MAX)); + RTE_MIN_T(EFX_MAC_PDU_MAX, SFC_MBUF_SEG_LEN_MAX, uint32_t)); } if (m->ol_flags & sfc_dp_mport_override) { -- 2.43.0