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 C345145CE3 for ; Mon, 11 Nov 2024 07:32:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B6D0340685; Mon, 11 Nov 2024 07:32:08 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2085.outbound.protection.outlook.com [40.107.237.85]) by mails.dpdk.org (Postfix) with ESMTP id A775340E1E for ; Mon, 11 Nov 2024 07:32:06 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XHPCTZgu1R7vIg5W9IbLJdMyXhWHZO6lxz27QbSiUumd9PN9pQ2dI6O9bEEyCu05Z3i2a8vGxJkC0s0lweZDXeWxDUWwRnLE/BgZixY4Q+cn4Uj7ToDaaaL5RR2/1tMMdpoIUUsAzELznyTSR4VLb/SMAD48RSMZK2E+aT0tn1GhuHRrBCUwAwmkPWjAX3+3bgCSeDTpWcFb7LUw1KQH2vQPEolWHCNXntq/bY9KqhbBNoLbnDhgq/uoWCijxCnz/hUo+kr9Rd8wUwFp+uF8pA44nNjgOobbdmLJwbgyWGzuyax0jOfyAJ+zI5KSxu8Paz/XCfTs41Yrn7Zhp/7V1g== 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=mnudvhnapYCiuFT0ULqnNZMPf0/ZxZuJ8a5r2u06iBY=; b=MBVlChHsZ/RiVWt9tcs0XFs2+G3JMvq1wTrHYl6EUGgwxhwv55nhWb5XMb/Mc1bth62uvX3CLnDAn/BS3U6MWCehtD04NQXRJymw+Y4LmbBVUWcb2kl5WavLcBwfsoTm7QKG1y/FA6xGlcvWSyDTxu+89IlY8QMSXiRDURcak5Q4fmdMgbwJhJj0OB3uLOeQMx5L48LBIlL+FUkHb5racZJOlnTTJZudT1NOqsjfrpvxhJhnfgv8XUieWMg4lNqypVrBPFkDmJp920hID3t2y9DeEP+wdycBBucWaPIqVn6WlDb1ZAyZH1OCBhQSsdSFdWBfZ/EsH6pNtnyjt5X7vg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=networkplumber.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=mnudvhnapYCiuFT0ULqnNZMPf0/ZxZuJ8a5r2u06iBY=; b=LsFv/TrkLODMNb2ZBEvwZnoQA5gytdfOqNoetZWMnx7S1ri6JvYEB8cn55Gi5BbAcH5UzLJU2A9tPGIO42Ze+ZK528KjH1A5g+ffY0L6vdjUqube1Csel85YE/gHobWoahuBsYR6EjP3gxRnsLg9PvoUWd0aj84ON1Tpr00/+ir6Rg199W+jZ0kBzzcK0RZIFs8RvwMjeRxOPm92rH7n77APu77w3XRSrdd5NV1Nddy7fKDG+EQIadATJ6N1cP6kTsw8XR4+l+QW6xXbC9H0Ckl5R0MumHvoAdOC0ub9UhWvd8osAxEpEikctPrVuViKDINLTnknbE69cSLUjyPs2Q== Received: from DM6PR08CA0040.namprd08.prod.outlook.com (2603:10b6:5:1e0::14) by MN0PR12MB5761.namprd12.prod.outlook.com (2603:10b6:208:374::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.25; Mon, 11 Nov 2024 06:32:03 +0000 Received: from DS1PEPF00017092.namprd03.prod.outlook.com (2603:10b6:5:1e0:cafe::fd) by DM6PR08CA0040.outlook.office365.com (2603:10b6:5:1e0::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8137.27 via Frontend Transport; Mon, 11 Nov 2024 06:32:03 +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 DS1PEPF00017092.mail.protection.outlook.com (10.167.17.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.14 via Frontend Transport; Mon, 11 Nov 2024 06:32:03 +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; Sun, 10 Nov 2024 22:31:52 -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; Sun, 10 Nov 2024 22:31:49 -0800 From: Xueming Li To: Stephen Hemminger CC: , =?UTF-8?q?Morten=20Br=C3=B8rup?= , Konstantin Ananyev , Wathsala Vithanage , dpdk stable Subject: patch 'raw/ifpga: fix free function mismatch in interrupt config' has been queued to stable release 23.11.3 Date: Mon, 11 Nov 2024 14:27:12 +0800 Message-ID: <20241111062847.216344-27-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241111062847.216344-1-xuemingl@nvidia.com> References: <20241111062847.216344-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.126.231.35] 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: DS1PEPF00017092:EE_|MN0PR12MB5761:EE_ X-MS-Office365-Filtering-Correlation-Id: c48e6334-236a-4bbb-1bbd-08dd021a8e2a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|376014|82310400026; X-Microsoft-Antispam-Message-Info: =?utf-8?B?OGNPZ1BtNEpKcTFJK0VpWkF3WkYvZytaL0xUZk9KbFpCRkI0Q1ZPSzQ1NUlJ?= =?utf-8?B?YWYvMVpCUncwa1lGL25LeU4yVkhtbGljWHFZd0tCRUY2eGlrZDV3SHZzNS9r?= =?utf-8?B?VGJCeHk3L0psWm8vWUJ1YzR1SVR5dUJ0YXJEc2VIL1h3V1FVNG9nY2hDeEtU?= =?utf-8?B?bWowMTJNdlRFSTQ4NkRLWUtydXRNQlV2ai9nVlZTdWFqMWhVc3lLQkc5V1Qw?= =?utf-8?B?Yms1Tm5XRlo1WEpBZmJsa2krOUdjUFhUb1c1S1NESG95eklkNkhlb2dTMlR6?= =?utf-8?B?anROYVJkaG9XOGJqcm9nZlREbGgvdEozK01jSzArWUZSc25abEJlb2NOK2U3?= =?utf-8?B?Uzk5a2ZJbTJnNTVRL2xoMk91MkNWY1ZQMW16TnJISlROMlNQakthSHBQbktN?= =?utf-8?B?UGc5UEhuTmtodDlvTnRETWNhOWN4UGFSSEJKdGQzTjcyUVcybWFNdW1adTdH?= =?utf-8?B?cmNockcyTTdHeUVGdGg2U3FOUzdZRjdQRTNRMDkwM3ptUmFFRFNkZHhSUjc5?= =?utf-8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NS3Bq?= =?utf-8?B?QXBKSUNzQnRVRXhHcklvR0JTMjQrV0xzdlg1MDlIL1doK0kwa3YxY0Z4cWhs?= =?utf-8?B?ck1zZm5GeTNFY1lRSGhYakN1cnBsc25UN205N2tDUjcxNXI2aElGZTc4ZWlS?= =?utf-8?B?dEZXT2dsYlZWQ2l1V2UwL1JoMlA3R3RxV0VZMjM0aEE5a0xUTzEwbFMrZ1JT?= =?utf-8?B?WVZiNHRPYTNPbzY0c2I4am14N1RweDhlbXVSVExZMlJFVFBXdEw0cHFVZ0JG?= =?utf-8?B?ZlNnSkdhbXJFaVRZMlNiN2VaNDdkU09TVHovRllKZ3V2blJldVpRMEhSM3Qw?= =?utf-8?B?YmNhZmcyTXljSldyMDNrQzc1VzY5VGY2dUlaU0FTQ3BIeUFSZ2lQc3lXVk9E?= =?utf-8?B?YU15RTgxWitGYk45TzFQYjk3ZXpyYnRLREhrY0tQSWgvSHVKeWpqVXhnSSs0?= =?utf-8?B?UWVjRkRiQzFNNUxxTkJXSm9ZNzYyTVNWS09Uc0JmckRxU0E9PQ==?= 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)(1800799024)(36860700013)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2024 06:32:03.2445 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c48e6334-236a-4bbb-1bbd-08dd021a8e2a 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: DS1PEPF00017092.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB5761 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 11/30/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=a2cef42f63ee851b84e63187f31783b9f032af5f Thanks. Xueming Li --- >From a2cef42f63ee851b84e63187f31783b9f032af5f Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 8 Oct 2024 09:47:18 -0700 Subject: [PATCH] raw/ifpga: fix free function mismatch in interrupt config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Xueming Li [ upstream commit d891a597895bb65db42404440660f82092780750 ] The raw ifpga driver redefines malloc to be opae_malloc and free to be opae_free; which is a bad idea. This leads to case where interrupt efd array is allocated with calloc() and then passed to rte_free. The workaround is to allocate the array with rte_calloc() instead. Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle") Signed-off-by: Stephen Hemminger Acked-by: Morten Brørup Acked-by: Konstantin Ananyev Acked-by: Wathsala Vithanage --- drivers/raw/ifpga/ifpga_rawdev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/raw/ifpga/ifpga_rawdev.c b/drivers/raw/ifpga/ifpga_rawdev.c index 997fbf8a0d..3b4d771d1b 100644 --- a/drivers/raw/ifpga/ifpga_rawdev.c +++ b/drivers/raw/ifpga/ifpga_rawdev.c @@ -1498,7 +1498,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, nb_intr = rte_intr_nb_intr_get(*intr_handle); - intr_efds = calloc(nb_intr, sizeof(int)); + intr_efds = rte_calloc("ifpga_efds", nb_intr, sizeof(int), 0); if (!intr_efds) return -ENOMEM; @@ -1507,7 +1507,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, ret = opae_acc_set_irq(acc, vec_start, count, intr_efds); if (ret) { - free(intr_efds); + rte_free(intr_efds); return -EINVAL; } } @@ -1516,13 +1516,13 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, ret = rte_intr_callback_register(*intr_handle, handler, (void *)arg); if (ret) { - free(intr_efds); + rte_free(intr_efds); return -EINVAL; } IFPGA_RAWDEV_PMD_INFO("success register %s interrupt", name); - free(intr_efds); + rte_free(intr_efds); return 0; } -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-11-11 14:23:06.555587211 +0800 +++ 0026-raw-ifpga-fix-free-function-mismatch-in-interrupt-co.patch 2024-11-11 14:23:05.052192841 +0800 @@ -1 +1 @@ -From d891a597895bb65db42404440660f82092780750 Mon Sep 17 00:00:00 2001 +From a2cef42f63ee851b84e63187f31783b9f032af5f Mon Sep 17 00:00:00 2001 @@ -7,0 +8,3 @@ +Cc: Xueming Li + +[ upstream commit d891a597895bb65db42404440660f82092780750 ] @@ -17 +19,0 @@ -Cc: stable@dpdk.org @@ -28 +30 @@ -index 113a22b0a7..5b9b596435 100644 +index 997fbf8a0d..3b4d771d1b 100644 @@ -31 +33 @@ -@@ -1499,7 +1499,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, +@@ -1498,7 +1498,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, @@ -40 +42 @@ -@@ -1508,7 +1508,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, +@@ -1507,7 +1507,7 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, @@ -49 +51 @@ -@@ -1517,13 +1517,13 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id, +@@ -1516,13 +1516,13 @@ ifpga_register_msix_irq(struct ifpga_rawdev *dev, int port_id,