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 5DB9545D5D for ; Thu, 21 Nov 2024 00:43:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 57BE640296; Thu, 21 Nov 2024 00:43:25 +0100 (CET) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mails.dpdk.org (Postfix) with ESMTP id B467440296 for ; Thu, 21 Nov 2024 00:43:23 +0100 (CET) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4314fa33a35so2173235e9.1 for ; Wed, 20 Nov 2024 15:43:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732146203; x=1732751003; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Dc4hbwgx06x1rod4Vs2YVPEcB2+JXrU1iQBsiYAXXtQ=; b=RL6zyTtKlLalByDz45EZf6Kzoe8CqWWeXYlLIl/FtjGPtznBAITQAyg3P/0MlaxbB3 M0ZSuqvFl30Hh/72k3GAFMY3EhchCDGOA5nOc+3k7dXgls4QlBSoQdKtl8yEU1Puqcix nYTBc/DHsUiC1yghRylkLukKPAFz+5J2RaflbK2Tk1MXOYWL4Q35lTzwsuno8dqpHVzN nqR8opciJVlOAsMvbRDc6txsenQH6mKI4IEqTQSwasTAo+aqQjP8oAw2LgHBtFuDeH4C HExjojAoKxAk5xcqOPsF2w/qvbjkiat+U9kTI9+C7f0v0Kni6Lryg2RqXtxzP+XEnJ02 z7kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732146203; x=1732751003; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Dc4hbwgx06x1rod4Vs2YVPEcB2+JXrU1iQBsiYAXXtQ=; b=H3p/3lgKH2NVVm3+PcJ84yiSFE+9hsBVlsdbsyAqAmiLkY+/642G3TCU2bMlO33jSN Zh1AiIFZNPGo+904SXHlKY0VmOBXLMrIx190QW0teZCIE7yByfsW1s6Ar3X1l5Q5GoU/ 4A3keIXJ+H5Vgc3IJCH9yeRokgm44OG8dite/SDp1rVuxWcsTM3sfBUXBtz5OEYRpdYV UZyPPPQO5/LEMYc9YFLRq4vOLkUHTu52uIrZbex2wOX4Kb0JVRY5cx0rRLx/oZLgJeQV jEKxtbjkan219262EXZyNkHh2n5h9rS+HvyWcTY+KdEGmeTy7Rd1RKaNRJpImem8iioG 2pDg== X-Forwarded-Encrypted: i=1; AJvYcCXmFjQxO7e0h5pDxJxJDNXKp9Vg80ZvO2W5SIvGFrq+j+Zv0qbFix7zgojpny9XmNceLvM6rHg=@dpdk.org X-Gm-Message-State: AOJu0Yyt5WetAqyLSZMlDcXmpxw4P+rVXcJ7HvZHRZWO2gXwhrTz64jX M5PvcY+H1lg6m21dDGePR8/++q7gRGe8CdEviwRHkS7aBFutzEtwKrMI7lqK X-Google-Smtp-Source: AGHT+IGmCM2MwvOX0hpzayW8ldMvwV1ry6lLyPTRw9P+L8dpJ7pXfg3FecLK4Zr6CnIw8mL8OmciDA== X-Received: by 2002:a05:600c:3b83:b0:42c:a89e:b0e6 with SMTP id 5b1f17b1804b1-433489b3146mr39672375e9.11.1732146203276; Wed, 20 Nov 2024 15:43:23 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:21cd:def0:a01d:d2aa]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3825490c86asm3316788f8f.37.2024.11.20.15.43.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2024 15:43:22 -0800 (PST) From: luca.boccassi@gmail.com 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 22.11.7 Date: Wed, 20 Nov 2024 23:41:41 +0000 Message-ID: <20241120234215.233355-16-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241120234215.233355-1-luca.boccassi@gmail.com> References: <20241112220754.666489-40-luca.boccassi@gmail.com> <20241120234215.233355-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 22.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 11/22/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/da5d3d9ce9ac28f11347c540357bb2149d0d65cc Thanks. Luca Boccassi --- >From da5d3d9ce9ac28f11347c540357bb2149d0d65cc 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 @@ -1201,9 +1201,9 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, rxq_cq_to_ptype_oflags_v(rxq, cqes, opcode, &pkts[pos]); 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) { int offset = rxq->timestamp_offset; @@ -1247,17 +1247,17 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, metadata; 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; pkts[pos + 3]->ol_flags |= metadata ? flag : 0ULL; 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 @@ -800,13 +800,13 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, rxq_cq_to_ptype_oflags_v(rxq, ptype_info, flow_tag, 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; } if (unlikely(rxq->hw_timestamp)) { @@ -818,34 +818,34 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, ts = rte_be_to_cpu_64 (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 @@ -741,9 +741,9 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, rxq_cq_to_ptype_oflags_v(rxq, cqes, opcode, &pkts[pos]); 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)) { int offset = rxq->timestamp_offset; -- 2.45.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-20 23:41:23.274474179 +0000 +++ 0016-net-mlx5-fix-shared-queue-port-number-in-vector-Rx.patch 2024-11-20 23:41:22.716195467 +0000 @@ -1 +1 @@ -From 3638f431b9ff39003e31c3a761d407e04b25576a Mon Sep 17 00:00:00 2001 +From da5d3d9ce9ac28f11347c540357bb2149d0d65cc 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 @@ -@@ -1251,9 +1251,9 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, +@@ -1201,9 +1201,9 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, @@ -37 +38 @@ -@@ -1297,17 +1297,17 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, +@@ -1247,17 +1247,17 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, @@ -59 +60 @@ -index 0ce9827ed9..519fff5b2c 100644 +index 6d3c594e56..113c12f48c 100644 @@ -62 +63 @@ -@@ -837,13 +837,13 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, +@@ -800,13 +800,13 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, @@ -80 +81 @@ -@@ -855,34 +855,34 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, +@@ -818,34 +818,34 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, @@ -124 +125 @@ -index e71d6c303f..0a2b67e750 100644 +index ab69af0c55..ccd1b4ff84 100644 @@ -127 +128 @@ -@@ -785,9 +785,9 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq, +@@ -741,9 +741,9 @@ rxq_cq_process_v(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cq,