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 224F343829 for ; Fri, 8 Mar 2024 15:31:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C15D42FA7; Fri, 8 Mar 2024 15:31:54 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 1064042F0D for ; Fri, 8 Mar 2024 15:31:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709908311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=44BREgcaqPrE+S4dJy5NSgtdXU2AgPl8Wqkpg4ihLwg=; b=Sg0MthMLOjWSxPSA6hSZyVpVmIxCrJgClVcoQRSNHDzPVxY79TwWiH/egKLcDNZoonFdcP fmQSWQH7xoyCJPL+kpT/P8mZgN4G+BMGP5lQUZXjSWQUqINd031dlmnaEZLHkTmzhEv0DF 4xMFkv2rXE1PeqmpRYvOMOnYm8bsjF8= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-433-7e3iwwhSOP2rkIpfKe552Q-1; Fri, 08 Mar 2024 09:31:49 -0500 X-MC-Unique: 7e3iwwhSOP2rkIpfKe552Q-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 46A203801F54; Fri, 8 Mar 2024 14:31:48 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.194.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id A79DB37F6; Fri, 8 Mar 2024 14:31:38 +0000 (UTC) From: Kevin Traynor To: Bruce Richardson Cc: Anatoly Burakov , dpdk stable Subject: patch 'net/i40e: remove incorrect 16B descriptor read block' has been queued to stable release 21.11.7 Date: Fri, 8 Mar 2024 14:28:03 +0000 Message-ID: <20240308142824.528417-15-ktraynor@redhat.com> In-Reply-To: <20240308142824.528417-1-ktraynor@redhat.com> References: <20240308142824.528417-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 21.11.7 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/13/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/007b1f1ad70f839e4f6fc75d6d366856b9fc5e01 Thanks. Kevin --- >From 007b1f1ad70f839e4f6fc75d6d366856b9fc5e01 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Tue, 23 Jan 2024 11:40:48 +0000 Subject: [PATCH] net/i40e: remove incorrect 16B descriptor read block [ upstream commit b527d9585d9cd0446d6bfa39d3a8e896c87883e5 ] By default, the driver works with 32B descriptors, but has a separate descriptor read block for reading two descriptors at a time when using 16B descriptors. However, the 32B reads used are not guaranteed to be atomic, which will cause issues if that is not the case on a system, since the descriptors may be read in an undefined order. Remove the block, to avoid issues, and just use the regular descriptor reading path for 16B descriptors, if that support is enabled at build time. Fixes: dafadd73762e ("net/i40e: add AVX2 Rx function") Signed-off-by: Bruce Richardson Acked-by: Anatoly Burakov --- drivers/net/i40e/i40e_rxtx_vec_avx2.c | 62 ++++++++++----------------- 1 file changed, 23 insertions(+), 39 deletions(-) diff --git a/drivers/net/i40e/i40e_rxtx_vec_avx2.c b/drivers/net/i40e/i40e_rxtx_vec_avx2.c index c73b2a321b..4e94ccbdd6 100644 --- a/drivers/net/i40e/i40e_rxtx_vec_avx2.c +++ b/drivers/net/i40e/i40e_rxtx_vec_avx2.c @@ -277,44 +277,28 @@ _recv_raw_pkts_vec_avx2(struct i40e_rx_queue *rxq, struct rte_mbuf **rx_pkts, #endif - __m256i raw_desc0_1, raw_desc2_3, raw_desc4_5, raw_desc6_7; -#ifdef RTE_LIBRTE_I40E_16BYTE_RX_DESC - /* for AVX we need alignment otherwise loads are not atomic */ - if (avx_aligned) { - /* load in descriptors, 2 at a time, in reverse order */ - raw_desc6_7 = _mm256_load_si256((void *)(rxdp + 6)); - rte_compiler_barrier(); - raw_desc4_5 = _mm256_load_si256((void *)(rxdp + 4)); - rte_compiler_barrier(); - raw_desc2_3 = _mm256_load_si256((void *)(rxdp + 2)); - rte_compiler_barrier(); - raw_desc0_1 = _mm256_load_si256((void *)(rxdp + 0)); - } else -#endif - do { - const __m128i raw_desc7 = _mm_load_si128((void *)(rxdp + 7)); - rte_compiler_barrier(); - const __m128i raw_desc6 = _mm_load_si128((void *)(rxdp + 6)); - rte_compiler_barrier(); - const __m128i raw_desc5 = _mm_load_si128((void *)(rxdp + 5)); - rte_compiler_barrier(); - const __m128i raw_desc4 = _mm_load_si128((void *)(rxdp + 4)); - rte_compiler_barrier(); - const __m128i raw_desc3 = _mm_load_si128((void *)(rxdp + 3)); - rte_compiler_barrier(); - const __m128i raw_desc2 = _mm_load_si128((void *)(rxdp + 2)); - rte_compiler_barrier(); - const __m128i raw_desc1 = _mm_load_si128((void *)(rxdp + 1)); - rte_compiler_barrier(); - const __m128i raw_desc0 = _mm_load_si128((void *)(rxdp + 0)); + const __m128i raw_desc7 = _mm_load_si128((void *)(rxdp + 7)); + rte_compiler_barrier(); + const __m128i raw_desc6 = _mm_load_si128((void *)(rxdp + 6)); + rte_compiler_barrier(); + const __m128i raw_desc5 = _mm_load_si128((void *)(rxdp + 5)); + rte_compiler_barrier(); + const __m128i raw_desc4 = _mm_load_si128((void *)(rxdp + 4)); + rte_compiler_barrier(); + const __m128i raw_desc3 = _mm_load_si128((void *)(rxdp + 3)); + rte_compiler_barrier(); + const __m128i raw_desc2 = _mm_load_si128((void *)(rxdp + 2)); + rte_compiler_barrier(); + const __m128i raw_desc1 = _mm_load_si128((void *)(rxdp + 1)); + rte_compiler_barrier(); + const __m128i raw_desc0 = _mm_load_si128((void *)(rxdp + 0)); - raw_desc6_7 = _mm256_inserti128_si256( - _mm256_castsi128_si256(raw_desc6), raw_desc7, 1); - raw_desc4_5 = _mm256_inserti128_si256( - _mm256_castsi128_si256(raw_desc4), raw_desc5, 1); - raw_desc2_3 = _mm256_inserti128_si256( - _mm256_castsi128_si256(raw_desc2), raw_desc3, 1); - raw_desc0_1 = _mm256_inserti128_si256( - _mm256_castsi128_si256(raw_desc0), raw_desc1, 1); - } while (0); + const __m256i raw_desc6_7 = _mm256_inserti128_si256( + _mm256_castsi128_si256(raw_desc6), raw_desc7, 1); + const __m256i raw_desc4_5 = _mm256_inserti128_si256( + _mm256_castsi128_si256(raw_desc4), raw_desc5, 1); + const __m256i raw_desc2_3 = _mm256_inserti128_si256( + _mm256_castsi128_si256(raw_desc2), raw_desc3, 1); + const __m256i raw_desc0_1 = _mm256_inserti128_si256( + _mm256_castsi128_si256(raw_desc0), raw_desc1, 1); if (split_packet) { -- 2.43.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-08 13:47:49.496407070 +0000 +++ 0015-net-i40e-remove-incorrect-16B-descriptor-read-block.patch 2024-03-08 13:47:49.012686645 +0000 @@ -1 +1 @@ -From b527d9585d9cd0446d6bfa39d3a8e896c87883e5 Mon Sep 17 00:00:00 2001 +From 007b1f1ad70f839e4f6fc75d6d366856b9fc5e01 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b527d9585d9cd0446d6bfa39d3a8e896c87883e5 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index f468c1fd90..19cf0ac718 100644 +index c73b2a321b..4e94ccbdd6 100644