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 C484A42828 for ; Fri, 24 Mar 2023 00:52:10 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BDF0F41151; Fri, 24 Mar 2023 00:52:10 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2080.outbound.protection.outlook.com [40.107.94.80]) by mails.dpdk.org (Postfix) with ESMTP id 26EE34068E; Fri, 24 Mar 2023 00:52:08 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TyeWle0ZJVFdZR4Pw/c2IY8UDb73URwm0NTg1BefZgO9+zWKf7QY1Rw7UI1tXYnPdJLgQQTP2zcB6L5e629wSU+YHg5BraRXKt7XeUWNEk72e32mnU3fErDVnVqyd3+BUjPR8aSWqQPXDMVfLKapSps0YgORQvqa4aKHMje9NFKtdTm+ZMFJrxaTu5McarpBq7E14boiHtOQbYwo2dTE5oothznUnnuEy5I02RuuOMZaYsD7bVrT+dOKOoSG4rKqxHDs7ySf8g+RIvjIXMTRKkjF1Nm8I8RfQfMAIlCS6hzfGHkgLzZZEx6on7Ib7YFG3jkyHkIO57vD8ssQ4FAwBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=fJfgtAnv3bXCUa+zwjhMqv5KON2FoZ4Fno6UFyG1PcE=; b=mIXTjOwLb4PZ7Za21qnhcv41/hvE7RnkYl9YDdyt+0WWPejILgLYCfnzPaF7SPCPsZm/THuIZI4rRL+blRrCs4SRqsZi2Z+M1V7xyLGOZFEwR6Om04Y0OBAb9wBbd3GbJ3S9l1+TolU+boHcnDxl/+9gmEV4rbhBIbaFfNpM1xRWVKZzyAerzxpPnmjZFMAc15XFmvbbuIHhHUV4oE8IMVUxUtSn3rWobnmrSLTxrpzJPosI2VfcqoNz9UsMQJE/r2RnTq+ZIt2P6HVyV8ekhPnobFZ/3KBbT5PL9uthXBpsJxN/eZxuEqw3k2veRP7yx/fAXkqFT1Prekm6hMJL5g== 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 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=fJfgtAnv3bXCUa+zwjhMqv5KON2FoZ4Fno6UFyG1PcE=; b=a/a3sak/7gSqmSfyuBQwNYqw4m7L+3p5osPBhZ3K1elcUr+y0RINg15V0qKGIvf7SVhn53kf21EC26owXX5h/PTnhY2zqI1KCl4DLFvfcZhZxaoOFIUviyCGrOIJLjpsjmZwpDavyghzH5H53PypUQKbSQzK0wIRGD7wYbTbkwNzatvr8asa7ZEfPVE78Xa36eG+OtW9Xg/N592C2CIT0E/l+Nualt0M75SA7IIK716abs6QkwaqrqSitmo2sBSPs6Z4mgKlcJpxlw3nt55r9tcMx8Fl6SBWHC1zvkGkH88hY/tZ79XuxI5THNWdzmEE4ZCEZlb9sR/1RsH4IDRtLg== Received: from BN9PR03CA0141.namprd03.prod.outlook.com (2603:10b6:408:fe::26) by CH3PR12MB8482.namprd12.prod.outlook.com (2603:10b6:610:15b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.38; Thu, 23 Mar 2023 23:52:06 +0000 Received: from BN8NAM11FT007.eop-nam11.prod.protection.outlook.com (2603:10b6:408:fe:cafe::88) by BN9PR03CA0141.outlook.office365.com (2603:10b6:408:fe::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.38 via Frontend Transport; Thu, 23 Mar 2023 23:52:06 +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 BN8NAM11FT007.mail.protection.outlook.com (10.13.177.109) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.21 via Frontend Transport; Thu, 23 Mar 2023 23:52:05 +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.986.5; Thu, 23 Mar 2023 16:51:57 -0700 Received: from pegasus01.mtr.labs.mlnx (10.126.231.37) 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.986.37; Thu, 23 Mar 2023 16:51:55 -0700 From: Alexander Kozyrev To: CC: , , , Subject: [PATCH] net/mlx5: fix CQEs dumping for Tx Date: Fri, 24 Mar 2023 01:51:40 +0200 Message-ID: <20230323235140.3351563-1-akozyrev@nvidia.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.231.37] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT007:EE_|CH3PR12MB8482:EE_ X-MS-Office365-Filtering-Correlation-Id: d2053b86-671c-4962-2bcf-08db2bf99b9e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WzkImCxnK97WfbTx/OXtX1NdsWyyw5viM+9U4WpnhKuQ/1nhMbZ6XT/wdXGUo3ic4vcOfl01QtOtuK6r9HF61XQM0g8hLcaRKsDqUURRzNhoCSDwAOg9oHq5Pe3UA3mclhqW10Ue4WqEIvwMnsUc5Z4pNdnyknmpOVFoNQmzP8HOa4n1HjlbegEcKd33luM4oA9Tw4GtG7VLPHURrtMvVoBIM03dk0XgEvFmFnCHPYFlWeEf5w5Tkao0WhUu6CszzQuX7DcKIRdEYF+DqGkzOuji6K2yghX6cibY/ljFfAguN9nUcQG3bOhmi38sbspaojp6W4ezLpE9FSmLWSjN5kwCe3yWs9/JIsVIA3uYKABUQrxb6qYF5ALO86hLqWzL/fSsU2DCieppntfKDib/D3ajwFnJaaayNFlnSj+Gf68DzMvvGylbAQxV89+Balv77fCOxgLC4iaL13SYLFMPhj6gcOK0QLL/x5HH46pPKU73Zdu2Fhbi2QW41Zdt68ahS8EszbyrqyN3EgsqFeFOvT9G/DGMgibrEPoOnLBwAhDD52nkI1gibGup3c9rrVv4i93j8oXOMKhv8TChmPgQThxWUf6e1/lCEvQ6exMJFmd/kp9GLWr5zPEU6OKZW3LmyLH1IE5VLo/ppkdjmqDLRoTY5c6gsk4CxXnV0r1aFTuIG8dz2eE674DWnoG9kmKQ/9j53Wx9XKdIiUqvs9k7sf2cd25lGexol6/a1cQEqupaSBZg3n0MHjLOLfKVyvmb 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:(13230025)(4636009)(346002)(376002)(39860400002)(396003)(136003)(451199018)(40470700004)(36840700001)(46966006)(478600001)(40460700003)(6916009)(70586007)(8676002)(4326008)(4744005)(36860700001)(70206006)(450100002)(41300700001)(5660300002)(82740400003)(7636003)(426003)(8936002)(107886003)(26005)(6666004)(47076005)(1076003)(2616005)(336012)(316002)(16526019)(186003)(83380400001)(54906003)(86362001)(82310400005)(36756003)(40480700001)(356005)(2906002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Mar 2023 23:52:05.8711 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d2053b86-671c-4962-2bcf-08db2bf99b9e 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: BN8NAM11FT007.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8482 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 The regular CQE size can be 64 bytes or 128 bytes depending on the cache line size. The error CQE is always 64 bytes long. Only 64 bytes are dumped to the log file in case of Tx queue recovery form the error. Use the CQE size, not the error CQE size. Fixes: 957e45fb7b ("net/mlx5: handle Tx completion with error") Cc: stable@dpdk.org Signed-off-by: Alexander Kozyrev --- drivers/net/mlx5/mlx5_tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_tx.c b/drivers/net/mlx5/mlx5_tx.c index a13c7e937c..14e1487e59 100644 --- a/drivers/net/mlx5/mlx5_tx.c +++ b/drivers/net/mlx5/mlx5_tx.c @@ -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(*err_cqe) * + sizeof(struct mlx5_cqe) * (1 << txq->cqe_n)); mlx5_dump_debug_information(name, "MLX5 Error SQ:", (const void *)((uintptr_t) -- 2.18.2