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 9637243E57 for ; Sat, 13 Apr 2024 14:57:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9223E40E68; Sat, 13 Apr 2024 14:57:55 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2051.outbound.protection.outlook.com [40.107.236.51]) by mails.dpdk.org (Postfix) with ESMTP id DBD8E400D6 for ; Sat, 13 Apr 2024 14:57:52 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WubbATWSyiOwpZ/RCResT478LW/f5k1n/nHTDpelvtiCaAJEhqya/iJISZWEr7P4xWidehze+CI4S4L7PUFObpVr4Rl2KB9vbKOVjuydby28VG2YJe5YaX+TdoXJTBJzwUpjJvGWCHbduGQWEOtApqYNY3v+XPTuvIrXf+duGMViPfL/3cNtdh/4Uam1oz5nHkCNOkojSwS/6vIH5ilyBvI4W733ACLzZtl5guRyk5yoMykrdsrI+s6G0VBRM95hpGXcyCteBg/bNrZVeL7vpHuKldOC3BTtKa5ABAAwSzdPeKLk4CeGKnNICfq62N6EF3/dYH9OakJQXZmPWjLsXA== 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=A09spO2NS0Zzir8OkYsyIzwuE7/8NoYaNMwreq3buSY=; b=gsRvMDgwZhVC2ao+YEIxM2AfNnRx9shhwPvJKC59XvlH9RKLIcJG7mP24lWW//hx/PT8JICihr6cdLgXZly+oKjUJESs/3uwD4wqD+Wgk0P6hk86hOl4xHABZe7fIrr6Fm2FBwPeyu76Sd5wp2/r5Pk39Db3ky/ojJ6kCjnK+O/xQ6OdjjRHLPUXALdN2xTCeOsmTHFDYlKWP7019cmxcE37k6pqvQwH4UNcxnx1ybsS19BtrrktY/ynAZ/6gJjb7o79MTrQqN7MwPTntL+keUFniZNExqpV/E1DaeUBq/h6f5lA2UJx+KmuSABaa/vddiUj7W9yPig+g8Qsp2hu2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=amazon.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=A09spO2NS0Zzir8OkYsyIzwuE7/8NoYaNMwreq3buSY=; b=UbRC8NqR8vVBEmx1JrsGKNFzItb+63OtNliHFpaLA55nOwEe1fyecDO6TzVvlB/q9XKmehrsY3YyOokI3lHnUvhaKO4vLSewGd8LYT0zr6uINo3XdCWwhaEQ0PnDlFIoPcd8iaJYaJlW+DjtrM+kjXXgf3tUGEx3rGJ2pvOfSoDJyFhP587zFZRfJ41VZTBKaseAVL1DEmZD4gzWJipuZe/a18qlqzIPvecRAQ3vCQFhrpF/OYRJJ+M8TRp60bGv1NzFsPj5ij62qfxepXJ+D/oh9/yfO43FzqW7v6q8ppY3e+GL+UPXyihOxBndekRfk3fV5qfsSdXdSnb0FSEWDA== Received: from CH0P221CA0011.NAMP221.PROD.OUTLOOK.COM (2603:10b6:610:11c::28) by CH3PR12MB9147.namprd12.prod.outlook.com (2603:10b6:610:19a::9) 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:57:50 +0000 Received: from DS3PEPF0000C380.namprd04.prod.outlook.com (2603:10b6:610:11c:cafe::c3) by CH0P221CA0011.outlook.office365.com (2603:10b6:610:11c::28) 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:57:50 +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 DS3PEPF0000C380.mail.protection.outlook.com (10.167.23.10) 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:57:50 +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:57:41 -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:57:39 -0700 From: Xueming Li To: Shai Brandes CC: Amit Bernstein , dpdk stable Subject: patch 'net/ena/base: restructure interrupt handling' has been queued to stable release 23.11.1 Date: Sat, 13 Apr 2024 20:49:25 +0800 Message-ID: <20240413125005.725659-85-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: DS3PEPF0000C380:EE_|CH3PR12MB9147:EE_ X-MS-Office365-Filtering-Correlation-Id: e16a584e-41f2-4d6e-16a6-08dc5bb95367 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BRwjs7GiaLcSP6e8ZHrSLohKd4dxFWA1SNbD+XNf5PL2yQ8WI5Ta/eSSmW6Da5n4SVy11lR0lB/Nlx/SDcVEFlFUTUbFEOHtjSXQfwMlGZ3n+1EMxPDrVeGSP1ZXW7lGMe9y+ds7fBSV+efUa8kydgCNqKOim2AIpYtg+GbIapR0NHM+S04zcp7aoHrwrjDTT4MsIWWzeO31qXBlhOF+n2/mp9TZUZ5eu9UVFnZk8i9mygo/Kc/dD1tbDUEj84/iw2hJvgZeddZObOxRk3bP5lIsPCiBolvFfhUaxOH2lrR6mCOu+ATa++Pkz37kUCiJk1NlIIOOJV3a9xpAL0MRsU0gtpXIN5Ny5l3LCN6jTPHuRorgt1AVFwKhbfZYZq6SciDsPCh1v2t+3Z2eO79FwLVTeBY/Uo9JCypwhN+/tpUViXuPJMydCBRtnZzVxwsqqk6xUQ0NoTj2k+xSdv7gYsbzNs+oYtJ1gvf6MumJ1w0bWzQJIZasuZ3d8ZnkWQi79lHt1Y2c55UbT07Al5dD3YPOQUPHXO6fVKnyoGjmiIXGNRrCLG/a6o/9Hb6GxenCylrVGxjsJqm9dvc+KSoAgrnK+hf9tJx8G0BgmjOjFtuWWdu+HJ2Cc3CzrPjq/knvEwEUI3ooInqoEQ4u5xFoZUMqDXf5oiv/b4x08phz80tsTtpiyZIsJEWuxa5ymb0chowGZiNc3vJnk7RYXUrN9n8R/b4Htc6ZPLDp3ZRScGYuN5AYH/CcNd/oQ92Zqa0F 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)(376005)(1800799015)(82310400014)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Apr 2024 12:57:50.4547 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e16a584e-41f2-4d6e-16a6-08dc5bb95367 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: DS3PEPF0000C380.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB9147 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=aa850bad00f408ad4d680023dd8c952e062606b1 Thanks. Xueming Li --- >From aa850bad00f408ad4d680023dd8c952e062606b1 Mon Sep 17 00:00:00 2001 From: Shai Brandes Date: Tue, 12 Mar 2024 20:07:00 +0200 Subject: [PATCH] net/ena/base: restructure interrupt handling Cc: Xueming Li [ upstream commit 553653ccc18c1ed9fb0406e1b0130e945d5ab30f ] When invoking an admin command, in interrupt mode, if the interrupt is received after timeout and also after the calling function finished running, the response will be written into a memory that is no longer valid. Fixes: 99ecfbf845b3 ("ena: import communication layer") Signed-off-by: Shai Brandes Reviewed-by: Amit Bernstein --- drivers/net/ena/base/ena_com.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c index 31c37b0ab3..57ccde9545 100644 --- a/drivers/net/ena/base/ena_com.c +++ b/drivers/net/ena/base/ena_com.c @@ -179,6 +179,7 @@ static int ena_com_admin_init_aenq(struct ena_com_dev *ena_dev, static void comp_ctxt_release(struct ena_com_admin_queue *queue, struct ena_comp_ctx *comp_ctx) { + comp_ctx->user_cqe = NULL; comp_ctx->occupied = false; ATOMIC32_DEC(&queue->outstanding_cmds); } @@ -472,6 +473,9 @@ static void ena_com_handle_single_admin_completion(struct ena_com_admin_queue *a return; } + if (!comp_ctx->occupied) + return; + comp_ctx->status = ENA_CMD_COMPLETED; comp_ctx->comp_status = cqe->acq_common_descriptor.status; -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-04-13 20:43:07.600492132 +0800 +++ 0085-net-ena-base-restructure-interrupt-handling.patch 2024-04-13 20:43:05.037753879 +0800 @@ -1 +1 @@ -From 553653ccc18c1ed9fb0406e1b0130e945d5ab30f Mon Sep 17 00:00:00 2001 +From aa850bad00f408ad4d680023dd8c952e062606b1 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 553653ccc18c1ed9fb0406e1b0130e945d5ab30f ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org @@ -21 +23 @@ -index fb3ad27d0a..a0c88b1a0e 100644 +index 31c37b0ab3..57ccde9545 100644 @@ -24 +26 @@ -@@ -181,6 +181,7 @@ static int ena_com_admin_init_aenq(struct ena_com_dev *ena_dev, +@@ -179,6 +179,7 @@ static int ena_com_admin_init_aenq(struct ena_com_dev *ena_dev, @@ -32 +34 @@ -@@ -474,6 +475,9 @@ static void ena_com_handle_single_admin_completion(struct ena_com_admin_queue *a +@@ -472,6 +473,9 @@ static void ena_com_handle_single_admin_completion(struct ena_com_admin_queue *a