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 44DE9433D8 for ; Mon, 11 Dec 2023 11:21:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3D00642D99; Mon, 11 Dec 2023 11:21:08 +0100 (CET) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2060.outbound.protection.outlook.com [40.107.100.60]) by mails.dpdk.org (Postfix) with ESMTP id 0583040E0F for ; Mon, 11 Dec 2023 11:21:07 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Jdn7z34CDoSxrqOvcRVIbJreXGRvGC2jPVxzBzqK9MzyWI5/10aNW+vI1Og3IzUZUoaXfD3u+3pLTBpM9pZcqbU30tU2L9iy23Trfxf0zhGuzhjfq9afkLRSwwkmexkKoWaTR8KVRTk6PSr0JFiGrjxcCmm2SnjjD7KBvkP7PiIZ0QtkIp5fLcb8EIrEXJOQdmYrZOeS+8b6skrUYjE0nxD+ZoKsuJs7BLKrMuagFmaGo8R+CxZxzMp5ZQ+WZDYp+bBZoElFJn1vf4UOFNGpjpdX215ZlBO/tDKsPKOlZnR32yae7K0HB0oWSJsiiFW851zRvweUDgv37MET80PKpw== 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=LJNL3rh+MBJn4UNYcHUDdfhHkLoZ1NMQAeMXi0xRzbM=; b=dSL52ZcldGh8nge9YQ1EPDsAdNojr08UpGN3f4eyUAf+DYpGbgFxJWKeQlJgk0odNXd2xU1FYKi9v5Y+mB2H+PQNpjSbzjc+e7sHfveGHiiifUkhmDOpqyubqlvoK4XY41GFYQJnZbGC5+7jmw+zrDJnlGBEK5co71no1/WVJayc6C7O8xXyE9t3vDQ1Do+N06S53XX0+6k/pLiGBFNnp/labTGVpiTDSD6Xv8f9RTvIDIrcasE/00+nqKA65+tkWxTxyLBjYM9xTywqHVmxJCPZliN9YZbY8KD0POIYpYnSjnSHXmrN/hiJcDwibNE6BXOvXNM4HdPb9+OH6rcGdA== 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=LJNL3rh+MBJn4UNYcHUDdfhHkLoZ1NMQAeMXi0xRzbM=; b=O2QPd+F5iyyDmmLU4BadKfuV7g41A2lelHs1mb6oMpB9xk6R0PoK03K0NzP6/2uXQuG0LuwdvVJ6AtBtrpslBSqr2RGCJzfMXV+NZeKPbRrPa8VKJJubGxPo17Wszw1GJHdMP67swIAJQf7rydYhmp42ck/NkRRUKohPGS3otoUw6an5evtWgN8R236WaxFbdBUwEsQMCky3fxwc6h3XI6C5DubzQQlFlh9PkuyC3dlvyznEn5lt5u9hcaFKTTy0ldQY+qMh258dZMEP5WOg8ygYe6aomXsyZ1HihkqHWxtCDFjy/nqpwhjYJfD9hBG08CC4OcIOsd//VTlRse7Eqw== Received: from SA9PR13CA0054.namprd13.prod.outlook.com (2603:10b6:806:22::29) by DS0PR12MB7745.namprd12.prod.outlook.com (2603:10b6:8:13c::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.32; Mon, 11 Dec 2023 10:21:04 +0000 Received: from SN1PEPF0002529D.namprd05.prod.outlook.com (2603:10b6:806:22:cafe::ed) by SA9PR13CA0054.outlook.office365.com (2603:10b6:806:22::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.21 via Frontend Transport; Mon, 11 Dec 2023 10:21:04 +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 SN1PEPF0002529D.mail.protection.outlook.com (10.167.242.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.18 via Frontend Transport; Mon, 11 Dec 2023 10:21:04 +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; Mon, 11 Dec 2023 02:20:51 -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.986.41; Mon, 11 Dec 2023 02:20:49 -0800 From: Xueming Li To: Viacheslav Ovsiienko CC: Suanming Mou , dpdk stable Subject: patch 'net/mlx5: fix multi-segment Tx inline data length' has been queued to stable release 22.11.4 Date: Mon, 11 Dec 2023 18:11:57 +0800 Message-ID: <20231211101226.2122-93-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231211101226.2122-1-xuemingl@nvidia.com> References: <20231022142250.10324-1-xuemingl@nvidia.com> <20231211101226.2122-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: SN1PEPF0002529D:EE_|DS0PR12MB7745:EE_ X-MS-Office365-Filtering-Correlation-Id: 830186bd-5d9b-47c6-bb08-08dbfa32e1bd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Y2pT51llfCajdMIzjYacYNGbGFGQcyzeKbHwVRLe2JG1cN8RmFfvR4JcEMmYoFRdRWyY0oV6OF1/TEc/ubV7SjLSUH02kbD0NmzWhSGR78vcSwSeWFAhcGRGWquXGKUU9hfZD3MOd+X68W+PJrTKvZ6rz1X2XK0QVQtWaHc97FVQOew0tmlSjUFxdKTcCzjvlWlK1ugIY46s/ASWklPej03QEZXyikHBF5NoLoShQ15nstNq2NOOSkM2n1efrP/f5/A7XnaCYDmzaSiv+dlqbrsCs7vlepeMsEani74x3lZEvLOBeK821LfQXEAfVITPoe5/Lk+XQvopen+XpX1KaOEdpGHcWnQ6aF3d2qsVvLt45gYDfcjdNffqGFjPSjfvSsc5DruNpy3P6v7M6dSx8waiQhJ2kMrtNGPioQh2Ir0QpMdcifskEmzSYcwWVXuEYE3aft9W/DfRDIyecRjTrWNfzRMPMM16LwFm+nNrUMP6/8hVIXR9px2sVRM9rMclvmMd2KOp2WbE0jXfghanAEnO8n8sbFueRgirxBp9AW2Z461/85IwjiOgWdL4/kLPVDYhkNiNwhleW7uEyjuiusc0MPNGitnliFBCEM+FZsTH5Anm3esZ5XY1zauv/5nTu6c6R/MtDzIsJyk8b9AGllAd6mzziv4unt569bR4fkYAuC77ntw2jSsNmN5/LsytEPvvk3Bbrfl6tGv6uuYUt0E5Ezfj3QobpkPAO2e0vbjU4O+wd8wWDaqGzGL5zcZwkxalr3W/CS1q8OMLOyTxFiSY2UT7JYGVi2As9QW24X4= 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)(4636009)(136003)(346002)(39860400002)(376002)(396003)(230922051799003)(64100799003)(451199024)(82310400011)(1800799012)(186009)(36840700001)(40470700004)(46966006)(55016003)(40480700001)(41300700001)(4001150100001)(40460700003)(2906002)(5660300002)(316002)(6636002)(6862004)(4326008)(8936002)(8676002)(70586007)(54906003)(70206006)(37006003)(356005)(82740400003)(7636003)(2616005)(86362001)(36756003)(36860700001)(47076005)(966005)(83380400001)(426003)(26005)(478600001)(6666004)(6286002)(336012)(1076003)(16526019)(7696005)(53546011); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2023 10:21:04.4267 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 830186bd-5d9b-47c6-bb08-08dbfa32e1bd 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: SN1PEPF0002529D.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7745 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 22.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 12/13/23. 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=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=4699a174eaacf1efbc2eb48e189ceed232797c97 Thanks. Xueming Li --- >From 4699a174eaacf1efbc2eb48e189ceed232797c97 Mon Sep 17 00:00:00 2001 From: Viacheslav Ovsiienko Date: Fri, 10 Nov 2023 11:49:38 +0200 Subject: [PATCH] net/mlx5: fix multi-segment Tx inline data length Cc: Xueming Li [ upstream commit e3c7bb56b4583ccb1304219f52639d898727e65d ] If packet data length exceeds the configured limit for packet to be inlined in the queue descriptor the driver checks if hardware requires to do minimal data inline or the VLAN insertion offload is requested and not supported in hardware (that means we have to do VLAN insertion in software with inline data). Then driver scans the mbuf chain to find the minimal segment amount to satisfy the data needed for minimal inline. There was incorrect first segment inline data length calculation with missing VLAN header being inserted, that could lead to the segmentation fault in the mbuf chain scanning, for example for the packets: packet: mbuf0 pkt_len = 288, data_len = 156 mbuf1 pkt_len = 132, data_len = 132 txq->inlen_send = 290 The driver was trying to reach the inlen_send inline data length with missing VLAN header length added and was running out of the mbuf chain (there were just not enough data in the packet to satisfy the criteria). Fixes: 18a1c20044c0 ("net/mlx5: implement Tx burst template") Fixes: ec837ad0fc7c ("net/mlx5: fix multi-segment inline for the first segments") Signed-off-by: Viacheslav Ovsiienko Acked-by: Suanming Mou --- drivers/net/mlx5/mlx5_tx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_tx.h b/drivers/net/mlx5/mlx5_tx.h index a056be7ca8..ff23d87b8a 100644 --- a/drivers/net/mlx5/mlx5_tx.h +++ b/drivers/net/mlx5/mlx5_tx.h @@ -1975,7 +1975,7 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq, uintptr_t start; mbuf = loc->mbuf; - nxlen = rte_pktmbuf_data_len(mbuf); + nxlen = rte_pktmbuf_data_len(mbuf) + vlan; /* * Packet length exceeds the allowed inline data length, * check whether the minimal inlining is required. -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-12-11 17:56:26.076764800 +0800 +++ 0092-net-mlx5-fix-multi-segment-Tx-inline-data-length.patch 2023-12-11 17:56:23.197652300 +0800 @@ -1 +1 @@ -From e3c7bb56b4583ccb1304219f52639d898727e65d Mon Sep 17 00:00:00 2001 +From 4699a174eaacf1efbc2eb48e189ceed232797c97 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit e3c7bb56b4583ccb1304219f52639d898727e65d ] @@ -32 +34,0 @@ -Cc: stable@dpdk.org @@ -41 +43 @@ -index 264cc192dc..e59ce37667 100644 +index a056be7ca8..ff23d87b8a 100644 @@ -44 +46 @@ -@@ -2046,7 +2046,7 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq, +@@ -1975,7 +1975,7 @@ mlx5_tx_packet_multi_inline(struct mlx5_txq_data *__rte_restrict txq,