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 E04A242D46 for ; Sun, 25 Jun 2023 08:45:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D7DF142D10; Sun, 25 Jun 2023 08:45:49 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2071.outbound.protection.outlook.com [40.107.223.71]) by mails.dpdk.org (Postfix) with ESMTP id AB9DF42D0B for ; Sun, 25 Jun 2023 08:45:48 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=adWA1K4feWazmE1Opmp/dRY5jtEoPj+5vCgM9EFcLxQ3zcA9hcyYtRQAIyYneuk5iLhD0EvTjyaxOwxEO9Htb2j+OrKfZKdbi1wUPlgNjLULiuDvOP2DbIxSq8UtOePS2JgJyrRNUQXBi+xwgVZwpWnWV6ZsHIb/R7rnDMalbqmIZsPj1MdphxbV8bsr1kh5brjei3Dkmp3JFA4AS4tuxeJjDojtn/S855GAZSc4WtItaus+0tH1YNh3OUFHEu4YEBiH/tsFk8B4bC79d2fURb77m5ii/MPpup03Gj/eEpJZhTbIT0UkOBZ76IIZ0YXCpHgSiPbLXE4jRG0Am7tjrA== 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=AF7SURm9I+tR5DuYU1kBnhPG7Fr5G+DuM7quw/qGPKY=; b=EGyJ1XdQ2R7HBcZyGm8mg7pZnu0fRmb+5VvZXNMEVG39Tk2TvrijFCWgqQjeFV2ght4HI6OVL6JWdIzuAzxRCZOQI73OUHWDj6QkK6Xg0coxdQDQgWE8RySzYy1BhCYjNX2Az6v2mWlPPw9FBrxienk9ckaV3/VN3og1TiOCRVr42+B5dlXRDUqeKdASk58K7XFMQZkb0RUEtQRc49GjomHwjUogdWEV1/DbUUz0hFhR6T7IsufRyVHU2iEFcpLvTBDQ0Gsl7Lha2AKYGj2f9dtVSEebV2FLkG/GWub5AfSSx3dVEHwF3UNTrxjLRLOfwbotyrH+vE+ed4CbWn1r/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=intel.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 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=AF7SURm9I+tR5DuYU1kBnhPG7Fr5G+DuM7quw/qGPKY=; b=FnaSyog9UoPrWNgQCCW0TLePLBPvEJPkpnm6AcWhVv6aZPBDxWdfUeGrDaHi1DtUcksXMKf8B1g+rou5jTaj31d0ipv2WRUNnDwonBW57EtewnTYel/vGXrJiZ6qdxVLpWX/L/G8u5Xc62nQa57Q/cCJ+WCd5zjBdAIjdxzCUzO/o/hW4FaLAMaDdPAqUrNEnl5R8AATM59cguceL0HBpcqEEKvdwBmDoWwlh0u/SaG8PlUPu6ja6a7ie3YrKP7Djvson+1JQbeFjopwdmXrjVKNI7xvhjEP1ZZwYX6ggwF9rkD0cOoV1gfz2mFoczlaTuwxsYz6NGHrQstvEOfGDQ== Received: from BN8PR03CA0025.namprd03.prod.outlook.com (2603:10b6:408:94::38) by PH7PR12MB7187.namprd12.prod.outlook.com (2603:10b6:510:203::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24; Sun, 25 Jun 2023 06:45:46 +0000 Received: from BN8NAM11FT089.eop-nam11.prod.protection.outlook.com (2603:10b6:408:94:cafe::ad) by BN8PR03CA0025.outlook.office365.com (2603:10b6:408:94::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.32 via Frontend Transport; Sun, 25 Jun 2023 06:45:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN8NAM11FT089.mail.protection.outlook.com (10.13.176.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.47 via Frontend Transport; Sun, 25 Jun 2023 06:45:45 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Sat, 24 Jun 2023 23:45:35 -0700 Received: from nvidia.com (10.126.230.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.986.37; Sat, 24 Jun 2023 23:45:33 -0700 From: Xueming Li To: Shiyang He CC: Qi Zhang , dpdk stable Subject: patch 'net/iavf: release large VF when closing device' has been queued to stable release 22.11.3 Date: Sun, 25 Jun 2023 14:35:32 +0800 Message-ID: <20230625063544.11183-115-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230625063544.11183-1-xuemingl@nvidia.com> References: <20230625063544.11183-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.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: BN8NAM11FT089:EE_|PH7PR12MB7187:EE_ X-MS-Office365-Filtering-Correlation-Id: de3e5d33-72c7-4405-6237-08db7547cdd0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PbFkZkuCQmMEdvzlY+ZIQc0QK77IeHfGNzRZsqHYUFLOsbdBSypBrmajNGSwZX06DyI6LIWj5viCQAi2seqa9m5psCicgbFEQzFImLAWz+mP07hEDmmd3fKiiX1Qegs0idYSPrN3cihXyxdPVntLyKkzUfyyNG3wRFHen3Y2iWTriR+pamYciDjWiWDwm3/oH36nVNug46QvEKzOxplnYjWCL1B4KSRQCa9jmi9WxMhdg0sbrb3pAR8VTqbetir/WlxINxA7YXaqhULHnjQiRaZvRlojnqiH0/O3NvIUnmW2yT9aXdxULvld2PTmHv3pGEHxlmCTe0R0RLl8oPb30QFICE4eRXTR/Eznl/gidXzjmd54mTnyMldMRM2bNoGsgatmo2EVndf94/AxiIJKBPzmOSpH9LiNVJiFqsZ1/pNq+1RMsJvMpHFJFyx+jPbHJPGKi9ChMU3nT4cSTB/GbI0uZx64859gKAuJGTITMcPWVolmUqfGaA2do0yr0mNuU/llRQ1xMuET5qucXt8HR/Pdn5h2F1Dqgl/FoRmsgUW//Q1K/JURoXWURIi9wRPkdj0MFFE7d4bDqpqFMIchPcQmT8qZveAMOawpsw8RMdgchldLqa6mF3/rU1L69lntlQJ9RCR/hGw9LBg3tr6UCfNG7TTOIxMDqTsqxAmvWWzc9iZ4H2dhxENaSUCmt0nSLQS66ko1nqXPxYXCXxlrATt0sDIGPTo2cLBHU4GeJqQlxJgJ8fQ20gtLCmJ3adInlndpVwUy3Xne6J2mlnDxqw== X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(346002)(376002)(39860400002)(396003)(136003)(451199021)(46966006)(40470700004)(36840700001)(36860700001)(82310400005)(47076005)(966005)(478600001)(7696005)(2616005)(54906003)(83380400001)(336012)(426003)(26005)(53546011)(1076003)(6286002)(186003)(16526019)(2906002)(5660300002)(40460700003)(36756003)(70206006)(356005)(4326008)(70586007)(82740400003)(7636003)(40480700001)(316002)(55016003)(8936002)(8676002)(41300700001)(86362001)(6916009); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jun 2023 06:45:45.7139 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: de3e5d33-72c7-4405-6237-08db7547cdd0 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT089.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7187 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 22.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 06/27/23. 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=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=c4d749115de8aedc5df82de5497b9761d0472720 Thanks. Xueming Li --- >From c4d749115de8aedc5df82de5497b9761d0472720 Mon Sep 17 00:00:00 2001 From: Shiyang He Date: Mon, 8 May 2023 16:58:23 +0000 Subject: [PATCH] net/iavf: release large VF when closing device Cc: Xueming Li [ upstream commit cdd8d6dfd156709b05ce363d7c5f491cc927330a ] Multiple vfs created based on one PF. If one of the vf requests a large number of queues, the queue resources are not released when exiting the program, resulting in these queues cannot be available to other vfs. This commit fixes the issue by resetting the number of queues to default when closing the dev (refer to the kernel driver) . Fixes: e436cd43835b ("net/iavf: negotiate large VF and request more queues") Signed-off-by: Shiyang He Acked-by: Qi Zhang --- drivers/net/iavf/iavf_ethdev.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index f6d68403ce..9c55eaa66e 100644 --- a/drivers/net/iavf/iavf_ethdev.c +++ b/drivers/net/iavf/iavf_ethdev.c @@ -2735,6 +2735,18 @@ iavf_dev_close(struct rte_eth_dev *dev) if (vf->promisc_unicast_enabled || vf->promisc_multicast_enabled) iavf_config_promisc(adapter, false, false); + /* + * Release redundant queue resource when close the dev + * so that other vfs can re-use the queues. + */ + if (vf->lv_enabled) { + ret = iavf_request_queues(dev, IAVF_MAX_NUM_QUEUES_DFLT); + if (ret) + PMD_DRV_LOG(ERR, "Reset the num of queues failed"); + + vf->max_rss_qregion = IAVF_MAX_NUM_QUEUES_DFLT; + } + iavf_shutdown_adminq(hw); if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_WB_ON_ITR) { /* disable uio intr before callback unregister */ -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-06-25 14:32:01.533509600 +0800 +++ 0114-net-iavf-release-large-VF-when-closing-device.patch 2023-06-25 14:31:58.565773900 +0800 @@ -1 +1 @@ -From cdd8d6dfd156709b05ce363d7c5f491cc927330a Mon Sep 17 00:00:00 2001 +From c4d749115de8aedc5df82de5497b9761d0472720 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit cdd8d6dfd156709b05ce363d7c5f491cc927330a ] @@ -14 +16,0 @@ -Cc: stable@dpdk.org