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 5AC40A0C3F for ; Sat, 12 Jun 2021 01:06:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 54AD040691; Sat, 12 Jun 2021 01:06:31 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2064.outbound.protection.outlook.com [40.107.243.64]) by mails.dpdk.org (Postfix) with ESMTP id C20094003F for ; Sat, 12 Jun 2021 01:06:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fAiYn18d2pRun1FlL9+ky0ESlShVLa77MOiDA/Qq3aYl+MAkhfFc+5Ua9KX4s3GNZCf3WQyBdAJ59CW+p3qoMkGWYQZ2I0KEwmczl5u3taoh7XRAW1YHtbuEJuPNY9E9dmxlq3MAsWzuZzgeiZq48cxWlMS0ufSRl/fvyKUBuiJkz0mtiRA5uX6VnL6ACRp57xxCcD76w7R7vLMRGmLscb92SJWh5x2BzP4pC6mBrF/Sj9XoYXuGGh0TSCSiaeUQrAeJOcpNKCoYpdl5dIg3YlOVBKV61+emN4Hx0sUjEfS4m9jBZoKc6q5FIaxDU2Tb+SXB/3VSZieRmhTtuWRDHA== 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-SenderADCheck; bh=G4zs/o8ZFyw7T/Lsu8/pZYW6YJNv5s6ZMMsZgSlKuEg=; b=D21lPtMbd0QVSBuIZJr4D6zaKCa58Z/aVMeuU0OdLnOZ3oSi8sW3TLH/prwYkj4WKL+crzBgHcTlIahCy4LlGGeG/rKgbkRqjX8EudpKTjkOMytsUwboIpErWyJsNH+JqrKOO7HoQZ3zPrjFHGAkJfZKKork1hMrcGqVz1dfDYKpI7rX9bjohAGYfUB/g7cLNxbjIz0tYmctq0IDz3QB5R3C0OQgAsqCiqbva3F/27qoQx/T/PwLbmjZHGyIxapXOFxITud2L86pybJ5s1HzcdBLs9M/+8FQFSxjAXc40v+4SIzaDLR8vaTuAVmjpNaJ/czAu44+5JjQEv0Got3srQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=huawei.com smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none 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=G4zs/o8ZFyw7T/Lsu8/pZYW6YJNv5s6ZMMsZgSlKuEg=; b=Gse8dqpb5iNxp3rc1efmOxKVTHIZ1Or8HF23Tlwddxcg0KYsbk7P26GhTb8MGEaH13jOwZ3xwkediu0R1BL24tq83fVCBY++ZId6UGAn5gL6TO6X0xCfP0VaauoLucqCUUGKWlQTwuDVQCFv7/k7AL6rmVMP0VQqWAVf5/Da5DO428JPU4b7sn3ne+4+1hgUKs9t7bI5cHsBi1H+LvStVERlKFc5PGwEkOr8PHjndjNS9SIoH88x05eBxujW70n0euAOSKat/waYklpEfq8HON7I43ihotJQ2XtVMNebaG0HYV6TFgf7L736AMS8WkmkpsQjZdHRXWYmOdWIg92Kqw== Received: from CO2PR04CA0144.namprd04.prod.outlook.com (2603:10b6:104::22) by DM5PR12MB1180.namprd12.prod.outlook.com (2603:10b6:3:74::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.24; Fri, 11 Jun 2021 23:06:28 +0000 Received: from CO1NAM11FT028.eop-nam11.prod.protection.outlook.com (2603:10b6:104:0:cafe::76) by CO2PR04CA0144.outlook.office365.com (2603:10b6:104::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.20 via Frontend Transport; Fri, 11 Jun 2021 23:06:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; huawei.com; dkim=none (message not signed) header.d=none;huawei.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 CO1NAM11FT028.mail.protection.outlook.com (10.13.175.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4219.21 via Frontend Transport; Fri, 11 Jun 2021 23:06:27 +0000 Received: from nvidia.com (172.20.187.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 11 Jun 2021 23:06:26 +0000 From: Xueming Li To: Chengwen Feng CC: Luca Boccassi , Min Hu , dpdk stable Date: Sat, 12 Jun 2021 07:01:51 +0800 Message-ID: <20210611230433.8208-17-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210611230433.8208-1-xuemingl@nvidia.com> References: <20210510160258.30982-229-xuemingl@nvidia.com> <20210611230433.8208-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6710fb8d-a3b4-4c0b-300b-08d92d2d8b17 X-MS-TrafficTypeDiagnostic: DM5PR12MB1180: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fF9FK7Yk8NSXpUB13V968Rw20ciw+bgEKp6hCH859gsTMBQk+4m54MwuZuwKKsFmPEyOtcAx963SvMopySpNBJZFbIkVhfeZk9I22EnzMFFx+8VLs0Z9u5cfCaxXA68WhhG0UPzicMCeT3StaRtxKp+sMqGj0j9d0L11141r+R00aJnVMiZ+QnC18g7GYDqJ1n011e+rvP+fyj4xot2SXIYgSgusGxxCSulGp1pUYakh+5GXza9fnbNDqCzOw6H/Rbeq7wJ30Mi55NMjt/smAha6jwVRiaBI4vjNNRmnkzv0X1pWPlNvvNgbY4IzbLHXOW2n8tHQl6JgGg7AbF+Rcl1RIscPfzPs8gohXHDAbQr8bteWvxCnPEcdZNLWb4Iejwocbz3L8sb2xfwlpzz3yjDbU3GiPXHvKUklgzBqVvlP56Fr8XcH71CBncumncHMFO6iRRC/PUkzLF5PdlfGFDPVkIWMNXdnu2yldOPOmbNBSGmTBWtUpyQ2zhNbLrtFhLtrAzCKa5U28axCqlGXKSWR23HF+AqGnsAhhRZSyi0nPy8fVhBObpp0IG/C9KmzEjbpTUlr/QMYdnHaXCyx2UfkMEPtj2m/L45aZJkaBfanzs7ntLmriw0rerL3OvZj2YsNY9uq2WpsEpUHiwz9pzatUpKZTqcY1qniDRPYxLo+aV2KUpi8DlqO2mZ0wJGXMcHz+5d6oa1RSBx1LX0Q3CuPC6MNnTow1AYeVRPSv8n09RUbD+9vHZb4Rn3RQFUSxCyff0R5ZD2sUsanBwCHMGkcoE469cTu3MhztxBK8DJ3FoGYDZHDUHNcNdQIKLQM 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)(136003)(39860400002)(396003)(376002)(346002)(46966006)(36840700001)(426003)(70206006)(8936002)(70586007)(316002)(86362001)(8676002)(4326008)(6916009)(15650500001)(2616005)(356005)(6666004)(83380400001)(82310400003)(5660300002)(966005)(82740400003)(53546011)(26005)(16526019)(2906002)(36756003)(7636003)(186003)(478600001)(54906003)(55016002)(6286002)(1076003)(47076005)(36860700001)(336012)(7696005)(36906005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2021 23:06:27.7298 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6710fb8d-a3b4-4c0b-300b-08d92d2d8b17 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: CO1NAM11FT028.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1180 Subject: [dpdk-stable] patch 'net/hns3: fix processing link status message on PF' has been queued to stable release 20.11.2 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.2 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/14/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/b012ce6634a5e8f855eb47fdc1b13efc950282a1 Thanks. Xueming Li --- >From b012ce6634a5e8f855eb47fdc1b13efc950282a1 Mon Sep 17 00:00:00 2001 From: Chengwen Feng Date: Thu, 22 Apr 2021 09:55:50 +0800 Subject: [PATCH] net/hns3: fix processing link status message on PF Cc: Luca Boccassi [ upstream commit 4a2f6ab6fbc4be504e155a48665cc0d854ef36b6 ] The opcode of the link status notification message reported by the firmware is zero, it will be filtered out because driver treats it as already processed message. As a result, the PF can't update the link status in a timely manner. Because only VF can set opcode to zero when processing mailbox message, we add a judgment to make sure the PF messages will not be filtered out. Fixes: dbbbad23e380 ("net/hns3: fix VF handling LSC event in secondary process") Signed-off-by: Chengwen Feng Signed-off-by: Min Hu (Connor) --- drivers/net/hns3/hns3_mbx.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c index 1c4d888b65..2ca0dffcf9 100644 --- a/drivers/net/hns3/hns3_mbx.c +++ b/drivers/net/hns3/hns3_mbx.c @@ -446,16 +446,19 @@ scan_next: void hns3_dev_handle_mbx_msg(struct hns3_hw *hw) { + struct hns3_adapter *hns = HNS3_DEV_HW_TO_ADAPTER(hw); struct hns3_cmq_ring *crq = &hw->cmq.crq; struct hns3_mbx_pf_to_vf_cmd *req; struct hns3_cmd_desc *desc; uint16_t *msg_q; + bool handle_out; uint8_t opcode; uint16_t flag; rte_spinlock_lock(&hw->cmq.crq.lock); - if (rte_eal_process_type() != RTE_PROC_PRIMARY || - !rte_thread_is_intr()) { + handle_out = (rte_eal_process_type() != RTE_PROC_PRIMARY || + !rte_thread_is_intr()) && hns->is_vf; + if (handle_out) { /* * Currently, any threads in the primary and secondary processes * could send mailbox sync request, so it will need to process @@ -499,7 +502,8 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw) continue; } - if (desc->opcode == 0) { + handle_out = hns->is_vf && desc->opcode == 0; + if (handle_out) { /* Message already processed by other thread */ crq->desc[crq->next_to_use].flag = 0; hns3_mbx_ring_ptr_move_crq(crq); -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-06-12 06:53:57.147124000 +0800 +++ 0017-net-hns3-fix-processing-link-status-message-on-PF.patch 2021-06-12 06:53:56.090000000 +0800 @@ -1 +1 @@ -From 4a2f6ab6fbc4be504e155a48665cc0d854ef36b6 Mon Sep 17 00:00:00 2001 +From b012ce6634a5e8f855eb47fdc1b13efc950282a1 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit 4a2f6ab6fbc4be504e155a48665cc0d854ef36b6 ] @@ -15 +17,0 @@ -Cc: stable@dpdk.org @@ -24 +26 @@ -index 3b35c0277f..ba04ac9e90 100644 +index 1c4d888b65..2ca0dffcf9 100644 @@ -27 +29 @@ -@@ -438,16 +438,19 @@ scan_next: +@@ -446,16 +446,19 @@ scan_next: @@ -34,0 +37 @@ + uint16_t *msg_q; @@ -38 +40,0 @@ - @@ -49 +51 @@ -@@ -491,7 +494,8 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw) +@@ -499,7 +502,8 @@ hns3_dev_handle_mbx_msg(struct hns3_hw *hw)