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 39AF845DB9 for ; Wed, 27 Nov 2024 18:23:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 35FC940B97; Wed, 27 Nov 2024 18:23:18 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id F1A2C40A6F for ; Wed, 27 Nov 2024 18:23:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732728196; 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=7GndcRX01vKuXAir/F6bq1m4+R87Haw48/Y6TYJonJk=; b=JidE+E1/EYd2magWFHkxenB7y4HESWbXratSgSpT0oahrFPvZcHm+SxcyhWr9e3ujXu5Fc OZXGdd/ggsqFnGRr98NMbLa86bVvSKYN/mFFRYa1Saccri9vy2tJOW8nEQQGp+YE8ApEsd dZMFDo+hrrOGl2XCBPqlN+witG+BrLQ= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-362-vMi-v6eJNfO45PxeiKmJ3Q-1; Wed, 27 Nov 2024 12:23:15 -0500 X-MC-Unique: vMi-v6eJNfO45PxeiKmJ3Q-1 X-Mimecast-MFC-AGG-ID: vMi-v6eJNfO45PxeiKmJ3Q Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0AFDD19540F2; Wed, 27 Nov 2024 17:23:14 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.52]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C10593003B71; Wed, 27 Nov 2024 17:23:12 +0000 (UTC) From: Kevin Traynor To: Alexander Kozyrev Cc: Viacheslav Ovsiienko , dpdk stable Subject: patch 'net/mlx5: fix shared queue port number in vector Rx' has been queued to stable release 21.11.9 Date: Wed, 27 Nov 2024 17:18:55 +0000 Message-ID: <20241127171916.690404-108-ktraynor@redhat.com> In-Reply-To: <20241127171916.690404-1-ktraynor@redhat.com> References: <20241127171916.690404-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: YuVlU61kufZ6tG9WYBt-Fb2QFm9hT4DvAhQ8OxXkoQc_1732728194 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.9 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 12/02/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/6c40ffa5fd13f0dc4db5e2c64a9d8522417c87d3 Thanks. Kevin --- >From 6c40ffa5fd13f0dc4db5e2c64a9d8522417c87d3 Mon Sep 17 00:00:00 2001 From: Alexander Kozyrev Date: Mon, 28 Oct 2024 19:53:54 +0200 Subject: [PATCH] net/mlx5: fix shared queue port number in vector Rx [ upstream commit 3638f431b9ff39003e31c3a761d407e04b25576a ] Wrong CQE is used to get the shared Rx queue port number in vectorized Rx burst routine. Fix the CQE indexing. Fixes: 25ed2ebff131 ("net/mlx5: support shared Rx queue port data path") Signed-off-by: Alexander Kozyrev Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_rxtx_vec_altivec.h | 12 ++++++------ drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 24 ++++++++++++------------ drivers/net/mlx5/mlx5_rxtx_vec_sse.h | 6 +++--- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h index 204d17a8f2..2cc8fc19f9 100644 --- a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h +++ b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h @@ -1202,7 +1202,7 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, if (unlikely(rxq->shared)) { pkts[pos]->port = cq[pos].user_index_low; - pkts[pos + p1]->port = cq[pos + p1].user_index_low; - pkts[pos + p2]->port = cq[pos + p2].user_index_low; - pkts[pos + p3]->port = cq[pos + p3].user_index_low; + pkts[pos + 1]->port = cq[pos + p1].user_index_low; + pkts[pos + 2]->port = cq[pos + p2].user_index_low; + pkts[pos + 3]->port = cq[pos + p3].user_index_low; } if (rxq->hw_timestamp) { @@ -1248,15 +1248,15 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, pkts[pos]->ol_flags |= metadata ? flag : 0ULL; metadata = rte_be_to_cpu_32 - (cq[pos + 1].flow_table_metadata) & mask; + (cq[pos + p1].flow_table_metadata) & mask; *RTE_MBUF_DYNFIELD(pkts[pos + 1], offs, uint32_t *) = metadata; pkts[pos + 1]->ol_flags |= metadata ? flag : 0ULL; metadata = rte_be_to_cpu_32 - (cq[pos + 2].flow_table_metadata) & mask; + (cq[pos + p2].flow_table_metadata) & mask; *RTE_MBUF_DYNFIELD(pkts[pos + 2], offs, uint32_t *) = metadata; pkts[pos + 2]->ol_flags |= metadata ? flag : 0ULL; metadata = rte_be_to_cpu_32 - (cq[pos + 3].flow_table_metadata) & mask; + (cq[pos + p3].flow_table_metadata) & mask; *RTE_MBUF_DYNFIELD(pkts[pos + 3], offs, uint32_t *) = metadata; diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h index 6d3c594e56..113c12f48c 100644 --- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h +++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h @@ -801,11 +801,11 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, opcode, &elts[pos]); if (unlikely(rxq->shared)) { - elts[pos]->port = container_of(p0, struct mlx5_cqe, + pkts[pos]->port = container_of(p0, struct mlx5_cqe, pkt_info)->user_index_low; - elts[pos + 1]->port = container_of(p1, struct mlx5_cqe, + pkts[pos + 1]->port = container_of(p1, struct mlx5_cqe, pkt_info)->user_index_low; - elts[pos + 2]->port = container_of(p2, struct mlx5_cqe, + pkts[pos + 2]->port = container_of(p2, struct mlx5_cqe, pkt_info)->user_index_low; - elts[pos + 3]->port = container_of(p3, struct mlx5_cqe, + pkts[pos + 3]->port = container_of(p3, struct mlx5_cqe, pkt_info)->user_index_low; } @@ -819,32 +819,32 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, (container_of(p0, struct mlx5_cqe, pkt_info)->timestamp); - mlx5_timestamp_set(elts[pos], offset, + mlx5_timestamp_set(pkts[pos], offset, mlx5_txpp_convert_rx_ts(sh, ts)); ts = rte_be_to_cpu_64 (container_of(p1, struct mlx5_cqe, pkt_info)->timestamp); - mlx5_timestamp_set(elts[pos + 1], offset, + mlx5_timestamp_set(pkts[pos + 1], offset, mlx5_txpp_convert_rx_ts(sh, ts)); ts = rte_be_to_cpu_64 (container_of(p2, struct mlx5_cqe, pkt_info)->timestamp); - mlx5_timestamp_set(elts[pos + 2], offset, + mlx5_timestamp_set(pkts[pos + 2], offset, mlx5_txpp_convert_rx_ts(sh, ts)); ts = rte_be_to_cpu_64 (container_of(p3, struct mlx5_cqe, pkt_info)->timestamp); - mlx5_timestamp_set(elts[pos + 3], offset, + mlx5_timestamp_set(pkts[pos + 3], offset, mlx5_txpp_convert_rx_ts(sh, ts)); } else { - mlx5_timestamp_set(elts[pos], offset, + mlx5_timestamp_set(pkts[pos], offset, rte_be_to_cpu_64(container_of(p0, struct mlx5_cqe, pkt_info)->timestamp)); - mlx5_timestamp_set(elts[pos + 1], offset, + mlx5_timestamp_set(pkts[pos + 1], offset, rte_be_to_cpu_64(container_of(p1, struct mlx5_cqe, pkt_info)->timestamp)); - mlx5_timestamp_set(elts[pos + 2], offset, + mlx5_timestamp_set(pkts[pos + 2], offset, rte_be_to_cpu_64(container_of(p2, struct mlx5_cqe, pkt_info)->timestamp)); - mlx5_timestamp_set(elts[pos + 3], offset, + mlx5_timestamp_set(pkts[pos + 3], offset, rte_be_to_cpu_64(container_of(p3, struct mlx5_cqe, pkt_info)->timestamp)); diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h index ab69af0c55..ccd1b4ff84 100644 --- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h +++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h @@ -742,7 +742,7 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, if (unlikely(rxq->shared)) { pkts[pos]->port = cq[pos].user_index_low; - pkts[pos + p1]->port = cq[pos + p1].user_index_low; - pkts[pos + p2]->port = cq[pos + p2].user_index_low; - pkts[pos + p3]->port = cq[pos + p3].user_index_low; + pkts[pos + 1]->port = cq[pos + p1].user_index_low; + pkts[pos + 2]->port = cq[pos + p2].user_index_low; + pkts[pos + 3]->port = cq[pos + p3].user_index_low; } if (unlikely(rxq->hw_timestamp)) { -- 2.47.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-27 17:17:41.661927197 +0000 +++ 0108-net-mlx5-fix-shared-queue-port-number-in-vector-Rx.patch 2024-11-27 17:17:38.333269933 +0000 @@ -1 +1 @@ -From 3638f431b9ff39003e31c3a761d407e04b25576a Mon Sep 17 00:00:00 2001 +From 6c40ffa5fd13f0dc4db5e2c64a9d8522417c87d3 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 3638f431b9ff39003e31c3a761d407e04b25576a ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -21 +22 @@ -index b2bbc4ba17..ca614ecf9d 100644 +index 204d17a8f2..2cc8fc19f9 100644 @@ -24 +25 @@ -@@ -1252,7 +1252,7 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, +@@ -1202,7 +1202,7 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, @@ -35 +36 @@ -@@ -1298,15 +1298,15 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, +@@ -1248,15 +1248,15 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, @@ -55 +56 @@ -index 0ce9827ed9..519fff5b2c 100644 +index 6d3c594e56..113c12f48c 100644 @@ -58 +59 @@ -@@ -838,11 +838,11 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, +@@ -801,11 +801,11 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, @@ -74 +75 @@ -@@ -856,32 +856,32 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, +@@ -819,32 +819,32 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, @@ -116 +117 @@ -index e71d6c303f..0a2b67e750 100644 +index ab69af0c55..ccd1b4ff84 100644 @@ -119 +120 @@ -@@ -786,7 +786,7 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, +@@ -742,7 +742,7 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,