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 9D1CA43A1B; Wed, 7 Feb 2024 03:20:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 776E842DEA; Wed, 7 Feb 2024 03:20:06 +0100 (CET) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2060.outbound.protection.outlook.com [40.107.223.60]) by mails.dpdk.org (Postfix) with ESMTP id A123F42D91 for ; Wed, 7 Feb 2024 03:19:59 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=akG67OpSk0OoSoo3uRka0YrXXyefenLvQBX7lpznm/YRsXdaOJiZUMgRQOPJ2aDZ72O7HYMvmEfoxJB1aN1BgzL6i/Zog68H7tPheNmpgEVNF1zK7KNDkpJN/o4KsnrPFL/jhrE0t9lw+i9NEQGHzmDuGll4g82SF3gHfgBJ9ksdp75u8T2lb/CYD8ixuLyOFdPsd48mLc1YNtrRDO5+k4VLT8EclGz1R5FrftHh3e+gtMYqsWuLrhWz/zWISqpFrRBGkKjXnQPltepOnjpLfl/PSv3Nf6p2SSkNpguIGFmq1DakqgR8b9Ex21QT/lffktjGrTq0+/Thzbg9HR+7jA== 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=5J3092k9T17Wa49OVwS9Nv2UbOxevuyZkdD+SgnvS44=; b=fmbjrvUUhmwxfMWzdSc8cOsVWkm7lAfHaZezS9GNnqqblggqo4d62XTh2KVKF7XirpQX0G1cSV5SPwyqhS6NSkP5xx8cMbViZiBGishNrxQvyL26bU2Sg2qzAPy+ZBbVKpwqZx2dY98fiXQeCRoK5HpoE2YgyKdMulBVebsZdVu490FmEt6Qk1/2PnsVfs/FIT5JDiW8sa8AzxkJvSlx9PnYk+agswR+V69HDgckjXogGeMDmG14oo0xq8bbkgYUZ3EZyNmoBqGJwY14vVKAZG8Xi5PmJgXOj5o2Wg7oalglDjnzafRISxPPgZGx9Iw6hSh+BxZk1RNLkEFh9uk+Rw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=dpdk.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5J3092k9T17Wa49OVwS9Nv2UbOxevuyZkdD+SgnvS44=; b=nlJNK13HWIVUZ5BISZcX3OY83opVoBtMyxccKSzVT9LzR/LSzAI+beScUwYQDenexkgCHDKB65WXUPow6sSbLAsivwARFg1nOTZNd5DaYxmXvc7K++3ZriQPUZIs+rwZCD7oDUPvDjLfLH4zqg8Ml8wj1hPlQKwBButYT6JnEdE= Received: from PR3PR09CA0015.eurprd09.prod.outlook.com (2603:10a6:102:b7::20) by IA1PR12MB8189.namprd12.prod.outlook.com (2603:10b6:208:3f0::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.16; Wed, 7 Feb 2024 02:19:57 +0000 Received: from SA2PEPF000015CC.namprd03.prod.outlook.com (2603:10a6:102:b7:cafe::af) by PR3PR09CA0015.outlook.office365.com (2603:10a6:102:b7::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.36 via Frontend Transport; Wed, 7 Feb 2024 02:19:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SA2PEPF000015CC.mail.protection.outlook.com (10.167.241.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7249.19 via Frontend Transport; Wed, 7 Feb 2024 02:19:56 +0000 Received: from driver-dev1.pensando.io (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Tue, 6 Feb 2024 20:19:50 -0600 From: Andrew Boyer To: CC: Andrew Boyer Subject: [PATCH v2 11/13] net/ionic: optimize device close operation Date: Tue, 6 Feb 2024 18:18:47 -0800 Message-ID: <20240207021849.52988-12-andrew.boyer@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240202193238.62669-1-andrew.boyer@amd.com> References: <20240202193238.62669-1-andrew.boyer@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF000015CC:EE_|IA1PR12MB8189:EE_ X-MS-Office365-Filtering-Correlation-Id: 9b888c73-959c-4db8-da4f-08dc2783471b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rO3ATrPK9Mi6ZmpFc8JXxQUiGbPajn9laYNWrykwaM974qgVgzQduhmFySLjExQYUH3+Pff8V4CETJHg5/cPrMEqhb+ouNscqck4euQLTsjuP/en3YffmHTL3UiII7G19KJZLhx0X6wKgGwdbpNlO3NOrrRwBLyYh36Kg7G5ISb9PotofJBrXDjLA+Le7gz25u5QDVCwf6mPcDgF37BGRk4m0Jir4W9z08hhu/gE+prnmzsxKLA9x40OMY6WxSbPZ4o2ekz0/ZHB+Q+9bj0Yv2sUKa7+maZAQ8aI/q2Lz3qcRYeRfc5RjOgJ0gZRIwfXq19FX+EIJ/95Xyp1Z9eY8Llr5CC4NUtF3wZlGkCVgtCjt8RIDDtVg8A+S6EUMSW4YybF2g1vzMZBKU2in6UCaN8ih782rLvbaZ5iWOc4krc296aCo+1B2lAZlpcYO5SHfoMA2xKTOxr2Q0oigDiQIV2HYTCs3cupUG8H1WGCxzaJMbjpRm+uhv8e1crFemy52hqotJyQ7jc7vSaZBkqcfkPqP56yri0yE18jzZJL4SJ07xa8eVMPU4cOYQMvPZOHQQdZq9HHDCLaYNZhwEXweGSsq+DlXGLy6NWSXvshZ53EaOOVwM0Xlznz30uaDzvmMdYwcSIjgqP0Mh4LUBpCuTw/V9O9U/k0fAWuUUoC27YunCCgytOZ0M4V70+5i5aChObJyvf9ZCqWXLZ6T+IqtPahcNtkNi3s7Lvn0229VLNPoooeLe0XSm8HsjJMvddEEa2eJQ66ToaDumL4UnXluw== X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(376002)(396003)(346002)(39860400002)(136003)(230922051799003)(64100799003)(186009)(82310400011)(451199024)(1800799012)(36840700001)(46966006)(40470700004)(2616005)(40480700001)(40460700003)(6666004)(83380400001)(1076003)(26005)(336012)(426003)(356005)(36756003)(82740400003)(86362001)(2906002)(81166007)(4326008)(5660300002)(8936002)(41300700001)(8676002)(47076005)(16526019)(44832011)(36860700001)(70586007)(316002)(6916009)(70206006)(478600001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2024 02:19:56.5099 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9b888c73-959c-4db8-da4f-08dc2783471b X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF000015CC.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8189 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Use a single device reset command to speed up dev_close(). The LIF stop and port reset commands are not needed. This reduces the outage window when restarting the process by about 2ms plus another 1ms per queue. Signed-off-by: Andrew Boyer --- drivers/net/ionic/ionic_ethdev.c | 3 --- drivers/net/ionic/ionic_lif.c | 8 +------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/net/ionic/ionic_ethdev.c b/drivers/net/ionic/ionic_ethdev.c index bedcf958e2..7e80751846 100644 --- a/drivers/net/ionic/ionic_ethdev.c +++ b/drivers/net/ionic/ionic_ethdev.c @@ -1007,13 +1007,10 @@ ionic_dev_close(struct rte_eth_dev *eth_dev) if (rte_eal_process_type() != RTE_PROC_PRIMARY) return 0; - ionic_lif_stop(lif); - IONIC_PRINT(NOTICE, "Removing device %s", eth_dev->device->name); if (adapter->intf->unconfigure_intr) (*adapter->intf->unconfigure_intr)(adapter); - ionic_port_reset(adapter); ionic_reset(adapter); ionic_lif_free_queues(lif); diff --git a/drivers/net/ionic/ionic_lif.c b/drivers/net/ionic/ionic_lif.c index 2713f8aa24..90efcc8cbb 100644 --- a/drivers/net/ionic/ionic_lif.c +++ b/drivers/net/ionic/ionic_lif.c @@ -1231,13 +1231,7 @@ ionic_lif_rss_setup(struct ionic_lif *lif) static void ionic_lif_rss_teardown(struct ionic_lif *lif) { - if (!lif->rss_ind_tbl) - return; - - if (lif->rss_ind_tbl_z) { - /* Disable RSS on the NIC */ - ionic_lif_rss_config(lif, 0x0, NULL, NULL); - + if (lif->rss_ind_tbl) { lif->rss_ind_tbl = NULL; lif->rss_ind_tbl_pa = 0; rte_memzone_free(lif->rss_ind_tbl_z); -- 2.17.1