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 3B7D9A0548 for ; Sun, 28 Nov 2021 16:02:16 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 32BC64274A; Sun, 28 Nov 2021 16:02:16 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2080.outbound.protection.outlook.com [40.107.236.80]) by mails.dpdk.org (Postfix) with ESMTP id 687654068A for ; Sun, 28 Nov 2021 16:02:15 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D7k947UjckIM3gxIJGNLU5cs2RrFTMTlQqagBaau/xYybOZraPJcUlpclNaDTNn8DCRInxh3rBcwxJzD8r1zD5+gk4bNGmkShECAeOFjGHnPyzS/E0PIORo1J75vwX9Rgb2In22+8CkImj/AF5oAfThWrvSY5FMaLpW85nLKVAkYVcyFJSQk4rlg5qWkZxXEvOnu/Wwj7kVgSmydPzlz/LUwE+nsiCgPpdK+5a2Ja6V+6yZNj9bwg4ZdQUGAkbVkRVhCiyg5OwUs+0TixDPiaKsdso5M1AXOqmly/G0FpzOKkn7y3d4UYmEv3Rxt2GYVRGZlOWdgFMVoTBSql+SdMw== 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=uxwvC+57jM/uldCdd0UPveIClECdaEE0OPri1hjKvZg=; b=RIqNNKccPd3GFWjbbyFEHssLl3sdD+xWuMvF6c8kPY401sthS0qKKJxiDf+Sr+PSNWVL2jDdOsGUw1Pme3i6f7X7rJ41nE5lZkDVlHij88JwPp3nORd3pCZnuDr4vWJlcHtSNkZiiezHH90MjI3x/tbpz5A0jqw8i2q9orU3MxKEfQZTF/fYXjIue3TLmvLiHDuLA3z8fdq1DJUHRuu4dFuVySuJ0PswxnKuGDHcFexDJe2mH0pBdGHERfEprkKlA2aMuGBLvO4KlY6VfzqB4IbpWfQnTNFTASlJRixOenmNBOqBikC04rJEhpyUx01enzYnTHO6az21x5jVMo+QRA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine 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=uxwvC+57jM/uldCdd0UPveIClECdaEE0OPri1hjKvZg=; b=A3L5N4ESNkEZIKqM47sgHXIK/Z/k5N4A5JjFdzYlP3UB7uIr1vh/nfLKnLqiNSYHWduPszxJsn0AN+qM+eq2Al1DZOmWyocaMVWFVvJJvmfBbVRSTDAOvBl6i3iArh4BUKZdtD3E9JkesLrjZmqUEW5vJ/3IZ5obHil8qX0SuTXdNdG5fWT6ny1LNiJ/ffenh5iDpkJ6DjEYKxbDVqBz9zvUTAMuAmfvdDTn7G9M/VmM1jl5Jyp9MkNu4ze7uc7h12vSM/NA3FgjfOCR2i/mnvXJKyoZ+6fMx853NCQSlAIJWGJ2Dmo3DtcRuM4CBYduHBxpnpImpy2bAm0WJ2Jxog== Received: from BN1PR10CA0028.namprd10.prod.outlook.com (2603:10b6:408:e0::33) by MWHPR12MB1823.namprd12.prod.outlook.com (2603:10b6:300:112::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.20; Sun, 28 Nov 2021 15:02:12 +0000 Received: from BN8NAM11FT026.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e0:cafe::a2) by BN1PR10CA0028.outlook.office365.com (2603:10b6:408:e0::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.22 via Frontend Transport; Sun, 28 Nov 2021 15:02:11 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) 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.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT026.mail.protection.outlook.com (10.13.177.51) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4734.22 via Frontend Transport; Sun, 28 Nov 2021 15:02:11 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Sun, 28 Nov 2021 15:02:09 +0000 From: Xueming Li To: Dariusz Sosnowski CC: Luca Boccassi , Viacheslav Ovsiienko , dpdk stable Subject: patch 'net/mlx5: fix multi-segment packet wraparound' has been queued to stable release 20.11.4 Date: Sun, 28 Nov 2021 22:54:12 +0800 Message-ID: <20211128145423.3974892-69-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211128145423.3974892-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> <20211128145423.3974892-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 83d313c7-df57-4c79-5464-08d9b2800e7c X-MS-TrafficTypeDiagnostic: MWHPR12MB1823: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uRxppP3y7lzb2vGlcrnthCJQIZJ50ZdovBpvOH4vHTr73dzds8S8or5bqWPaR6yLebDLm87RTrxXnQYKfC90gwa2js9xFW+Wx6O6KUV0Ub6TznCS9mR41Lkx2SjpA7yJckkJKC0iAm5Kz5d8Y/Mv6Sn8sWDctYjzw25tdIJR1V0zUq72KVgDEIvB7+tVSnP4olMzozI6KLfM5h0nJfyGdDSTSHGNqxlJR6Kl6kbtusWvV+PCOwM9n6dcAtORbKj2YggdN+k05Np8qKPQ6FnMi4enDNslEMuXZ5WH1RE3elyjAPoyCmjNV50ccKXbPhJOhnBhWwHK6WlZHFzcmKHPyFVRsXbvG4fYY1xYw/cy01WTYv1fzz5q4y8j1M8rTX6c7Dxs9CzI544Qi4fhG5wlUvbtqu1c2ymUXOtKKoxg3I1QxWLN41dxA7FrMdS/Cw5f7q/A9PhlTCC2eqbcpa0Jtcc+/cw/6STg3MgGVSIpQDSgD2ZjsFu5rP/3C2PuCrnHlFA3rwQnjdz6TrKkkjO8g+8vusOyIcp67NlAT1CW5BNg+ArColh7QshraxMg6BJs9JRsy4fanN8LgpoyRrQs++KtsKPN2m3zARCoFaMFEjGi8noUI/1narzeB8o2sevvdUUMwJDxSmfstiYX9G4IONgpQKQsRt8OWH7gA938D2fwmeAko7q/k0m9qiNa4BdSOuBaUWmzrgjYWwzBiwh0peSPptc59/IgBAeyGLvqUhenCMbvlUSGzkRASam/NWF5+dnS+2Kh+a9K/HWpiLtUmaVpp2SmI3z+opgXFjus3hav2GcSqMbXv88VstnQmqsbqdczcO4BDFwK0w/FO/IJVQ== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(83380400001)(6862004)(6636002)(8676002)(26005)(54906003)(6666004)(7696005)(186003)(6286002)(16526019)(1076003)(82310400004)(55016003)(86362001)(37006003)(508600001)(356005)(7636003)(426003)(5660300002)(336012)(316002)(2906002)(4001150100001)(4326008)(8936002)(36756003)(966005)(53546011)(2616005)(70206006)(70586007)(36860700001)(47076005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2021 15:02:11.6513 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 83d313c7-df57-4c79-5464-08d9b2800e7c X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT026.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1823 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 20.11.4 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/30/21. 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/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/d2291cc9998f381214141f1a16fa60e7ff2b020a Thanks. Xueming Li --- >From d2291cc9998f381214141f1a16fa60e7ff2b020a Mon Sep 17 00:00:00 2001 From: Dariusz Sosnowski Date: Tue, 23 Nov 2021 15:57:40 +0200 Subject: [PATCH] net/mlx5: fix multi-segment packet wraparound Cc: Xueming Li [ upstream commit fa4883456d86fef8364e6dd90c57f134f28d46bf ] This patch fixes the assertion failure triggered when the user configured minimum inline length requirements and the application transmitted multi segment packets. Failure was triggered when space left in TX queue was not enough to cover this requirement. This patch limits the length of data to be copied to the available space in TX queue. Fixes: cacb44a09962 ("net/mlx5: add no-inline Tx flag") Signed-off-by: Dariusz Sosnowski Acked-by: Viacheslav Ovsiienko --- drivers/net/mlx5/mlx5_rxtx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index 97e0995c66..5012f2a74f 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -2584,7 +2584,6 @@ mlx5_tx_mseg_memcpy(uint8_t *pdst, uint8_t *psrc; MLX5_ASSERT(len); - MLX5_ASSERT(must <= len); do { /* Allow zero length packets, must check first. */ dlen = rte_pktmbuf_data_len(loc->mbuf); @@ -2611,9 +2610,11 @@ mlx5_tx_mseg_memcpy(uint8_t *pdst, if (diff <= rte_pktmbuf_data_len(loc->mbuf)) { /* * Copy only the minimal required - * part of the data buffer. + * part of the data buffer. Limit amount + * of data to be copied to the length of + * available space. */ - len = diff; + len = RTE_MIN(len, diff); } } continue; -- 2.34.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-28 22:41:06.695670432 +0800 +++ 0068-net-mlx5-fix-multi-segment-packet-wraparound.patch 2021-11-28 22:41:03.423539109 +0800 @@ -1 +1 @@ -From fa4883456d86fef8364e6dd90c57f134f28d46bf Mon Sep 17 00:00:00 2001 +From d2291cc9998f381214141f1a16fa60e7ff2b020a Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit fa4883456d86fef8364e6dd90c57f134f28d46bf ] @@ -15 +17,0 @@ -Cc: stable@dpdk.org @@ -20 +22 @@ - drivers/net/mlx5/mlx5_tx.h | 7 ++++--- + drivers/net/mlx5/mlx5_rxtx.c | 7 ++++--- @@ -23,5 +25,5 @@ -diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h -index bc629983fa..099e72935a 100644 ---- a/drivers/net/mlx5/mlx5_tx.h -+++ b/drivers/net/mlx5/mlx5_tx.h -@@ -1071,7 +1071,6 @@ mlx5_tx_mseg_memcpy(uint8_t *pdst, +diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c +index 97e0995c66..5012f2a74f 100644 +--- a/drivers/net/mlx5/mlx5_rxtx.c ++++ b/drivers/net/mlx5/mlx5_rxtx.c +@@ -2584,7 +2584,6 @@ mlx5_tx_mseg_memcpy(uint8_t *pdst, @@ -35 +37 @@ -@@ -1098,9 +1097,11 @@ mlx5_tx_mseg_memcpy(uint8_t *pdst, +@@ -2611,9 +2610,11 @@ mlx5_tx_mseg_memcpy(uint8_t *pdst,