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 D79A9A0A0C for ; Sun, 13 Jun 2021 09:12:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A442E4003E; Sun, 13 Jun 2021 09:12:59 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id CACB24003E for ; Sun, 13 Jun 2021 09:12:57 +0200 (CEST) Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4G2lz06j0lzXfG8; Sun, 13 Jun 2021 15:07:56 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Sun, 13 Jun 2021 15:12:53 +0800 From: "Min Hu (Connor)" To: CC: Date: Sun, 13 Jun 2021 15:12:30 +0800 Message-ID: <1623568350-8495-1-git-send-email-humin29@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggeme756-chm.china.huawei.com (10.3.19.102) X-CFilter-Loop: Reflected Subject: [dpdk-stable] [PATCH 20.11] net/hns3: fix concurrent interrupt handling 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" From: Hongbo Zheng [ upstream commit f9f24ecd794f88231110c823cdeff5d7ec9a4382 ] Currently, if RAS interrupt and FLR occurred at the same time, FLR will be detected and corresponding schedule state will be set during RAS interrupt processing. However, the schedule state value will be overridden in subsequent RAS processing, resulting in FLR processing failure. This patch solves this problem. Fixes: 2790c6464725 ("net/hns3: support device reset") Cc: stable@dpdk.org Signed-off-by: Hongbo Zheng Signed-off-by: Min Hu (Connor) --- drivers/net/hns3/hns3_intr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/hns3/hns3_intr.c b/drivers/net/hns3/hns3_intr.c index 99b5301..0bba3ab 100644 --- a/drivers/net/hns3/hns3_intr.c +++ b/drivers/net/hns3/hns3_intr.c @@ -1787,7 +1787,8 @@ hns3_schedule_reset(struct hns3_adapter *hns) return; if (rte_atomic16_read(&hns->hw.reset.schedule) == SCHEDULE_DEFERRED) rte_eal_alarm_cancel(hw->reset.ops->reset_service, hns); - rte_atomic16_set(&hns->hw.reset.schedule, SCHEDULE_REQUESTED); + else + rte_atomic16_set(&hns->hw.reset.schedule, SCHEDULE_REQUESTED); rte_eal_alarm_set(SWITCH_CONTEXT_US, hw->reset.ops->reset_service, hns); } -- 2.7.4