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 4A95945E41 for ; Sat, 7 Dec 2024 09:07:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3AC8B40281; Sat, 7 Dec 2024 09:07:53 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2072.outbound.protection.outlook.com [40.107.92.72]) by mails.dpdk.org (Postfix) with ESMTP id DD11940281 for ; Sat, 7 Dec 2024 09:07:51 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=b9ko6qXiZF3KeIJ7Mgyjq6oxhB5NOhlyDPBgYbka0j5BTpTZ9irTEzGaSVt/gQo0S40Kd4BpeZeqPQp0yqhI3JN1wtzsH6liaY0sv63J+rBEB5POR+0X3ofuHOXipOhyMzgOQDEl5Fu9UX/Zur/bSTBxCvKVj1HJ1aKpa/vIqGe12PY3ng+OHtHpPq6onf7CS8jESWkpdL0quGvSSG3ZdIv4x0MpSsUluDboTzba+SDiS7xrBLX20Lo1YXL+Yzvppzgkx9ajmflkmkRuNhHfEf5gltfTlcy8FIauQmfQS8NusbtQjU0R1hlMzjjlYqA/NJHEp8tC1qY6t618iPbiZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4MAmkIvZLPzzhm4nC54oh/t0faYHTjtOrl2s493vd6I=; b=jUIl8nGEF7dgxuLh7sdoYJtUR/KLlFZgOJgBWj1GpAO999cdpOZhCQAq3a7CryTz0az4bc4GV+Y09Hojlfx+l1c+g378/024azsvd/LqrF8eg9CZ2iHblPJQvrS6HlFGPwp+qN04m6ifq2a2uiI8pEbFmE/G9+gIIZ4NbLQPMK1y/GkBCB8w3Z9RGMGQ8kjukdhoNfP7gVCx62/K1cscTgXSp2WASce+67btjB6REW6xwNmdE/P06XbK0kzPMeBkW6LNIW4PFY5dC2afAENpG1huYmr8mlQscCa2jBuMWgoTJk5Zp/G0L5su2fXFd6TcaGdcsgp24C0zpgGQDUx2jA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4MAmkIvZLPzzhm4nC54oh/t0faYHTjtOrl2s493vd6I=; b=FAsEJ4VTjokRl/8NKw6xzcQNlgKnOD5iQP4q3UtGOXjWlMOVGG0hg00hzJLjxJbfTz3POdO1pKYgPr/dYxj8NGJ/31joXz5OoZgPxeHiQT4oVOKaFiscL4PPy5nuoEiuAY07G2MOVSm1CmqenQbnZBfaLMmNua3wrL9+UKVXM9xqkGBu8K823tZflMIHOY8stDTh7tfY8GFj3VBVpN6iSVO3ZSshBkHqqBDEC7BtXLumS64WdHMJHzAD8mILFGG7Ktz8qFLkTBoYaym8HnhZflt4alJWoMezmiY814KMJjxjEJYTypKEAN3sCPopoWhqd7SD5SHmuJ2FvqaoSUgC9A== Received: from BLAPR03CA0028.namprd03.prod.outlook.com (2603:10b6:208:32b::33) by CYYPR12MB8891.namprd12.prod.outlook.com (2603:10b6:930:c0::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.19; Sat, 7 Dec 2024 08:07:46 +0000 Received: from BL02EPF00021F68.namprd02.prod.outlook.com (2603:10b6:208:32b:cafe::1e) by BLAPR03CA0028.outlook.office365.com (2603:10b6:208:32b::33) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8230.12 via Frontend Transport; Sat, 7 Dec 2024 08:07:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BL02EPF00021F68.mail.protection.outlook.com (10.167.249.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.7 via Frontend Transport; Sat, 7 Dec 2024 08:07:46 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sat, 7 Dec 2024 00:07:27 -0800 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Sat, 7 Dec 2024 00:07:25 -0800 From: Xueming Li To: Alexander Kozyrev CC: Xueming Li , Viacheslav Ovsiienko , dpdk stable Subject: patch 'common/mlx5: fix error CQE handling for 128 bytes CQE' has been queued to stable release 23.11.3 Date: Sat, 7 Dec 2024 16:00:25 +0800 Message-ID: <20241207080055.488538-68-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241207080055.488538-1-xuemingl@nvidia.com> References: <20241111062847.216344-122-xuemingl@nvidia.com> <20241207080055.488538-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF00021F68:EE_|CYYPR12MB8891:EE_ X-MS-Office365-Filtering-Correlation-Id: f0fa757d-716f-4278-80ff-08dd16963be5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?1bA+yMPXNNIDPZ+XM3qmSXvZBbOFuaEUYggZkwUwYv0w7izqC0kHo8Q4E/Pm?= =?us-ascii?Q?xvzciT6N1wwLrhB6vRritFfGjs8afnTl03Vct8MzG4hNXAc+rFn3xCNycJVZ?= =?us-ascii?Q?Iix0ntb5bQOdVRQX+STSHBVcQmEk2WbIxpBUiDZ461ukEJLgXMU8Tg4KxhrW?= =?us-ascii?Q?Rq6hT+gb9iSrDZ4Mg0jGdX+HZOY9mDv6RVq9voAjzIv2jx+2WeylYjiGpFao?= =?us-ascii?Q?TIL+W0SBjPw05XlM+PfpRMJBpEkcaqk7RSLOpeOyD6Pq5nMNC7vK4wKX4TNQ?= =?us-ascii?Q?lBVDvW7eCp5iviTSaIKqRcROouPXsoz8yLBV4mXLgYskmxaadPiYqFwM6GKu?= =?us-ascii?Q?L3E1ITgQG498JNqNncE+QywFF/Olgn6N8xKItHCH/jxsj5t9TdXTkBC1BSGq?= =?us-ascii?Q?UjXxYVMcT6sopAdNHqapIHQgSQqueY0u2Y0sWvY0TmHF8HXou5Dw/G6VKmf5?= =?us-ascii?Q?copKz0XYsJ4UrCsY+pxXlymTHzFOIKimPMb8UJjrthCGQzf9mnG4Dulkog/V?= =?us-ascii?Q?ZykYr/bndS3f1xF7f/lhhOsvg4WQC18q7NKcuXdoF+QLZfkgtYXTmF5Ca9TP?= =?us-ascii?Q?g+CFpJNtZk3q8aNXUm0K0BC+PhYZRNUpc78DQ69JRs8/gcq3LSzjTAT1FHF7?= =?us-ascii?Q?WR/ajUOq3JwDh+GMbPcY0hCV49nAJiRZ0shTrA6Z7MGU7Pebc0GqCTXU0cHf?= =?us-ascii?Q?gUMtNzG66KHERyhQRMOU4Jshq+T5Wr0doxI+i++PA0vzUxJabvbhv25pAcLp?= =?us-ascii?Q?Ngn/wqIHjUuoB8QWFy18l/LLvvo7/n7ZquQrRi8jTz+vGe7wduu6E0AihqkH?= =?us-ascii?Q?lD6Iex8PU0NJ9pUe2mmBU9MrkEr99YXAvQcZQuKus+rfk7a47reXta5eUExv?= =?us-ascii?Q?91VxjgEo9cj/xFxVfEf/JFVomnXFiBpPRMjeGOAsP/iLjGNMOMQnMJYw43Z9?= =?us-ascii?Q?zM6+VWT2YV5M3TPlG14HXbNKZNA1Hp9EbHV133o37G5gmlcyi3dOLR3Bt8eT?= =?us-ascii?Q?Z2Q210R08fbg3dIK/ffwauCPAoxedvYSvyLwFEjkiXn34Dyoh7ro1IwCD7ke?= =?us-ascii?Q?A11YjZ9D6mB6ozWjQZfZ/EJMTJ2fyIqVEm3IUGKpeyv0k/0VMRMJxLo5RVCL?= =?us-ascii?Q?AUQKrc/5+avmRJA4SpVMvRaqNoNaStML1ru+EIiIF0iKIHzFLa0l6juE6eGc?= =?us-ascii?Q?i7Ti5S1XpFx74CWwAcFTkwJs7GR0k23RMLaQmI/hPIectBauhkrwoDgRZ6I+?= =?us-ascii?Q?bWePgQoY8xXZHsQnSb6OKuDHDwDhkhpz5W96M+rtFlv/D0PAxSfHqhEnI4VN?= =?us-ascii?Q?0NfE94heb2KVqjyL0T62FDBbWi/m12IxkzpIIYMhpALGtbkrHVQJdPnGoQjW?= =?us-ascii?Q?vVpLMXfc3aAcUHw4Z5WOyIlRZ/PZ0FPgBDhqrS8n36unW9kEQQ3GCIrb0qee?= =?us-ascii?Q?RxRznRWe1621T3tOKpBb+YGFdQ0v5Cf7?= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230040)(36860700013)(376014)(1800799024)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2024 08:07:46.0092 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f0fa757d-716f-4278-80ff-08dd16963be5 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF00021F68.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR12MB8891 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 23.11.3 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/10/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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=ef327e576d3928c04767e3832406fcd5822bd9c0 Thanks. Xueming Li --- >From ef327e576d3928c04767e3832406fcd5822bd9c0 Mon Sep 17 00:00:00 2001 From: Alexander Kozyrev Date: Mon, 28 Oct 2024 19:17:07 +0200 Subject: [PATCH] common/mlx5: fix error CQE handling for 128 bytes CQE Cc: Xueming Li [ upstream commit 3cddeba0ca38b00c7dc646277484d08a4cb2d862 ] The completion queue element size can be independently configured to report either 64 or 128 bytes CQEs by programming cqe_sz parameter at CQ creation. This parameter depends on the cache line size and affects both regular CQEs and error CQEs. But the error handling assumes that an error CQE is 64 bytes and doesn't take the padding into consideration on platforms with 128-byte cache lines. Fix the error CQE size in all error handling routines in mlx5. Fixes: 957e45fb7bcb ("net/mlx5: handle Tx completion with error") Signed-off-by: Alexander Kozyrev Acked-by: Viacheslav Ovsiienko --- drivers/common/mlx5/mlx5_prm.h | 29 ++++++++++++++++++++- drivers/common/mlx5/windows/mlx5_win_defs.h | 12 --------- drivers/compress/mlx5/mlx5_compress.c | 4 +-- drivers/crypto/mlx5/mlx5_crypto_gcm.c | 2 +- drivers/crypto/mlx5/mlx5_crypto_xts.c | 2 +- drivers/net/mlx5/mlx5_flow_aso.c | 6 ++--- drivers/net/mlx5/mlx5_rx.c | 2 +- drivers/net/mlx5/mlx5_tx.c | 8 +++--- 8 files changed, 40 insertions(+), 25 deletions(-) diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h index 3cbb1179c0..0875256e36 100644 --- a/drivers/common/mlx5/mlx5_prm.h +++ b/drivers/common/mlx5/mlx5_prm.h @@ -268,8 +268,12 @@ /* Maximum number of DS in WQE. Limited by 6-bit field. */ #define MLX5_DSEG_MAX 63 -/* The 32 bit syndrome offset in struct mlx5_err_cqe. */ +/* The 32 bit syndrome offset in struct mlx5_error_cqe. */ +#if (RTE_CACHE_LINE_SIZE == 128) +#define MLX5_ERROR_CQE_SYNDROME_OFFSET 116 +#else #define MLX5_ERROR_CQE_SYNDROME_OFFSET 52 +#endif /* The completion mode offset in the WQE control segment line 2. */ #define MLX5_COMP_MODE_OFFSET 2 @@ -415,6 +419,29 @@ struct mlx5_wqe_mprq { #define MLX5_MPRQ_STRIDE_SHIFT_BYTE 2 +struct mlx5_error_cqe { +#if (RTE_CACHE_LINE_SIZE == 128) + uint8_t padding[64]; +#endif + uint8_t rsvd0[2]; + uint16_t eth_wqe_id; + uint8_t rsvd1[16]; + uint16_t ib_stride_index; + uint8_t rsvd2[10]; + uint32_t srqn; + uint8_t rsvd3[8]; + uint32_t byte_cnt; + uint8_t rsvd4[4]; + uint8_t hw_err_synd; + uint8_t hw_synd_type; + uint8_t vendor_err_synd; + uint8_t syndrome; + uint32_t s_wqe_opcode_qpn; + uint16_t wqe_counter; + uint8_t signature; + uint8_t op_own; +}; + /* CQ element structure - should be equal to the cache line size */ struct mlx5_cqe { #if (RTE_CACHE_LINE_SIZE == 128) diff --git a/drivers/common/mlx5/windows/mlx5_win_defs.h b/drivers/common/mlx5/windows/mlx5_win_defs.h index 79e7a7f386..d60df6fd37 100644 --- a/drivers/common/mlx5/windows/mlx5_win_defs.h +++ b/drivers/common/mlx5/windows/mlx5_win_defs.h @@ -219,18 +219,6 @@ struct mlx5_action { } dest_tir; }; -struct mlx5_err_cqe { - uint8_t rsvd0[32]; - uint32_t srqn; - uint8_t rsvd1[18]; - uint8_t vendor_err_synd; - uint8_t syndrome; - uint32_t s_wqe_opcode_qpn; - uint16_t wqe_counter; - uint8_t signature; - uint8_t op_own; -}; - struct mlx5_wqe_srq_next_seg { uint8_t rsvd0[2]; rte_be16_t next_wqe_index; diff --git a/drivers/compress/mlx5/mlx5_compress.c b/drivers/compress/mlx5/mlx5_compress.c index 41d9752833..702108c5f9 100644 --- a/drivers/compress/mlx5/mlx5_compress.c +++ b/drivers/compress/mlx5/mlx5_compress.c @@ -602,7 +602,7 @@ mlx5_compress_dump_err_objs(volatile uint32_t *cqe, volatile uint32_t *wqe, size_t i; DRV_LOG(ERR, "Error cqe:"); - for (i = 0; i < sizeof(struct mlx5_err_cqe) >> 2; i += 4) + for (i = 0; i < sizeof(struct mlx5_error_cqe) >> 2; i += 4) DRV_LOG(ERR, "%08X %08X %08X %08X", cqe[i], cqe[i + 1], cqe[i + 2], cqe[i + 3]); DRV_LOG(ERR, "\nError wqe:"); @@ -620,7 +620,7 @@ mlx5_compress_cqe_err_handle(struct mlx5_compress_qp *qp, struct rte_comp_op *op) { const uint32_t idx = qp->ci & (qp->entries_n - 1); - volatile struct mlx5_err_cqe *cqe = (volatile struct mlx5_err_cqe *) + volatile struct mlx5_error_cqe *cqe = (volatile struct mlx5_error_cqe *) &qp->cq.cqes[idx]; volatile struct mlx5_gga_wqe *wqes = (volatile struct mlx5_gga_wqe *) qp->qp.wqes; diff --git a/drivers/crypto/mlx5/mlx5_crypto_gcm.c b/drivers/crypto/mlx5/mlx5_crypto_gcm.c index 8b9953b46d..9b6c8dc4d5 100644 --- a/drivers/crypto/mlx5/mlx5_crypto_gcm.c +++ b/drivers/crypto/mlx5/mlx5_crypto_gcm.c @@ -856,7 +856,7 @@ mlx5_crypto_gcm_cqe_err_handle(struct mlx5_crypto_qp *qp, struct rte_crypto_op * { uint8_t op_code; const uint32_t idx = qp->cq_ci & (qp->entries_n - 1); - volatile struct mlx5_err_cqe *cqe = (volatile struct mlx5_err_cqe *) + volatile struct mlx5_error_cqe *cqe = (volatile struct mlx5_error_cqe *) &qp->cq_obj.cqes[idx]; op_code = rte_be_to_cpu_32(cqe->s_wqe_opcode_qpn) >> MLX5_CQ_INDEX_WIDTH; diff --git a/drivers/crypto/mlx5/mlx5_crypto_xts.c b/drivers/crypto/mlx5/mlx5_crypto_xts.c index d4e1dd718c..b9214711ac 100644 --- a/drivers/crypto/mlx5/mlx5_crypto_xts.c +++ b/drivers/crypto/mlx5/mlx5_crypto_xts.c @@ -363,7 +363,7 @@ static __rte_noinline void mlx5_crypto_xts_cqe_err_handle(struct mlx5_crypto_qp *qp, struct rte_crypto_op *op) { const uint32_t idx = qp->ci & (qp->entries_n - 1); - volatile struct mlx5_err_cqe *cqe = (volatile struct mlx5_err_cqe *) + volatile struct mlx5_error_cqe *cqe = (volatile struct mlx5_error_cqe *) &qp->cq_obj.cqes[idx]; op->status = RTE_CRYPTO_OP_STATUS_ERROR; diff --git a/drivers/net/mlx5/mlx5_flow_aso.c b/drivers/net/mlx5/mlx5_flow_aso.c index ab9eb21e01..b78d80ab44 100644 --- a/drivers/net/mlx5/mlx5_flow_aso.c +++ b/drivers/net/mlx5/mlx5_flow_aso.c @@ -489,7 +489,7 @@ mlx5_aso_dump_err_objs(volatile uint32_t *cqe, volatile uint32_t *wqe) int i; DRV_LOG(ERR, "Error cqe:"); - for (i = 0; i < 16; i += 4) + for (i = 0; i < (int)sizeof(struct mlx5_error_cqe) / 4; i += 4) DRV_LOG(ERR, "%08X %08X %08X %08X", cqe[i], cqe[i + 1], cqe[i + 2], cqe[i + 3]); DRV_LOG(ERR, "\nError wqe:"); @@ -509,8 +509,8 @@ mlx5_aso_cqe_err_handle(struct mlx5_aso_sq *sq) { struct mlx5_aso_cq *cq = &sq->cq; uint32_t idx = cq->cq_ci & ((1 << cq->log_desc_n) - 1); - volatile struct mlx5_err_cqe *cqe = - (volatile struct mlx5_err_cqe *)&cq->cq_obj.cqes[idx]; + volatile struct mlx5_error_cqe *cqe = + (volatile struct mlx5_error_cqe *)&cq->cq_obj.cqes[idx]; cq->errors++; idx = rte_be_to_cpu_16(cqe->wqe_counter) & (1u << sq->log_desc_n); diff --git a/drivers/net/mlx5/mlx5_rx.c b/drivers/net/mlx5/mlx5_rx.c index cc087348a4..86a7e090a1 100644 --- a/drivers/net/mlx5/mlx5_rx.c +++ b/drivers/net/mlx5/mlx5_rx.c @@ -459,7 +459,7 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec, container_of(rxq, struct mlx5_rxq_ctrl, rxq); union { volatile struct mlx5_cqe *cqe; - volatile struct mlx5_err_cqe *err_cqe; + volatile struct mlx5_error_cqe *err_cqe; } u = { .cqe = &(*rxq->cqes)[(rxq->cq_ci - vec) & cqe_mask], }; diff --git a/drivers/net/mlx5/mlx5_tx.c b/drivers/net/mlx5/mlx5_tx.c index 1fe9521dfc..4148d6d899 100644 --- a/drivers/net/mlx5/mlx5_tx.c +++ b/drivers/net/mlx5/mlx5_tx.c @@ -55,7 +55,7 @@ tx_recover_qp(struct mlx5_txq_ctrl *txq_ctrl) /* Return 1 if the error CQE is signed otherwise, sign it and return 0. */ static int -check_err_cqe_seen(volatile struct mlx5_err_cqe *err_cqe) +check_err_cqe_seen(volatile struct mlx5_error_cqe *err_cqe) { static const uint8_t magic[] = "seen"; int ret = 1; @@ -83,7 +83,7 @@ check_err_cqe_seen(volatile struct mlx5_err_cqe *err_cqe) */ static int mlx5_tx_error_cqe_handle(struct mlx5_txq_data *__rte_restrict txq, - volatile struct mlx5_err_cqe *err_cqe) + volatile struct mlx5_error_cqe *err_cqe) { if (err_cqe->syndrome != MLX5_CQE_SYNDROME_WR_FLUSH_ERR) { const uint16_t wqe_m = ((1 << txq->wqe_n) - 1); @@ -107,7 +107,7 @@ mlx5_tx_error_cqe_handle(struct mlx5_txq_data *__rte_restrict txq, mlx5_dump_debug_information(name, "MLX5 Error CQ:", (const void *)((uintptr_t) txq->cqes), - sizeof(struct mlx5_cqe) * + sizeof(struct mlx5_error_cqe) * (1 << txq->cqe_n)); mlx5_dump_debug_information(name, "MLX5 Error SQ:", (const void *)((uintptr_t) @@ -206,7 +206,7 @@ mlx5_tx_handle_completion(struct mlx5_txq_data *__rte_restrict txq, */ rte_wmb(); ret = mlx5_tx_error_cqe_handle - (txq, (volatile struct mlx5_err_cqe *)cqe); + (txq, (volatile struct mlx5_error_cqe *)cqe); if (unlikely(ret < 0)) { /* * Some error occurred on queue error -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-12-06 23:26:46.290431701 +0800 +++ 0067-common-mlx5-fix-error-CQE-handling-for-128-bytes-CQE.patch 2024-12-06 23:26:43.993044827 +0800 @@ -1 +1 @@ -From 3cddeba0ca38b00c7dc646277484d08a4cb2d862 Mon Sep 17 00:00:00 2001 +From ef327e576d3928c04767e3832406fcd5822bd9c0 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 3cddeba0ca38b00c7dc646277484d08a4cb2d862 ] @@ -15 +17,0 @@ -Cc: stable@dpdk.org @@ -25 +26,0 @@ - drivers/net/mlx5/hws/mlx5dr_send.c | 2 +- @@ -29 +30 @@ - 9 files changed, 41 insertions(+), 26 deletions(-) + 8 files changed, 40 insertions(+), 25 deletions(-) @@ -32 +33 @@ -index 359f02f17c..210158350d 100644 +index 3cbb1179c0..0875256e36 100644 @@ -103 +104 @@ -index 5998d060e4..82105bfebd 100644 +index 41d9752833..702108c5f9 100644 @@ -125 +126 @@ -index f598273873..cd21605bd2 100644 +index 8b9953b46d..9b6c8dc4d5 100644 @@ -128 +129 @@ -@@ -877,7 +877,7 @@ mlx5_crypto_gcm_cqe_err_handle(struct mlx5_crypto_qp *qp, struct rte_crypto_op * +@@ -856,7 +856,7 @@ mlx5_crypto_gcm_cqe_err_handle(struct mlx5_crypto_qp *qp, struct rte_crypto_op * @@ -150,13 +150,0 @@ -diff --git a/drivers/net/mlx5/hws/mlx5dr_send.c b/drivers/net/mlx5/hws/mlx5dr_send.c -index e9abf3dddb..e121c7f7ed 100644 ---- a/drivers/net/mlx5/hws/mlx5dr_send.c -+++ b/drivers/net/mlx5/hws/mlx5dr_send.c -@@ -599,7 +599,7 @@ static void mlx5dr_send_engine_poll_cq(struct mlx5dr_send_engine *queue, - return; - - if (unlikely(cqe_opcode != MLX5_CQE_REQ)) { -- struct mlx5_err_cqe *err_cqe = (struct mlx5_err_cqe *)cqe; -+ struct mlx5_error_cqe *err_cqe = (struct mlx5_error_cqe *)cqe; - - DR_LOG(ERR, "CQE ERR:0x%x, Vendor_ERR:0x%x, OP:0x%x, QPN:0x%x, WQE_CNT:0x%x", - err_cqe->syndrome, err_cqe->vendor_err_synd, cqe_opcode, @@ -164 +152 @@ -index a94b228396..feca8c3e89 100644 +index ab9eb21e01..b78d80ab44 100644 @@ -188 +176 @@ -index f241809e08..5e58eb8bc9 100644 +index cc087348a4..86a7e090a1 100644 @@ -201 +189 @@ -index fc105970a3..4286876e12 100644 +index 1fe9521dfc..4148d6d899 100644