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 8AD39A034F for ; Wed, 10 Nov 2021 07:43:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8102D4014D; Wed, 10 Nov 2021 07:43:14 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2050.outbound.protection.outlook.com [40.107.94.50]) by mails.dpdk.org (Postfix) with ESMTP id 445DF4014D for ; Wed, 10 Nov 2021 07:43:11 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RTqD7wV4pTswJn+2B3i+WC6zpbIq8TfjvyPMKhbxSXlGVE/f1yTQVZhTYadIOpqVUvJfY7vAotz5RZHMUKgiXzExCoGLEkv0lPm1rz0Bdmxfvwg83lrrc/FcToHLeO5xS2emNAHhPrcYJAGFxKhZLrc5ZbRhRyy4Us8c69HmWHKCEPUWFfQ7uSvdmqBcPuouBfYFyPGRJnVrzVy2LPn+auqk5EmH7goTSoUaOaZTDZ4tJGHdmSuP9YgwL6PrRWFlU9x+2+QaErx6KULKDRxhkQ19APuKK6mZAw77WKB3mkGja7U0DIxS1hBuHfELu6m4h4qpXty704KmV001Cj1+zg== 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=sK5B6SG0D9e212hYMhGj9GEXw9jeoni1PpA5OTArKzk=; b=BnsDCkgUas4nEsHz46Qo4hc/K+1vYr6//e9w4ELpP+RalK8bHwF4pBta4VVYo5znO5k2A3S2higmhbdBjJIYwTqeREVVm5b4a0der3DeTrHcqoO7jrUQuqAO3ps5zMj0JxZ9fK7/+O73kaFFgFp1bPME72Ru8XutqgisrZUy+y9yEnMlYhzuSNU5RW2j7MpqccQjoQ0QCWrrfnfgIO2LFPaszcxG4E3nPEq/6IbK/o5+DZejf4NrIlr7VQN/SxN2RUaeHkkl8UcMxq1WiSUfT2TEo2FxY/FiPWeDdWH+D64KOqEcCsm4Sre+XV/EiVl/7kakopgaTqXvPCxOBZc1OA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=broadcom.com smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine 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=sK5B6SG0D9e212hYMhGj9GEXw9jeoni1PpA5OTArKzk=; b=FNDmnw9K6VBBOjLhRUAxt0ULnDKJF6Qy7kfkaxyinGCrYPvkvcEQ4llK0GXDWw1FoXr9W0mtoKsf1A24VZ1RAXvIyzUEeu7xEJ6TSSBxLw/93yeaYr5VffQoBfAbrIofPhL75ycZqqCpyfBS6L77Fe/EIWwR9qjab6C5G5eIKaGBNqszPe4NYJLH0B2OlrfNJr/hls5aQ//SMDDFzyCTPXGOlAdWjMVZLKBd/xcbujYnPCNm1Xh0ua6g7RV/42gFTueMm8F9Yr8qV/JBaDpqKYY/DbSXU+5sK0gZkN5w7Y+Jwh+Wad0esQwDdcSgOS2k+1ewFwVJ+Vb+bAtxGDidHg== Received: from DM5PR07CA0100.namprd07.prod.outlook.com (2603:10b6:4:ae::29) by DM5PR1201MB0249.namprd12.prod.outlook.com (2603:10b6:4:57::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11; Wed, 10 Nov 2021 06:43:09 +0000 Received: from DM6NAM11FT017.eop-nam11.prod.protection.outlook.com (2603:10b6:4:ae:cafe::eb) by DM5PR07CA0100.outlook.office365.com (2603:10b6:4:ae::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10 via Frontend Transport; Wed, 10 Nov 2021 06:43:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; broadcom.com; dkim=none (message not signed) header.d=none;broadcom.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT017.mail.protection.outlook.com (10.13.172.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4669.10 via Frontend Transport; Wed, 10 Nov 2021 06:43:08 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 10 Nov 2021 06:43:04 +0000 From: Xueming Li To: Kalesh AP CC: Luca Boccassi , Ajit Khaparde , Lance Richardson , Somnath Kotur , dpdk stable Date: Wed, 10 Nov 2021 14:29:41 +0800 Message-ID: <20211110063216.2744012-98-xuemingl@nvidia.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211110063216.2744012-1-xuemingl@nvidia.com> References: <20211110063216.2744012-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL101.nvidia.com (172.20.187.10) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 069e6d30-1e35-4002-a527-08d9a4155bbd X-MS-TrafficTypeDiagnostic: DM5PR1201MB0249: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QGWhGFAu0LNs5bUcFMdD1FxgcoExp9gih0P+ws3kEq/dyIHhx7OBFjMjQM4wzQYbfOxdAJ9xtf3AF894Uw3xLUYhdGtZGpI36ebx8y7pfhW3RyJnwNvEDUN5A6cVmyvtrW+AzaRULIMkmKD70hccnQhP3GA+hk7XjjYj1v19kme1Mrs/BHU6OsofTMNBXVXwijpPfF09c1OQzjabO/uVg7TQefrixHA+20O1ydOZS9XCefTF6H6asoRYVhHckGeR1sHDUTLMvXJ9i9kqPTKTtv0An1JLI8SfuGPqKu2b/XwSeHT5byV7HhSpbKrZMdajbdwLEVb95uuw5NtUGxJaWjUp1thTkDTFIwJUmUYiSsEQctBq0ITSLdj8fcw8httF3aTDz9KoYhcTmq/kC1KVoovrzzYlOUNYloAIfxDBWu/WbQ4fJNj2ryMzK4SC+6NChOvo/Z+s3LIsx2cRj9NpUGuZVYzQhm8AZFp8C+PUBYUXxzKJBZGLxw4eUtra8+WAWc5+eEC47nQkd6JbRRRmDbY+OajeOGOK4DiZEoG1S5vXCKPpOr0qPSi4qm3Iia/gwrSUZQe/LLsDeJw0X/Dx+sV7tgHCyL5qyqPd7dJ8CcVM/MQTBZ4mFc1YRnTmq27k81inalsgVDuRxZFADCkfZH/j8ODOlk4tzirXOvVieRNd/lsYQz6TvJKq0BbUZliX4aH4w3RGywwDOVHepeTLhqOS10VmaCCHavysotYT8zkPTLzens7xiOL0iF8cEJX2v57oV427qVbjbnCABseThbm6FkD10y7k+ivWUhqqGUreOdR36dH17xitdUIVjYSgM2zvaeWkFxRUCid8c+t/Yg== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(36840700001)(46966006)(16526019)(6286002)(86362001)(54906003)(2906002)(55016002)(336012)(6666004)(316002)(8936002)(1076003)(4001150100001)(70586007)(4326008)(6916009)(70206006)(8676002)(26005)(2616005)(82310400003)(508600001)(5660300002)(36756003)(426003)(53546011)(7696005)(186003)(36860700001)(356005)(966005)(47076005)(83380400001)(7636003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2021 06:43:08.8950 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 069e6d30-1e35-4002-a527-08d9a4155bbd X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT017.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1201MB0249 Subject: [dpdk-stable] patch 'net/bnxt: fix function driver register/unregister' has been queued to stable release 20.11.4 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 Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/12/21. 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://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/ea39d70a5080365fd746c61532bdedc6599e0d94 Thanks. Xueming Li --- >From ea39d70a5080365fd746c61532bdedc6599e0d94 Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Wed, 22 Sep 2021 14:00:44 +0530 Subject: [PATCH] net/bnxt: fix function driver register/unregister Cc: Xueming Li [ upstream commit 61ad5c1ac9de245e7d20a67375d56682c70bebde ] 1. Fix to use correct fields in the request structure of HWRM_FUNC_DRV_RGTR. 2. Remove the "flags" argument to bnxt_hwrm_func_driver_unregister() as it is not needed. Fixes: beb3087f5056 ("net/bnxt: add driver register/unregister") Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Reviewed-by: Lance Richardson Reviewed-by: Somnath Kotur --- drivers/net/bnxt/bnxt_ethdev.c | 2 +- drivers/net/bnxt/bnxt_hwrm.c | 9 ++++----- drivers/net/bnxt/bnxt_hwrm.h | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index a563c2275f..3c0ab629c3 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -5792,7 +5792,7 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev) bp->pf->vf_req_buf = NULL; } - rc = bnxt_hwrm_func_driver_unregister(bp, 0); + rc = bnxt_hwrm_func_driver_unregister(bp); bp->flags &= ~BNXT_FLAG_REGISTERED; bnxt_free_ctx_mem(bp); if (!reconfig_dev) { diff --git a/drivers/net/bnxt/bnxt_hwrm.c b/drivers/net/bnxt/bnxt_hwrm.c index 50b41d82d3..a3800cf6b1 100644 --- a/drivers/net/bnxt/bnxt_hwrm.c +++ b/drivers/net/bnxt/bnxt_hwrm.c @@ -941,9 +941,9 @@ int bnxt_hwrm_func_driver_register(struct bnxt *bp) HWRM_PREP(&req, HWRM_FUNC_DRV_RGTR, BNXT_USE_CHIMP_MB); req.enables = rte_cpu_to_le_32(HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_VER | HWRM_FUNC_DRV_RGTR_INPUT_ENABLES_ASYNC_EVENT_FWD); - req.ver_maj = RTE_VER_YEAR; - req.ver_min = RTE_VER_MONTH; - req.ver_upd = RTE_VER_MINOR; + req.ver_maj_8b = RTE_VER_YEAR; + req.ver_min_8b = RTE_VER_MONTH; + req.ver_upd_8b = RTE_VER_MINOR; if (BNXT_PF(bp)) { req.enables |= rte_cpu_to_le_32( @@ -1240,7 +1240,7 @@ error: return rc; } -int bnxt_hwrm_func_driver_unregister(struct bnxt *bp, uint32_t flags) +int bnxt_hwrm_func_driver_unregister(struct bnxt *bp) { int rc; struct hwrm_func_drv_unrgtr_input req = {.req_type = 0 }; @@ -1250,7 +1250,6 @@ int bnxt_hwrm_func_driver_unregister(struct bnxt *bp, uint32_t flags) return 0; HWRM_PREP(&req, HWRM_FUNC_DRV_UNRGTR, BNXT_USE_CHIMP_MB); - req.flags = flags; rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB); diff --git a/drivers/net/bnxt/bnxt_hwrm.h b/drivers/net/bnxt/bnxt_hwrm.h index 82010e675b..934a2056b8 100644 --- a/drivers/net/bnxt/bnxt_hwrm.h +++ b/drivers/net/bnxt/bnxt_hwrm.h @@ -141,7 +141,7 @@ int bnxt_hwrm_func_buf_unrgtr(struct bnxt *bp); int bnxt_hwrm_func_driver_register(struct bnxt *bp); int bnxt_hwrm_func_qcaps(struct bnxt *bp); int bnxt_hwrm_func_reset(struct bnxt *bp); -int bnxt_hwrm_func_driver_unregister(struct bnxt *bp, uint32_t flags); +int bnxt_hwrm_func_driver_unregister(struct bnxt *bp); int bnxt_hwrm_func_qstats(struct bnxt *bp, uint16_t fid, struct rte_eth_stats *stats, struct hwrm_func_qstats_output *func_qstats); -- 2.33.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-11-10 14:17:06.327175471 +0800 +++ 0097-net-bnxt-fix-function-driver-register-unregister.patch 2021-11-10 14:17:01.857412867 +0800 @@ -1 +1 @@ -From 61ad5c1ac9de245e7d20a67375d56682c70bebde Mon Sep 17 00:00:00 2001 +From ea39d70a5080365fd746c61532bdedc6599e0d94 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 61ad5c1ac9de245e7d20a67375d56682c70bebde ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org @@ -25 +27 @@ -index 097dd10de9..dc7dee1d2a 100644 +index a563c2275f..3c0ab629c3 100644 @@ -28 +30 @@ -@@ -6156,7 +6156,7 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev) +@@ -5792,7 +5792,7 @@ bnxt_uninit_resources(struct bnxt *bp, bool reconfig_dev) @@ -38 +40 @@ -index 585cdeded8..d4d8581af1 100644 +index 50b41d82d3..a3800cf6b1 100644 @@ -41 +43 @@ -@@ -1059,9 +1059,9 @@ int bnxt_hwrm_func_driver_register(struct bnxt *bp) +@@ -941,9 +941,9 @@ int bnxt_hwrm_func_driver_register(struct bnxt *bp) @@ -54 +56 @@ -@@ -1370,7 +1370,7 @@ error: +@@ -1240,7 +1240,7 @@ error: @@ -63 +65 @@ -@@ -1380,7 +1380,6 @@ int bnxt_hwrm_func_driver_unregister(struct bnxt *bp, uint32_t flags) +@@ -1250,7 +1250,6 @@ int bnxt_hwrm_func_driver_unregister(struct bnxt *bp, uint32_t flags) @@ -72 +74 @@ -index b311ff59c0..6dc23b93ac 100644 +index 82010e675b..934a2056b8 100644 @@ -75 +77 @@ -@@ -145,7 +145,7 @@ int bnxt_hwrm_func_buf_unrgtr(struct bnxt *bp); +@@ -141,7 +141,7 @@ int bnxt_hwrm_func_buf_unrgtr(struct bnxt *bp);