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 5910F43829 for ; Fri, 8 Mar 2024 15:32:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5022F42F0D; Fri, 8 Mar 2024 15:32:02 +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 B58E440E2D for ; Fri, 8 Mar 2024 15:32:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709908320; 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=+0QGWqtD9Z0Ts4v3CyGqsbMtn+pJpWwTnGq63IPGPf8=; b=XO0fgU0Abu/J9Z5vfGiEZ353/SwLDt0tLS/c+rAiClJ6lUNvchHrnMbocAHP0NU9AT5bZ1 Bm7YdFhR9BdNHvF7Nd7W340k32hgNPIthDApllhL7uI3JQ6I8uMW2ayHzosJ/MxmB1v6e4 tNvDw+9R9zdxt5nWidQLY7mveYyxf/Y= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-235-woClSkpCNaClZ86I96pGOQ-1; Fri, 08 Mar 2024 09:31:58 -0500 X-MC-Unique: woClSkpCNaClZ86I96pGOQ-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 E37A084B163; Fri, 8 Mar 2024 14:31:57 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.194.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id 781AC36FF; Fri, 8 Mar 2024 14:31:52 +0000 (UTC) From: Kevin Traynor To: Bruce Richardson Cc: Anatoly Burakov , dpdk stable Subject: patch 'net/ice: remove incorrect 16B descriptor read block' has been queued to stable release 21.11.7 Date: Fri, 8 Mar 2024 14:28:05 +0000 Message-ID: <20240308142824.528417-17-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/d8f8df9c46885aa4ad365280fee51d6ff33dcc76 Thanks. Kevin --- >From d8f8df9c46885aa4ad365280fee51d6ff33dcc76 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Tue, 23 Jan 2024 11:40:52 +0000 Subject: [PATCH] net/ice: remove incorrect 16B descriptor read block [ upstream commit 9aee908eddeb6e8f3de402ac5661bca5161809a6 ] 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: ae60d3c9b227 ("net/ice: support Rx AVX2 vector") Signed-off-by: Bruce Richardson Acked-by: Anatoly Burakov --- drivers/net/ice/ice_rxtx_vec_avx2.c | 78 +++++++++-------------------- 1 file changed, 23 insertions(+), 55 deletions(-) diff --git a/drivers/net/ice/ice_rxtx_vec_avx2.c b/drivers/net/ice/ice_rxtx_vec_avx2.c index 31d6af42fd..5d591f9834 100644 --- a/drivers/net/ice/ice_rxtx_vec_avx2.c +++ b/drivers/net/ice/ice_rxtx_vec_avx2.c @@ -255,60 +255,28 @@ _ice_recv_raw_pkts_vec_avx2(struct ice_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_ICE_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 - { - 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); - } + 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.550916916 +0000 +++ 0017-net-ice-remove-incorrect-16B-descriptor-read-block.patch 2024-03-08 13:47:49.014686651 +0000 @@ -1 +1 @@ -From 9aee908eddeb6e8f3de402ac5661bca5161809a6 Mon Sep 17 00:00:00 2001 +From d8f8df9c46885aa4ad365280fee51d6ff33dcc76 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 9aee908eddeb6e8f3de402ac5661bca5161809a6 ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -24 +25 @@ -index 6f6d790967..d6e88dbb29 100644 +index 31d6af42fd..5d591f9834 100644