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 02FED45E41 for ; Sat, 7 Dec 2024 09:08:45 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EBF9A40281; Sat, 7 Dec 2024 09:08:44 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2069.outbound.protection.outlook.com [40.107.244.69]) by mails.dpdk.org (Postfix) with ESMTP id 90E4B40281 for ; Sat, 7 Dec 2024 09:08:42 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GEFGDOjjbXkgqAs7/45eivL600LCS4vGamcX8me9xH5b7DnoIs6EA6Jx2CLzZbz5UvgYLWrLbWbGkzCsMNHEK6Xoe6nSLDdhguItRp4lcDrBul02H//1sAx4QPseDgL2lnTHkBla+8t1VlZQOCNaQphGGyjQxZFaWdvCvJ/4A2iSY7EGHqzoXh8K0vDtFszKKBT+Q4vUZ2V3SRYwtsyPrDUGsHYCRLri9x09cwv1O0pel8YXUo7ZzO4XIC8/ZF/T3hxGtrcKr/n9UuYNUJ5hDQw5nAlLa3VsmSdpnysC0dyG9MOEfgfNgt9V8zuVfH6MPY6RGnhe4aqrHVmJNeaqHw== 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=WcM2DCF3yCIMdA4sf9UPj4FHOcXmsqquDuOEyjmDHD0=; b=hQUawqsn2ucLRdz2YRdRbx8Unl9gMQXTj7mnjO3Wxe2Ity8V0TWLInmuYaZwmHHQYcIlr/fEclSg2W21rDpPHnkU3beQ2lfvSfAMpMHjL57stvuAh5hMg186wP9Bklrw8BSpSnmqv5K6MUmLmlf8pnxsduNgUM8i+jjGBF5+pOkjlcOXhdf5/IpnnrC4Ukixv/P/TkZ6AZaB6EEkWb3xD4rbxSFqRHrfIkRhmlJewOEDYARmuuN8J888T8tiSKvqlmiVLB+w3vhALZtK/yT5lMudedUPXntholwO3EHaW1GacZLm+TfuwlqDCDlz8iQFJkghQRh1FgJ2z4zQyiDQoQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=intel.com 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=WcM2DCF3yCIMdA4sf9UPj4FHOcXmsqquDuOEyjmDHD0=; b=tHDi0fTSJ8d62/Hp+PKlYDUBAJTDiCFqgqnJRIp6mfsLiZX8zBGRlwo4IrDvIJmctIXAton1Tuj+E+opld0OgHcCEM06vwCCFjH2utm2iVdlzY4Pe0rUCD3nedVHj2QuMyL4ptErCMNzGDlKp4KIg1DaibuVM25rPv4hg9E3dmqvqyqv72BWHT0fjza5k0Wm+XbWsm7x9VSDMUdtpdd2QXM5kguvtECuMshnVs5hpr9y/E6m5Y08sKtTVALya5lLPPU8t7e8csLRg5iEHzePe9nQnA3oByqlJbWDdsBL37ZSzh+vLElLcdcmCAdreCWs7w+wLG8Q10FsBTsZZtmB/Q== Received: from BN9P220CA0023.NAMP220.PROD.OUTLOOK.COM (2603:10b6:408:13e::28) by DS7PR12MB5864.namprd12.prod.outlook.com (2603:10b6:8:7b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.18; Sat, 7 Dec 2024 08:08:35 +0000 Received: from BL02EPF00021F6B.namprd02.prod.outlook.com (2603:10b6:408:13e:cafe::cb) by BN9P220CA0023.outlook.office365.com (2603:10b6:408:13e::28) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8230.12 via Frontend Transport; Sat, 7 Dec 2024 08:08:35 +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 BL02EPF00021F6B.mail.protection.outlook.com (10.167.249.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.7 via Frontend Transport; Sat, 7 Dec 2024 08:08:34 +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.1544.4; Sat, 7 Dec 2024 00:08:23 -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.1544.4; Sat, 7 Dec 2024 00:08:21 -0800 From: Xueming Li To: Bruce Richardson CC: Xueming Li , Padraig Connolly , Vladimir Medvedkin , dpdk stable Subject: patch 'net/iavf: add segment-length check to Tx prep' has been queued to stable release 23.11.3 Date: Sat, 7 Dec 2024 16:00:35 +0800 Message-ID: <20241207080055.488538-78-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241207080055.488538-1-xuemingl@nvidia.com> References: <20241111062847.216344-122-xuemingl@nvidia.com> <20241207080055.488538-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: BL02EPF00021F6B:EE_|DS7PR12MB5864:EE_ X-MS-Office365-Filtering-Correlation-Id: 32a01fc4-34cc-4f57-1520-08dd169658fe X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|376014|1800799024|36860700013|7053199007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?stVaksQPoOAYORG2mWM35NCIjz/xyVF25/QMVPM1Uf9vtfW2MSZjxGaTo/OV?= =?us-ascii?Q?6lOTenSDLT9Xe81iaPjbV/f7JoyePddbB/jO2nb1lgzZtnEIB93eLB+lXYQS?= =?us-ascii?Q?/nGM0lRKINmY4hG0uQ2ZzuLrN1oJnMSjzIF7BUEZvPtexfl8JIw7wqtLs1T5?= =?us-ascii?Q?nxzCt4pbuUzBoG1omGBcs9Ly6p1BHMkTgRJSkBV8fbhNL4lREyz+HE34S+wM?= =?us-ascii?Q?MJ0RMC/CO/jNj3dGtO65xzaO9liaXzEwBISuYrendcbY7Lppfp846rEsxiFd?= =?us-ascii?Q?BsDrvmZLzPqosdnxmPAAyEw4FeueDM58rrfFZ6do+3PzF5oP0ODqTybj2Iuk?= =?us-ascii?Q?16G7Mu+AAzRHW358WqKcmog7QLaXO9qlYJsvBxoi4ZXK3Mx1Gh4EiTLZMIkY?= =?us-ascii?Q?YWtmdAEnLeN5A2Zsyi4HkdmrrUaYOgkiDQOtbwKlWkW3LFApaJTh4v+DQ0Tb?= =?us-ascii?Q?stPiXI1bKCDbmBUzZXIMYfSk3DUzgE0qcyt7GDR2HthcC6bK7QIk5Cd2Qkap?= =?us-asc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EwbhQ7npR?= =?us-ascii?Q?S+A0ijR6hSV4wZzndbr7acmnaCr13nK4?= 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:(13230040)(82310400026)(376014)(1800799024)(36860700013)(7053199007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2024 08:08:34.8711 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 32a01fc4-34cc-4f57-1520-08dd169658fe 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: BL02EPF00021F6B.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB5864 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.3 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/10/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=ef3dab691fbfae50f5f9ead05f4f6e2503d1c386 Thanks. Xueming Li --- >From ef3dab691fbfae50f5f9ead05f4f6e2503d1c386 Mon Sep 17 00:00:00 2001 From: Bruce Richardson Date: Mon, 11 Nov 2024 16:42:20 +0000 Subject: [PATCH] net/iavf: add segment-length check to Tx prep Cc: Xueming Li [ upstream commit 4523e0753b243066357f98fd9739fde72605d0fb ] In the Tx prep function, the metadata checks were only checking the packet length and ignoring the data length. For single-buffer packets we can quickly check that the data length is the packet length. Fixes: 19ee91c6bd9a ("net/iavf: check illegal packet sizes") Reported-by: Padraig Connolly Signed-off-by: Bruce Richardson Acked-by: Vladimir Medvedkin Tested-by: Padraig Connolly --- drivers/net/iavf/iavf_rxtx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index ec0dffa30e..5fbc581b95 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -3668,7 +3668,11 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, return i; } - if (m->pkt_len < IAVF_TX_MIN_PKT_LEN) { + /* valid packets are greater than min size, and single-buffer pkts + * must have data_len == pkt_len + */ + if (m->pkt_len < IAVF_TX_MIN_PKT_LEN || + (m->nb_segs == 1 && m->data_len != m->pkt_len)) { rte_errno = EINVAL; return i; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-12-06 23:26:46.679573103 +0800 +++ 0077-net-iavf-add-segment-length-check-to-Tx-prep.patch 2024-12-06 23:26:44.083044826 +0800 @@ -1 +1 @@ -From 4523e0753b243066357f98fd9739fde72605d0fb Mon Sep 17 00:00:00 2001 +From ef3dab691fbfae50f5f9ead05f4f6e2503d1c386 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 4523e0753b243066357f98fd9739fde72605d0fb ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org @@ -22 +24 @@ -index 4850b9e381..6a093c6746 100644 +index ec0dffa30e..5fbc581b95 100644 @@ -25 +27 @@ -@@ -3677,7 +3677,11 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, +@@ -3668,7 +3668,11 @@ iavf_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,