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 56CB543A2A; Wed, 7 Feb 2024 04:15:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F349A42E1C; Wed, 7 Feb 2024 04:14:34 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2040.outbound.protection.outlook.com [40.107.92.40]) by mails.dpdk.org (Postfix) with ESMTP id A19BA42DC9 for ; Wed, 7 Feb 2024 04:14:24 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EpIUIQPksY/uiFGwRplf9z2ZtupomSeceNM8V3swKmuw1qd7FyxqRBQI6MZLJj5I0ESkpLLvu07Y54XFiLzUSLGUONvVt34+7tY5sYwy2tYsbs6LfH7FYKvMr/xheuVI1AwUgOAfQ5Ev5Q8Ne+YSnCUkTpvV6EFTllTnUW0auwmfJwWE7DbwkPPDTpGgMM9tfckV0m6Vz5nkkL+dxriWYTGz8Wp7NKMP6DHLQGcOpTMxX5b7/z/bNR5lGepqts0lIUe1Q+v0wf7xv4o1GkZ9e8RR2jtxExFsEq1Q7keC9o684gnDuosvdKR9AYj2p1ZFd1JUk7vgdYAskn5crxOJKw== 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=VJ3cmrZlT19dNZTpqKUnNbGTCXo8SyjOjCf1JOqNgGMea7Xy/1YnF0otR3UA3WbFuFVYA8h4YJHoG8J8Om7lRTDqVspJQI1gQPuJz1lYPFvO1tQJQlEpuPH0+RQCIIIwsXddgkwRovwm+QXuCoMqQ65ZO4JVGH+ljLCiQ6ZOCsgOLw9XaCPcUhtIzRTEodDCoPKw04FjEavb3s0FQ1tQLsxghuJKqhfRRwG33zbfSP51irD1NcztOzvhCpn0dD58WKuq70jAGaahM0WvNoHiXkVW4AcuZ17QQ7i2AWyCZZs+Lb2SfkyntMxXzl8LHhrfLFlQ1iNbK5106IXQO+A/dA== 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=R3EUUQcCBMC5HV2//4EStyKRfCuyTJ9V0GdC2vCLhIa8I1u2Ik0eWYsttREsU+/z+IudDC2YeXN8nOBQdedk2t4Cemqi/WuScxwxcyyK9TAuibv4jCL+rh93n1QpvrC4GQLvwlOrHoWTPAs4V3DK/m9fkc5jitPIKb6KEsHvgeE= Received: from DM6PR02CA0044.namprd02.prod.outlook.com (2603:10b6:5:177::21) by IA1PR12MB6555.namprd12.prod.outlook.com (2603:10b6:208:3a1::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.17; Wed, 7 Feb 2024 03:14:22 +0000 Received: from CO1PEPF000044FB.namprd21.prod.outlook.com (2603:10b6:5:177:cafe::c7) by DM6PR02CA0044.outlook.office365.com (2603:10b6:5:177::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.37 via Frontend Transport; Wed, 7 Feb 2024 03:14:22 +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 CO1PEPF000044FB.mail.protection.outlook.com (10.167.241.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7292.0 via Frontend Transport; Wed, 7 Feb 2024 03:14:22 +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 21:14:18 -0600 From: Andrew Boyer To: CC: Andrew Boyer Subject: [PATCH v3 11/13] net/ionic: optimize device close operation Date: Tue, 6 Feb 2024 19:13:15 -0800 Message-ID: <20240207031317.32293-12-andrew.boyer@amd.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240207031317.32293-1-andrew.boyer@amd.com> References: <20240202193238.62669-1-andrew.boyer@amd.com> <20240207031317.32293-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: CO1PEPF000044FB:EE_|IA1PR12MB6555:EE_ X-MS-Office365-Filtering-Correlation-Id: 8cd84cd8-43a6-459c-c150-08dc278ae19b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xcldkd4Jmc8GjSh5+BMucguye/zS4DZ7WDXZHzxBraJk+YikMjn9c+TOk5AAXWr4LoqA0sbcbPli6pg8UIxUECKwRSyGnoFeMDECz396yCsfUAhhZzdvEpBERDYwBDWsYpEcoX0CHKvQw3yTyRBJEsGkWpR8JO/iqH3D7RxjzMlL+smZWAjSpui4oq0VozvkKOPUTiswNvikRAGWn0wnPQv6MWRHP16p0RXeCQBCFgkfvwwgN8/epZUBqkIot5qRmVM0HrJbhjxwyFp3giDOhIMWWV28dihyNKPktjkNR4XY36NSoGs56HgsQfXqbNahP/KyXtSGlollI7pTb04icKHj9dpx+XoyhiUYpIHbx9o4Th6C4bNz7RuKUCbCUns51FIiqZiBLc3maewp47dXvyl0Uwwwf1g/Xyd8dPzXlanJKPv/VRQqLNMOyAtnzGyY1nvPehj8+E+hetKJq9i06RRI1FGa6vlHz3mb8T3zew2ZcWQ/TgjtWkU25TXtr76jx1cvEIfQyhdxdYpJOApTIIDR5rZVhfMjgOcCz3yVqmcn9yMIpOSXxizzJU1yl+3yaILoIRWYv0DgVR8YQmPJXX/+TSG3SJ5+xDpwSTrP8MSgfYzvjDJiV6mFaMnnvQdooSImSUqb5eZA4IbYaxTAiC0nFfcPlxaHsKuDRJ4zTml7aZhaPX5r/yoPYVA39uYAGy5FKTT0eRk/0u00m+ZN2EFZE+qBTmCvSQap4Nw4tNOcCCeq8x663qf4/1XbH9XMfvPDYfxuP0KY/9GL3U/3ow== 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)(346002)(39860400002)(136003)(396003)(230922051799003)(82310400011)(186009)(451199024)(64100799003)(1800799012)(40470700004)(46966006)(36840700001)(426003)(26005)(16526019)(1076003)(336012)(83380400001)(40460700003)(40480700001)(6666004)(81166007)(47076005)(2616005)(41300700001)(356005)(5660300002)(2906002)(70206006)(70586007)(6916009)(86362001)(36860700001)(478600001)(82740400003)(44832011)(8936002)(8676002)(4326008)(316002)(36756003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2024 03:14:22.2256 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8cd84cd8-43a6-459c-c150-08dc278ae19b 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: CO1PEPF000044FB.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6555 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