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 9940643A53; Fri, 2 Feb 2024 20:34:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7EE9442EC6; Fri, 2 Feb 2024 20:33:36 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2060.outbound.protection.outlook.com [40.107.220.60]) by mails.dpdk.org (Postfix) with ESMTP id D805C42EAF for ; Fri, 2 Feb 2024 20:33:33 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bp7E6zxJnUTEOLaAZ+m4ov2hGtUXCC803b4GHkjIAkfaQNoAd5vtFkRcrW9VFC4IwS02FiyeirVsrGGB7ZNHJDQkVi2ICy6zerTyIhCHUPlntMDwV8a5Cqzfh9QmC2QEqAvijKcVG4oEbfVtiFHVYtrDoDCnvzrcPKGWlTVa6zRpGwfiJF82MmUCyb92jZLnnOzLbzpdlAsMFKnLcYiXFhI28JMEPxvCcGzRXcOvxDKOgzWWFVxQOU2IBPsj2Ay5tOkQCs8b/uH4atWx8V3JtsN8dYHO3dy5OR4xn5ZocfoiJ4ysOJx1ZC3/uNxdVaOwi+i3HoUX1zTpkGpaMs2mlw== 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=mLMmoecWYxrk54tEP85Vdhc01EpHHYeMp22d0ge9gHENc+epn4uBPMYJ4KmW1Uk93xKuwNuBgW7WKU2xZiKrOTkADyhCn+ZC+o+NSIeywQfOe0JFytyMUVD4bYGcg+XkBboxNKDwm0r6SDfv94hU/pv7XmqqA/pkoGakDdr1qFAmb1l7KV2fQIjun7K6wvOTP2IxADEfsC0Fz+6dBG9Nk7rHx/dzc2VW+im0rNxKWOdUIrf7aWTgIUg2tGOMQ/CRsJnDDYjXzkCJb1I6o4dOUIneaE/BVgEG1Xl2wn0Hnd/DzbdU/wx31QaCIIe/UUaFfNPPWZpfzUh4Lk/nVd7s0w== 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=3Bnitc//GCEaZj2dscArL6CGoLcfNFw9mse+LMor55rC8nFT6AlXq50FDRnYwTzv6fL2PCUA2eMrOH4R3MlU9HEVNGALrgN1L3rZPJM52gu6WDENhC1rlBJ7kFeqKzmXOBO58fgialJDfm3x+g5tkkjU28pZMPeOU+XnpZoAuEo= Received: from DM6PR18CA0028.namprd18.prod.outlook.com (2603:10b6:5:15b::41) by MN2PR12MB4304.namprd12.prod.outlook.com (2603:10b6:208:1d0::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.9; Fri, 2 Feb 2024 19:33:29 +0000 Received: from DS1PEPF0001708E.namprd03.prod.outlook.com (2603:10b6:5:15b:cafe::26) by DM6PR18CA0028.outlook.office365.com (2603:10b6:5:15b::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.22 via Frontend Transport; Fri, 2 Feb 2024 19:33:29 +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 DS1PEPF0001708E.mail.protection.outlook.com (10.167.17.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7249.19 via Frontend Transport; Fri, 2 Feb 2024 19:33:29 +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; Fri, 2 Feb 2024 13:33:28 -0600 From: Andrew Boyer To: CC: Andrew Boyer Subject: [PATCH 11/13] net/ionic: optimize device close operation Date: Fri, 2 Feb 2024 11:32:36 -0800 Message-ID: <20240202193238.62669-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: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0001708E:EE_|MN2PR12MB4304:EE_ X-MS-Office365-Filtering-Correlation-Id: 65545ed7-a55c-4616-a4f0-08dc2425d599 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vCtPzFqZv0j4HDZgYNk+2l7hMM29jvImfxatdt7jpBsRSf8+xMrVt2DaBT2hXeYN4J/iiJcoBQxM97r9VQ3aYQuAplxa6ngv9BX9kaXd43iuVPkp3KRpkKDNYiY1Ax5mm3EX7LGl7uKF1NY9yQRNgKNt1JdLgpAr6TQxwnu7uBbrINRPQglw8Am0xJ8YXAeA4n+c8TtUIotmmuLpJN0RQhqdaPF6xcC6kcA0NVDYm/iSGj34xvtupDAFxRSb7kSPqG7C2DbrcZgo1ZgIk5JhMH40PgmQMNHSk9k6g6lKX6LhvMz9+o7oGzgo6Af21S7ioIKbVAI5AQGcOsumiGyHF70zcdXTaYg/5r7AUZCqr+axZIiU47TtM2la3160a1zZXz5IdvIrgTnW6MheV6/RVjsWi8KV7or2XZaQG+HuFG9sqt2T12b651ykXEWDMhDE884Cwngv5vBlAtZ5tpeF7I1ha7XrNpPx4Kt/mvwypJPY0Dq1V4EyY0ql7hCRuENkXFym0ZdRo9If/pzMNfsJjyudAx/A3omXTUecvdy+29IzjIpTIGhI/jAk4K89XvEjwJETVMsecP6bpmq+Cnp3yUO2nEzPN/yvFkNEMfYGz+z/Ed5AfqjAtJbol77quYq7yK4ZZhoeLI/lpKigfo+hZOKjowqmvuZPCAlkHW80KjrxvKPlkJBVYgDcocjaMaSHU14W6UyPM1pLYKdv4IDX7sKQYqYGXvPxchsQKxY6tmAsRA2YzekjBi6V6oXNYDG9kH7F46FZkZ/MGhkfRjgThg== 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)(39860400002)(346002)(396003)(376002)(136003)(230922051799003)(64100799003)(451199024)(186009)(82310400011)(1800799012)(40470700004)(36840700001)(46966006)(6916009)(41300700001)(6666004)(44832011)(4326008)(70586007)(8936002)(70206006)(8676002)(2906002)(5660300002)(86362001)(36756003)(82740400003)(356005)(36860700001)(316002)(81166007)(47076005)(478600001)(83380400001)(426003)(1076003)(336012)(2616005)(16526019)(26005)(40480700001)(40460700003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Feb 2024 19:33:29.4992 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 65545ed7-a55c-4616-a4f0-08dc2425d599 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: DS1PEPF0001708E.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4304 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