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 A5A7BA0C40; Wed, 9 Jun 2021 04:52:42 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3E8B44111B; Wed, 9 Jun 2021 04:52:20 +0200 (CEST) Received: from relay.smtp-ext.broadcom.com (saphodev.broadcom.com [192.19.11.229]) by mails.dpdk.org (Postfix) with ESMTP id 44D79410F9 for ; Wed, 9 Jun 2021 04:52:18 +0200 (CEST) Received: from dhcp-10-123-153-22.dhcp.broadcom.net (bgccx-dev-host-lnx2.bec.broadcom.net [10.123.153.22]) by relay.smtp-ext.broadcom.com (Postfix) with ESMTP id DEEEC38910; Tue, 8 Jun 2021 19:52:16 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com DEEEC38910 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1623207137; bh=tdzfSmk9bpvTXVuurjNdroT3Jl8H8SR00ygHq2mIOGg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HjdcL28lEFuQ7uauKDlhblWqesskPTTq/Ey8CZr66mc5Ao8DsUGcOqURGg83CmgSB EeFhO9fIkKJT4ZnFeJRdi73EBtAhOmgsxxr1lEUEMT+YsZH7eFjnsdFQ1vrNirxXRm EqGlyWFoClPqAqIhusCAJCNkKBRJUNmQe3Gtl8vk= From: Kalesh A P To: dev@dpdk.org Cc: ferruh.yigit@intel.com, ajit.khaparde@broadcom.com Date: Wed, 9 Jun 2021 08:43:32 +0530 Message-Id: <20210609031332.16739-5-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20210609031332.16739-1-kalesh-anakkur.purayil@broadcom.com> References: <20210609031332.16739-1-kalesh-anakkur.purayil@broadcom.com> Subject: [dpdk-dev] [PATCH 4/4] net/bnxt: invoke device removal event on recovery failure 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 Sender: "dev" From: Kalesh AP When the driver receives RESET_NOTIFY async event from FW or detects a FW fatal error condition, it tries to recover from the error. When the driver fails to recover from the error condition, fixed to send device removal event to the application. Fixes: df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW") Cc: stable@dpdk.org Signed-off-by: Kalesh AP Reviewed-by: Somnath Kotur Reviewed-by: Ajit Khaparde --- drivers/net/bnxt/bnxt_ethdev.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index e069559..5e8d369 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -4340,6 +4340,10 @@ static void bnxt_dev_recover(void *arg) err: bp->flags |= BNXT_FLAG_FATAL_ERROR; bnxt_uninit_resources(bp, false); + if (bp->eth_dev->data->dev_conf.intr_conf.rmv) + rte_eth_dev_callback_process(bp->eth_dev, + RTE_ETH_EVENT_INTR_RMV, + NULL); pthread_mutex_unlock(&bp->err_recovery_lock); PMD_DRV_LOG(ERR, "Failed to recover from FW reset\n"); } @@ -6395,6 +6399,7 @@ static int bnxt_pci_remove(struct rte_pci_device *pci_dev) static struct rte_pci_driver bnxt_rte_pmd = { .id_table = bnxt_pci_id_map, .drv_flags = RTE_PCI_DRV_NEED_MAPPING | RTE_PCI_DRV_INTR_LSC | + RTE_PCI_DRV_INTR_RMV | RTE_PCI_DRV_PROBE_AGAIN, /* Needed in case of VF-REPs * and OVS-DPDK */ -- 2.10.1