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 E8F8148A9D; Fri, 7 Nov 2025 16:51:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0C7D74069F; Fri, 7 Nov 2025 16:51:05 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by mails.dpdk.org (Postfix) with ESMTP id 21DB240696; Fri, 7 Nov 2025 16:51:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1762530663; x=1794066663; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Y1dL3iiKSpSB+vUlxN0fMaUKxW6+KK9GzedXA+IN190=; b=SHemx8b59NlV+UDtlaCIVSzxMro5GKm547IuJgiGhbRhNfri4G0wI6wQ zOfaAW2gvzGITyrIHg+BLZrcpUYyzgGk/HUv1ba/ZCOtBI8ZiTTveg0K4 aJQ9gNjz20ftctiHYHLgT8vE9bvQLjjQPYlSV/8sHG34c+H4keAirbe4d BQV23BUG3EWEjdNQP6Bzx5RcMD2x+tT7Tvkai1Q6hPAdn3xL72XPcrcRL +y6VVBmOPptDjTGQRmwqu6Qd2rGw8aVbpf06IF6sXWcA+tQTRddUHJiAp Zfr6VkxCKTS4CCedJfs/C1UjJfvdxI6YhmOJ2m295aegk46j/Hed0qMj+ g==; X-CSE-ConnectionGUID: zVTxGSL4QkyF/h63MOHlpw== X-CSE-MsgGUID: dtV1pdZVTP6Fwbrmzt+c6Q== X-IronPort-AV: E=McAfee;i="6800,10657,11606"; a="90151831" X-IronPort-AV: E=Sophos;i="6.19,287,1754982000"; d="scan'208";a="90151831" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Nov 2025 07:51:02 -0800 X-CSE-ConnectionGUID: 1I4K+KjBT0GVxWBNGFUnwA== X-CSE-MsgGUID: oxhuXygTQEOe2fqKuz5PuA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.19,287,1754982000"; d="scan'208";a="187321644" Received: from silpixa00401385.ir.intel.com ([10.20.224.226]) by orviesa006.jf.intel.com with ESMTP; 07 Nov 2025 07:51:01 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , stable@dpdk.org, Konstantin Ananyev , Jasvinder Singh , David Coyle , Mairtin o Loingsigh , Pablo de Lara Subject: [RFC PATCH v2 05/33] net: remove shadowed variable Date: Fri, 7 Nov 2025 15:50:01 +0000 Message-ID: <20251107155034.436809-6-bruce.richardson@intel.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20251107155034.436809-1-bruce.richardson@intel.com> References: <20251106140948.2894678-1-bruce.richardson@intel.com> <20251107155034.436809-1-bruce.richardson@intel.com> 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 "mask" local variable shadowed a global definition. The local var was only used on two lines as a temporary value to pass the return value of one function as a parameter to another. Therefore, we can remove the shadowing issue by removing the variable. Fixes: 17a937baed3e ("net: add CRC AVX512 implementation") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson --- lib/net/net_crc_avx512.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/net/net_crc_avx512.c b/lib/net/net_crc_avx512.c index d18eb96971..7cd681b1cd 100644 --- a/lib/net/net_crc_avx512.c +++ b/lib/net/net_crc_avx512.c @@ -180,7 +180,6 @@ crc32_eth_calc_vpclmulqdq(const uint8_t *data, uint32_t data_len, uint32_t crc, __m512i temp, k; __m512i qw0 = _mm512_set1_epi64(0), qw1, qw2, qw3; __m512i fold0, fold1, fold2, fold3; - __mmask16 mask; uint32_t n = 0; int reduction = 0; @@ -260,8 +259,7 @@ crc32_eth_calc_vpclmulqdq(const uint8_t *data, uint32_t data_len, uint32_t crc, res = _mm_xor_si128(res, d); } else { res = _mm_cvtsi32_si128(crc); - mask = byte_len_to_mask_table[data_len]; - d = _mm_maskz_loadu_epi8(mask, data); + d = _mm_maskz_loadu_epi8(byte_len_to_mask_table[data_len], data); res = _mm_xor_si128(res, d); if (data_len > 3) { -- 2.48.1