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 A2C5B438F4; Thu, 18 Jan 2024 17:53:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8777042E15; Thu, 18 Jan 2024 17:53:31 +0100 (CET) Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) by mails.dpdk.org (Postfix) with ESMTP id EDFCC427E2 for ; Thu, 18 Jan 2024 17:53:28 +0100 (CET) Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-1d711d7a940so4820815ad.1 for ; Thu, 18 Jan 2024 08:53:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1705596808; x=1706201608; 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=VwCXuD6LL5CZfaCkCqMGq4B76F8YIPv+C70B4dSaH7A=; b=WMkewp4OrfV8SNBhcamNw8s6U9tn/TxhRmr9wqzn3Qhp63BN5xVGvOwsXho4Ec643x nIZtoPx0UnMpC0wm+PUl8sHUXCt3XyOwtskIEIsQJWYCU/1chUYwenOdM2frUUFJvZqY GoiCvo0MYUAiEPRmZ9jhSU6Booa9P1OkC1Y75gM10WbzK/i7NwYTVSUqExVIzTH/VWQA +Y9dF4yLvevuAqgrTIB7oZBwLLt+jAP6CsAhobTg3gWp8K81jS8GdZFEhTOWA58fNs+u WPE5inBSNPDlNg3/zmZFHP5t45bsyMWSO//qZc1PcgqGOa5IZpamxT1Sr9brSfSTXeUc ZFIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705596808; x=1706201608; 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=VwCXuD6LL5CZfaCkCqMGq4B76F8YIPv+C70B4dSaH7A=; b=wxQyDKuynEUwSSN1kx1h4OREDONlyQZVSNSeReycGqMtS6eL8nBV0+JMAA00BPKEnJ mZHJUl9sc+buZoyxR2GEwhPdtPwLTJmfXTx/sMFqHZN1rkuO9FqXhtb+hxM4LoZwv2tW IOo/XJUNe8dXbXazZJKcElFoZ8VTIj/spYlgMX0TnD+BpCJVS8lmsqxl03QRrjdVw3WA 0b9OFV2TfIpQ5kA6ewCK1HuwM1sUD8qNYviVa8c6pNcIc/IIWqhHBLQtZg+/lWzGaXMJ 8wsosKlSZDTfu86XsuC9COCzzWa0li8CMIax2KYv3Fcpd241ZNzzC4I3j2rYSw5MSF1K f+yQ== X-Gm-Message-State: AOJu0YyN+cPEunbhdKgeCWKKdA8SEo6DKOPBsZw1AeJDIa4UMh5S9C8s FleFZ/0tonSluaoA7LxkkfNllzaCLDdFsf0bPQJShvV1jQvNMnqEcn7d+4DhspXx8K75aIJq8i6 eq5I= X-Google-Smtp-Source: AGHT+IGYFuXvqA6Zbm+Vl0Xf+GBTOubuhdhuEO7/UFnmjlPYYA0OddjvaJIOGnv7ClGj8r0L3AAZXA== X-Received: by 2002:a17:902:dacc:b0:1d4:69a5:edbb with SMTP id q12-20020a170902dacc00b001d469a5edbbmr1249518plx.48.1705596808252; Thu, 18 Jan 2024 08:53:28 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id u2-20020a170903304200b001d706912d1esm1427980pla.225.2024.01.18.08.53.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 08:53:27 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Tyler Retzlaff , Andrew Rybchenko , Ivan Malov Subject: [PATCH v5 3/6] net/sfc: fix non-constant expression in RTE_BUILD_BUG_ON() Date: Thu, 18 Jan 2024 08:50:58 -0800 Message-ID: <20240118165315.63959-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240118165315.63959-1-stephen@networkplumber.org> References: <20231111172153.57461-1-stephen@networkplumber.org> <20240118165315.63959-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") Signed-off-by: Stephen Hemminger Acked-by: Tyler Retzlaff Reviewed-by: Andrew Rybchenko --- drivers/net/sfc/sfc_ef100_tx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/sfc/sfc_ef100_tx.c b/drivers/net/sfc/sfc_ef100_tx.c index 1b6374775f07..c88ab964547e 100644 --- a/drivers/net/sfc/sfc_ef100_tx.c +++ b/drivers/net/sfc/sfc_ef100_tx.c @@ -563,8 +563,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