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 7EA1943E57 for ; Sat, 13 Apr 2024 14:54:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 791FF40A81; Sat, 13 Apr 2024 14:54:50 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2065.outbound.protection.outlook.com [40.107.223.65]) by mails.dpdk.org (Postfix) with ESMTP id 9389240A81 for ; Sat, 13 Apr 2024 14:54:49 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ms4xm9DcPO2WmtKQIZmLlfi9mWfakcnT4VDn6ItH+Md3jspp5ZrZS3rgPjUX+uyaEtp+WtkRW1lXxwrd/RMZWPYJG0JUmwQ1sJesk0q1xiMcG/SXy4ZVA3CGfqiZZw+J2n0t1Lpw5CL8NFAma/gvRx3ODWzLEMygvARDumoG1GmkOx3YqF0HgrvzcAhuoJqvXdMOOGoBqlcVq4QcWYEkwMeKJsUuGegEZNW9WdWRqlZ4+n1VfiJ1xtj/O1MvkiXKP0cBxAGA8Is05ymCqF9cSpFK1uJu+dXN2xA425WomVyh6ws8hyr24pBNXdWXu1qOIp9U+G5k5HjR3xdPledBBA== 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=sa953IlsBtFZaCswQ0wLVsqwCEIevICSV4g8T6hTFmA=; b=DV7L6dqOXO1nKqADObKDviVMXj7BgZ0xdyWENSGtPAfzSjkIuRxEFnP8uxPrymvrBuNNcfkUBCk7S426eF/0QG44KN1vwKWftsj5WzoELKacZHS+MKC1goeDQDgzNxdqRQioFSTaVLpPYhcE8OQyUQKxolSJaZx2Dn+cRbWRHG/biP/GzLsJcBvF54Ixf0bbRF1FcIqpuNiEESExJeghHxiqmDi7ualdqU4Gk2TQ7q6Pp2VmtTKN/tLJxZ6GZnNP9l+16k6p0B2lmrJMIbPSW5c38sGY/FHy0fQ+mcZLGQ2tjjlJfChsyQfJOF7DjwuBT5fC28l4NKE9JGsT/CWoFw== 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=sa953IlsBtFZaCswQ0wLVsqwCEIevICSV4g8T6hTFmA=; b=Nma0uBmNz+bCDBlCbOl8ZCvdRu2/KkxEA137d4IhNpXRNJepFM9Y9nUHNJVDK0wxonbunAx8puqg0xPwCIer9/RMUEoA4kwgeHnx9gtfBUrhjITya1hLTygSMZvLmetU3RJqYibJ9u59nU7vf0h2NrpaYm/whgRBjMNLzdVASxO8yE778/kPXn+vvMdBpqssoZR00lzdd0ZY6kRec9DyasWJnTeDbVnrDX4iNX9Lf7qFJIX9I2xjWzEOwXu74yBX35mABD7OqYUDul68sE5f8JbBb2v8VgILiPlgp2saH4dnLeB+/jVMlwQQSIOP5aPH0PkL5mavr8yjMPk2GBHp4Q== Received: from DM6PR11CA0001.namprd11.prod.outlook.com (2603:10b6:5:190::14) by LV8PR12MB9358.namprd12.prod.outlook.com (2603:10b6:408:201::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.55; Sat, 13 Apr 2024 12:54:47 +0000 Received: from DS3PEPF0000C37A.namprd04.prod.outlook.com (2603:10b6:5:190:cafe::47) by DM6PR11CA0001.outlook.office365.com (2603:10b6:5:190::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.31 via Frontend Transport; Sat, 13 Apr 2024 12:54:47 +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 DS3PEPF0000C37A.mail.protection.outlook.com (10.167.23.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Sat, 13 Apr 2024 12:54:47 +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.41; Sat, 13 Apr 2024 05:54:26 -0700 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.1258.12; Sat, 13 Apr 2024 05:54:24 -0700 From: Xueming Li To: Viacheslav Ovsiienko CC: Dariusz Sosnowski , dpdk stable Subject: patch 'net/mlx5: fix error packets drop in regular Rx' has been queued to stable release 23.11.1 Date: Sat, 13 Apr 2024 20:48:49 +0800 Message-ID: <20240413125005.725659-49-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240413125005.725659-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> <20240413125005.725659-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: DS3PEPF0000C37A:EE_|LV8PR12MB9358:EE_ X-MS-Office365-Filtering-Correlation-Id: 09398d64-4190-4c8c-98f8-08dc5bb8e60f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TOvxZa//hdoMt+dhNGMtQ08/kZmM70AS9iK20PIBFlf74o1XnZWsFOdYLJRJWaUdDnZJ+bUPmwOpwV2Mn7cUYf+pvWsAQuI/XPi0xnBWOLny8Y1gqwbOvQzgGhmRzBWiqvx+Euv5KOdYh287eFOFHyghmn86IyjXX6/GpeAp5PicpW8GMA5FzqWx94jURgXj5K9udYqifM61gg3DyzO1p4+FR6nfQgxpaCdMeEztBQh6xWjY68Nlsu/G/3wh1MzJzbPY0tXFo0G+i05Yw+e5F4coMAqlMRREW0cVGCfooryTHheJf2pJvW/3Euw3Fb3kM4g7Q7lb2csZ2FaCZDQAfEXzzK+BqEYqBFCpnD3bvYoy2ybJL4Ssi1t5gz8PveYvseJ3spr8a8IEcMj9WPRGCNTIJLJB3hLS1ZAgS53wsE+EuYBvHrdajTAV/kEem/EeP1qkAhWxVX4yWHgLGD9qxPJpKDZhbFrLGO5hRkXqipnvUWAp4UmqLDmgVy2saM2Olu4YGWhc2rbyX/u2uIu3TBvbZfGk19aOVPhJTrLPr/q3+lDKkRVfL+TFYhTqkdq5UORqlSGgzpSp+FO7+GAAg5hVS7VP527FvG0CXjtMWo2om6sqfV0IadejP6VNddL1mwPKWPJh7Lr1BkzmKIiAJtk5LVZVWQG/tHou2Yakgh2FNJVBhc8y+YthoBj+K1jcTPWiIDFS9Ly1v2BG6W/f2EoQXiiW+UvBG2ByFRKB2dbv+82As/NXIHcfQffxBGuo 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:(13230031)(36860700004)(376005)(1800799015)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2024 12:54:47.0097 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 09398d64-4190-4c8c-98f8-08dc5bb8e60f 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: DS3PEPF0000C37A.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR12MB9358 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.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/15/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=bfa6cbba4c6cffa1e3a27c17a6f8e89644f340a1 Thanks. Xueming Li --- >From bfa6cbba4c6cffa1e3a27c17a6f8e89644f340a1 Mon Sep 17 00:00:00 2001 From: Viacheslav Ovsiienko Date: Tue, 20 Feb 2024 13:45:20 +0200 Subject: [PATCH] net/mlx5: fix error packets drop in regular Rx Cc: Xueming Li [ upstream commit ef296e8f6140ea469b50c7bfe73501b1c9ef86e1 ] When packet gets received with error it is reported in CQE structure and PMD analyzes the error syndrome and provides two options - either reset the entire queue for the critical errors, or just ignore the packet. The non-vectorized rx_burst did not ignore the non-critical error packets, and in case of packet length exceeding the mbuf data buffer length it took the next element in the queue WQE ring, resulting in CQE/WQE consume indices synchronization lost. Fixes: aa67ed308458 ("net/mlx5: ignore non-critical syndromes for Rx queue") Signed-off-by: Viacheslav Ovsiienko Acked-by: Dariusz Sosnowski --- drivers/net/mlx5/mlx5_rx.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rx.c b/drivers/net/mlx5/mlx5_rx.c index 5bf1a679b2..cc087348a4 100644 --- a/drivers/net/mlx5/mlx5_rx.c +++ b/drivers/net/mlx5/mlx5_rx.c @@ -613,7 +613,8 @@ mlx5_rx_err_handle(struct mlx5_rxq_data *rxq, uint8_t vec, * @param mprq * Indication if it is called from MPRQ. * @return - * 0 in case of empty CQE, MLX5_REGULAR_ERROR_CQE_RET in case of error CQE, + * 0 in case of empty CQE, + * MLX5_REGULAR_ERROR_CQE_RET in case of error CQE, * MLX5_CRITICAL_ERROR_CQE_RET in case of error CQE lead to Rx queue reset, * otherwise the packet size in regular RxQ, * and striding byte count format in mprq case. @@ -697,6 +698,11 @@ mlx5_rx_poll_len(struct mlx5_rxq_data *rxq, volatile struct mlx5_cqe *cqe, if (ret == MLX5_RECOVERY_ERROR_RET || ret == MLX5_RECOVERY_COMPLETED_RET) return MLX5_CRITICAL_ERROR_CQE_RET; + if (!mprq && ret == MLX5_RECOVERY_IGNORE_RET) { + *skip_cnt = 1; + ++rxq->cq_ci; + return MLX5_ERROR_CQE_MASK; + } } else { return 0; } @@ -971,19 +977,18 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n) cqe = &(*rxq->cqes)[rxq->cq_ci & cqe_mask]; len = mlx5_rx_poll_len(rxq, cqe, cqe_n, cqe_mask, &mcqe, &skip_cnt, false); if (unlikely(len & MLX5_ERROR_CQE_MASK)) { + /* We drop packets with non-critical errors */ + rte_mbuf_raw_free(rep); if (len == MLX5_CRITICAL_ERROR_CQE_RET) { - rte_mbuf_raw_free(rep); rq_ci = rxq->rq_ci << sges_n; break; } + /* Skip specified amount of error CQEs packets */ rq_ci >>= sges_n; rq_ci += skip_cnt; rq_ci <<= sges_n; - idx = rq_ci & wqe_mask; - wqe = &((volatile struct mlx5_wqe_data_seg *)rxq->wqes)[idx]; - seg = (*rxq->elts)[idx]; - cqe = &(*rxq->cqes)[rxq->cq_ci & cqe_mask]; - len = len & ~MLX5_ERROR_CQE_MASK; + MLX5_ASSERT(!pkt); + continue; } if (len == 0) { rte_mbuf_raw_free(rep); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-04-13 20:43:06.552569301 +0800 +++ 0049-net-mlx5-fix-error-packets-drop-in-regular-Rx.patch 2024-04-13 20:43:04.967753971 +0800 @@ -1 +1 @@ -From ef296e8f6140ea469b50c7bfe73501b1c9ef86e1 Mon Sep 17 00:00:00 2001 +From bfa6cbba4c6cffa1e3a27c17a6f8e89644f340a1 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit ef296e8f6140ea469b50c7bfe73501b1c9ef86e1 ] @@ -18 +20,0 @@ -Cc: stable@dpdk.org