From nobody Sun Feb 8 08:22:40 2026 Received: from mailtransmit04.runbox.com (mailtransmit04.runbox.com [185.226.149.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F071B4DB546; Wed, 21 Jan 2026 14:58:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.226.149.37 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769007500; cv=none; b=hk/W7nw4TTeHlqO8WTY0POcud7n1oIkpJJuNi+ATwErOGB6FLYVCEeLkUqlXGc97Djnx+wU8Q8TDjxTY4vCA3+Yp6+nQjiWQJm5/sAU5DsXVHCQkWwAxvl8QLxd6zJwxQx+aMTFsasER8HirBYt9C9Toba8MpUojxq9Btl/nMuA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769007500; c=relaxed/simple; bh=0GrGhWbwswqou6wzlsc9dE/G/veSAbRQW0iD5Ve4Dls=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Fys2fb8hCmZco7SAcAWe0v9hd+opNfULS84y+LGnzZOYYW3v4OwhaXTcNGgm9JeuM+PPPVfR8d7q6xjTSIjACm2FZN8/YRQUgLhfeC+3L+A2n9VIARjfY/f71TPsJh4fH0Jft8a4gJ/T/tIRtIvD/GCQy0zSmGd6OZgTvAJh8vw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=runbox.com; dkim=pass (2048-bit key) header.d=runbox.com header.i=@runbox.com header.b=HeFJaC1m; arc=none smtp.client-ip=185.226.149.37 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=runbox.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=runbox.com header.i=@runbox.com header.b="HeFJaC1m" Received: from mailtransmit02.runbox ([10.9.9.162] helo=aibo.runbox.com) by mailtransmit04.runbox.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1viZes-008XEu-IO; Wed, 21 Jan 2026 15:58:10 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=selector2; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To :Message-Id:Date:Subject:Cc:To:From; bh=eNMRSz5L8fgL8ctUrXiNlrxD38QSSH4gIK6f6XdjByE=; b=HeFJaC1mdaOqO1JFtCyHaDqb+o AYbWVZoW4TkLPEY6c7eJ5zI0XROXccqy7RUoBXtNgEihN/3n3OME26NmwnJOISA1MophY0qHodcRs sRMMMr8/9oE94ctgx35jyRY+HVHmjHGefqARHNdLoT2XoYD0AKtjnrq8oHUVENSDbfzd+l7udyn/r kQrIxELHzkwwbh1Q8jNeS9XGONZUP76CWdNavaltvVSuWHgewUiXCScsctVEk+PGKMb/DIXH3olBd r5ffBQZhia625IXmRCUdzJ3lSVKxvROrC+GOiErca0omVSy1EL73FZzFreX/t3F5/GlqqVPL63Pqr 9ZgCLz+A==; Received: from [10.9.9.72] (helo=submission01.runbox) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1viZes-0001sg-6G; Wed, 21 Jan 2026 15:58:10 +0100 Received: by submission01.runbox with esmtpsa [Authenticated ID (1493616)] (TLS1.2:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) id 1viZeV-00GH6h-40; Wed, 21 Jan 2026 15:57:47 +0100 From: david.laight.linux@gmail.com To: Nathan Chancellor , Greg Kroah-Hartman , Thomas Gleixner , Peter Zijlstra , Ingo Molnar , Mathieu Desnoyers , Arnd Bergmann , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Yury Norov , Lucas De Marchi , Jani Nikula , Vincent Mailhol , Andy Shevchenko , Kees Cook , Andrew Morton , Tony Nguyen , Przemek Kitszel , "David S. Miller" , Eric Dumazet , Jakub Kicinski , netdev@vger.kernel.org Cc: David Laight Subject: [PATCH next 05/14] ixgbevf: Use C test for PAGE_SIZE > IXGBE_MAX_DATA_PER_TXD Date: Wed, 21 Jan 2026 14:57:22 +0000 Message-Id: <20260121145731.3623-6-david.laight.linux@gmail.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20260121145731.3623-1-david.laight.linux@gmail.com> References: <20260121145731.3623-1-david.laight.linux@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: David Laight Compile-time tests being added to BIT() make it an 'integer constant expression' rather than a pre-processor expression for W=3D1 builds. This means BIT() can't be used in pre-processor conditional that checks 'PAGE_SIZE > IXGBE_MAX_DATA_PER_TXD'. Change to use a normal 'if' statement, the compiler will optimise away the unwanted code. Signed-off-by: David Laight Reviewed-by: Simon Horman --- .../net/ethernet/intel/ixgbevf/ixgbevf_main.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/ne= t/ethernet/intel/ixgbevf/ixgbevf_main.c index d5ce20f47def..65dd5834d0cf 100644 --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c @@ -4166,9 +4166,6 @@ static int ixgbevf_xmit_frame_ring(struct sk_buff *sk= b, u32 tx_flags =3D 0; u16 count =3D TXD_USE_COUNT(skb_headlen(skb)); struct ixgbevf_ipsec_tx_data ipsec_tx =3D { 0 }; -#if PAGE_SIZE > IXGBE_MAX_DATA_PER_TXD - unsigned short f; -#endif u8 hdr_len =3D 0; u8 *dst_mac =3D skb_header_pointer(skb, 0, 0, NULL); =20 @@ -4183,15 +4180,15 @@ static int ixgbevf_xmit_frame_ring(struct sk_buff *= skb, * + 1 desc for context descriptor, * otherwise try next time */ -#if PAGE_SIZE > IXGBE_MAX_DATA_PER_TXD - for (f =3D 0; f < skb_shinfo(skb)->nr_frags; f++) { - skb_frag_t *frag =3D &skb_shinfo(skb)->frags[f]; + if (PAGE_SIZE > IXGBE_MAX_DATA_PER_TXD) { + for (unsigned int f =3D 0; f < skb_shinfo(skb)->nr_frags; f++) { + skb_frag_t *frag =3D &skb_shinfo(skb)->frags[f]; =20 - count +=3D TXD_USE_COUNT(skb_frag_size(frag)); + count +=3D TXD_USE_COUNT(skb_frag_size(frag)); + } + } else { + count +=3D skb_shinfo(skb)->nr_frags; } -#else - count +=3D skb_shinfo(skb)->nr_frags; -#endif if (ixgbevf_maybe_stop_tx(tx_ring, count + 3)) { tx_ring->tx_stats.tx_busy++; return NETDEV_TX_BUSY; --=20 2.39.5