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 0EF5645BFE; Mon, 28 Oct 2024 16:58:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F1A2A41133; Mon, 28 Oct 2024 16:58:47 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2047.outbound.protection.outlook.com [40.107.93.47]) by mails.dpdk.org (Postfix) with ESMTP id 5531841132; Mon, 28 Oct 2024 16:58:46 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZbWB+1j3/WSXiZlFhHZi4vkkpECaOLrCWqSo3eJ+eU14B0lqkm8e0ic+eYZtAMcDuXo7t2BQzUe0ve9gJDTFQTeycsPHfHOoiu2FGVdiw9z/xVeQ+wgphfVAQs25uj7wV2xaEzPUmxl+QbVRM8TE+7qShX1LXAtxD4JMxM8uNL7EMABvBVRqcDk/eFhRTK93ekfK3/dSkSEK+nU5IzbDte7VTVvB4afdfHwzsa6nVbFgN9Glrjom+AOLypsm9KPwkNe8cbTBVAICPw9secgD5aEgP0vZ65MnJb7utLbg2EeztgOz3ijmUGDEkXcEpptabhwz05pezQx1nxeio+DZmA== 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=fsaeNJG83IlWb6jjjnZB1UF4yT6q+wion619UY1UrMs=; b=WCLgLu9kCE08ck2XcQjCkm8tAu8H4rhvvR4Dx/lxaW1JL6gRBPduh5Nx1KV/yMfuM6KvNSm3EPHUC3Dx+9/ViIEgKrR7U9Z2uE4Vs5nd0ZgEkSoP0MZHwcTV0ItaVXyQMst2Mwm5PNhJ5Szy6uQ5nMn2KALNMbc5Axmx0c7Boir8NiZW1Y/P2dJbWDBf2GDWQ7UzmtJj/QTZPTz4jOGM7wco2d/cwu0yyrRP8daoDB2j9E2reb6FEaWNDHECPN/WPf5bxAO1MC3MZqPXA26HLcDLLP+A0UaIvYg6FumYJtPhKfoty31tclPJj2vLxd9xglFZYoTO3JUHlh11KL+dMw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none 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=fsaeNJG83IlWb6jjjnZB1UF4yT6q+wion619UY1UrMs=; b=jY68u9et7qn80EU+onDw6TeoRnvxL/BOyRPFGg8miMQVlZNoFygi8ZUeDmzuLTyN4hqh3GFyMmUiOETOf7wcgywcP0r7NDXwWeohx+JbSJBenKn/M4M+wm23j1zUXJWBRfJ4lJZYEt+weLSniZvcy/bhE7KPJSwt65rDBO0dWi4KlXG5f5oCUUNojYafiM/WR7KIvUmP274y8YsbCInzK4+k3u5R0/dw0W5hajbaHCU4vsky+HfG/m5qzlJU1PHIwjs7WZKU0HUemcDW5M708Az7XO3sQUBsxY3BD54o1xvwKKzaL0pTNtqmMF25TIdtC/kxLsFJKyRUFx7NgDsb5Q== Received: from DM4PR12MB7549.namprd12.prod.outlook.com (2603:10b6:8:10f::14) by SA3PR12MB7832.namprd12.prod.outlook.com (2603:10b6:806:31f::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.23; Mon, 28 Oct 2024 15:58:41 +0000 Received: from DM4PR12MB7549.namprd12.prod.outlook.com ([fe80::36a0:7d17:4418:7c62]) by DM4PR12MB7549.namprd12.prod.outlook.com ([fe80::36a0:7d17:4418:7c62%4]) with mapi id 15.20.8093.024; Mon, 28 Oct 2024 15:58:41 +0000 From: Slava Ovsiienko To: Alexander Kozyrev , "dev@dpdk.org" CC: "stable@dpdk.org" , Raslan Darawsheh , Matan Azrad , "stephen@networkplumber.org" Subject: RE: [PATCH v2] drivers: fix error CQE handling Thread-Topic: [PATCH v2] drivers: fix error CQE handling Thread-Index: AQHbFdKPzZrVpvg6TU2uresxyTjnYrKceMkw Date: Mon, 28 Oct 2024 15:58:41 +0000 Message-ID: References: <20230502184922.3249201-1-akozyrev@nvidia.com> <20241003202605.867419-1-akozyrev@nvidia.com> In-Reply-To: <20241003202605.867419-1-akozyrev@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR12MB7549:EE_|SA3PR12MB7832:EE_ x-ms-office365-filtering-correlation-id: 0e8ea5eb-59a1-4ab0-5302-08dcf7696508 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|366016|376014|1800799024|38070700018; x-microsoft-antispam-message-info: =?us-ascii?Q?PNEz6iSn52Kbe2KJOca6SD07IvA9BfWnAQfdymEJ/253iXPRxFJ5LM+UclKm?= =?us-ascii?Q?RVYPpAAIGcmJGegUggb5VxwDnxdyZZ22M39+y2bIjcU00HcVLcA55bpmXxwR?= =?us-ascii?Q?wBTBkkt4oqN1f49fuefNjto6Fm8cO49462vWx+jfVDDV0cr6wKR/0T1Hh4sc?= =?us-ascii?Q?DxVPFAo6/7VBJlIejoDOZmPn7LAFhPO2+fEHKtshmMPCbj16mXV8d3Y0R48x?= =?us-ascii?Q?79o1w/jxZtFkT9oEmuHlA6cOaRD2KcwayFKCvzkj5qHYEynmjPAY9R9DqmQY?= =?us-ascii?Q?knCQgUFzR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0zMySG1aGwiIpM?= =?us-ascii?Q?X2vcf7kXVrVN1LJ5mDTfjWkhPTYmBvktTKBBRkpXZqlP4fLrJyH3r4Qy8pIp?= =?us-ascii?Q?flHaD/wbsf+gQ2vv69dHaWq166ajZmkT7xqTNCT8CwDIbADVFVb0/KE+c7AC?= =?us-ascii?Q?Wm947J3gBQ4if3cyjLMNuuuFlakbaP29lT1u3D9/LR6YyKESh1WMOJg1Ux4X?= =?us-ascii?Q?zepR7os=3D?= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR12MB7549.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?kv0/lBtEp0fKcqkwXaGWjHLkXIhGHosT2zN0jYUuruaHHl8KPHE8ilVBDMzZ?= =?us-ascii?Q?Y6xQMaoT1LANxozGlKLcgw25oSAqoPEI4aF7h/ABPaqK/z8JJzbQ7UfgM27x?= =?us-ascii?Q?I8o6jxuV3qXYX1DnpVKAzEL06JMxC/NfMkuYaAxN+ID/ofxoWz8DYDsxm6uY?= =?us-ascii?Q?lEsOfcFjZVPMatXMSN6ik10jo1Xk5NG9O214/uujOvaW2C9E3xmg85HeDwMW?= =?us-ascii?Q?tBXiNOsjf0OwruI964kUlJ9rRWE+KzdThASc9thLhiz+qKBvKRj9R3nJ34nC?= =?us-ascii?Q?WizGNCtKgo6X2K+okkEKTx94lzRpQ994reTBR276m1Mx/zRjjXsFcl3zuBX/?= =?us-ascii?Q?t6IEs2tFELcf8XoPCQYb1H1dL/mt1LMFtNiU1u6xjeoP71nSfOkHmwpg2ieO?= =?us-ascii?Q?ZoDXWEYFDiTSvslw0Sm/RskUEmcu+28lA4SSK3JAHstGMRowyuAwT4HlYVgn?= =?us-ascii?Q?heyJdYxip3h5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ZsT6g707cNr5pW2OwIHTs1?= =?us-ascii?Q?2ChhGP4Bm7AlDYbHfmWWxrrzk0apDKrw6WjGitl3GWuufys+2U05Vt0iLtwP?= =?us-ascii?Q?IoLOUtosoLPMc3gNu+LgfDxNOaz3scz6QhcDi3VLDqcgmQONjtYsqN1w+pqt?= =?us-ascii?Q?XNpslLnTnByqfbL5J8VgWm8sQpg5a2WgN7mc18YA9Rh2FkNhru0tY71Ta0J9?= =?us-ascii?Q?dZzclt3Z+QPrtH1a2rb76Bc6G64rLtp/VsSTyL6T?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB7549.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0e8ea5eb-59a1-4ab0-5302-08dcf7696508 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Oct 2024 15:58:41.8206 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: NGY4GJVFd6fzG0WsfNOszv7wMSQu4qu2GJYoFxP7i6RsJAAUJpGgUI+raC0b1lgNWCRB1KjcN3XcFmZwFBgOkA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB7832 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Acked-by: Viacheslav Ovsiienko > -----Original Message----- > From: Alexander Kozyrev > Sent: Thursday, October 3, 2024 11:26 PM > To: dev@dpdk.org > Cc: stable@dpdk.org; Raslan Darawsheh ; Slava > Ovsiienko ; Matan Azrad ; > stephen@networkplumber.org > Subject: [PATCH v2] drivers: fix error CQE handling >=20 > 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 platfo= rms > with 128-byte cache lines. > Fix the error CQE size in all error handling routines in mlx5. >=20 > Fixes: 957e45fb7b ("net/mlx5: handle Tx completion with error") > Cc: stable@dpdk.org >=20 > Signed-off-by: Alexander Kozyrev > --- > 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/hws/mlx5dr_send.c | 2 +- > drivers/net/mlx5/mlx5_flow_aso.c | 6 ++--- > drivers/net/mlx5/mlx5_rx.c | 2 +- > drivers/net/mlx5/mlx5_tx.c | 8 +++--- > 9 files changed, 41 insertions(+), 26 deletions(-) >=20 > diff --git a/drivers/common/mlx5/mlx5_prm.h > b/drivers/common/mlx5/mlx5_prm.h index 359f02f17c..210158350d 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 >=20 > -/* 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 =3D=3D 128) #define > MLX5_ERROR_CQE_SYNDROME_OFFSET 116 > +#else > #define MLX5_ERROR_CQE_SYNDROME_OFFSET 52 > +#endif >=20 > /* 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 { >=20 > #define MLX5_MPRQ_STRIDE_SHIFT_BYTE 2 >=20 > +struct mlx5_error_cqe { > +#if (RTE_CACHE_LINE_SIZE =3D=3D 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 */ str= uct > mlx5_cqe { #if (RTE_CACHE_LINE_SIZE =3D=3D 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; > }; >=20 > -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 5998d060e4..82105bfebd 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; >=20 > DRV_LOG(ERR, "Error cqe:"); > - for (i =3D 0; i < sizeof(struct mlx5_err_cqe) >> 2; i +=3D 4) > + for (i =3D 0; i < sizeof(struct mlx5_error_cqe) >> 2; i +=3D 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 =3D qp->ci & (qp->entries_n - 1); > - volatile struct mlx5_err_cqe *cqe =3D (volatile struct mlx5_err_cqe *) > + volatile struct mlx5_error_cqe *cqe =3D (volatile struct mlx5_error_cqe > +*) > &qp- > >cq.cqes[idx]; > volatile struct mlx5_gga_wqe *wqes =3D (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 f598273873..cd21605bd2 100644 > --- a/drivers/crypto/mlx5/mlx5_crypto_gcm.c > +++ b/drivers/crypto/mlx5/mlx5_crypto_gcm.c > @@ -877,7 +877,7 @@ mlx5_crypto_gcm_cqe_err_handle(struct > mlx5_crypto_qp *qp, struct rte_crypto_op * { > uint8_t op_code; > const uint32_t idx =3D qp->cq_ci & (qp->entries_n - 1); > - volatile struct mlx5_err_cqe *cqe =3D (volatile struct mlx5_err_cqe *) > + volatile struct mlx5_error_cqe *cqe =3D (volatile struct mlx5_error_cqe > +*) > &qp- > >cq_obj.cqes[idx]; >=20 > op_code =3D 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 =3D qp->ci & (qp->entries_n - 1); > - volatile struct mlx5_err_cqe *cqe =3D (volatile struct mlx5_err_cqe *) > + volatile struct mlx5_error_cqe *cqe =3D (volatile struct mlx5_error_cqe > +*) > &qp- > >cq_obj.cqes[idx]; >=20 > op->status =3D RTE_CRYPTO_OP_STATUS_ERROR; 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; >=20 > if (unlikely(cqe_opcode !=3D MLX5_CQE_REQ)) { > - struct mlx5_err_cqe *err_cqe =3D (struct mlx5_err_cqe *)cqe; > + struct mlx5_error_cqe *err_cqe =3D (struct mlx5_error_cqe > *)cqe; >=20 > 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, diff --git a/drivers/net/mlx5/mlx5_flow_aso.c > b/drivers/net/mlx5/mlx5_flow_aso.c > index a94b228396..feca8c3e89 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; >=20 > DRV_LOG(ERR, "Error cqe:"); > - for (i =3D 0; i < 16; i +=3D 4) > + for (i =3D 0; i < (int)sizeof(struct mlx5_error_cqe) / 4; i +=3D 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 =3D &sq->cq; > uint32_t idx =3D cq->cq_ci & ((1 << cq->log_desc_n) - 1); > - volatile struct mlx5_err_cqe *cqe =3D > - (volatile struct mlx5_err_cqe *)&cq- > >cq_obj.cqes[idx]; > + volatile struct mlx5_error_cqe *cqe =3D > + (volatile struct mlx5_error_cqe *)&cq- > >cq_obj.cqes[idx]; >=20 > cq->errors++; > idx =3D 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 f241809e08..5e58eb8bc9 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 =3D { > .cqe =3D &(*rxq->cqes)[(rxq->cq_ci - vec) & cqe_mask], > }; > diff --git a/drivers/net/mlx5/mlx5_tx.c b/drivers/net/mlx5/mlx5_tx.c inde= x > 04f80bb9bd..2f48bbc82e 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) >=20 > /* 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[] =3D "seen"; > int ret =3D 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 !=3D MLX5_CQE_SYNDROME_WR_FLUSH_ERR) > { > const uint16_t wqe_m =3D ((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 =3D 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.18.2