From: Chengwen Feng <fengchengwen@huawei.com>
To: <thomas@monjalon.net>, <ferruh.yigit@xilinx.com>, <ferruh.yigit@amd.com>
Cc: <dev@dpdk.org>, <kalesh-anakkur.purayil@broadcom.com>,
<somnath.kotur@broadcom.com>, <ajit.khaparde@broadcom.com>,
<mdr@ashroe.eu>, <Andrew.Rybchenko@oktetlabs.ru>
Subject: [PATCH v10 5/5] net/bnxt: support proactive error handling mode
Date: Sun, 9 Oct 2022 07:53:29 +0000 [thread overview]
Message-ID: <20221009075329.46858-6-fengchengwen@huawei.com> (raw)
In-Reply-To: <20221009075329.46858-1-fengchengwen@huawei.com>
From: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
This patch supports proactive error handling mode.
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>
---
drivers/net/bnxt/bnxt_cpr.c | 4 ++++
drivers/net/bnxt/bnxt_ethdev.c | 13 ++++++++++++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index 99af0f9e87..5bb376d4d5 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -180,6 +180,10 @@ void bnxt_handle_async_event(struct bnxt *bp,
return;
}
+ rte_eth_dev_callback_process(bp->eth_dev,
+ RTE_ETH_EVENT_ERR_RECOVERING,
+ NULL);
+
pthread_mutex_lock(&bp->err_recovery_lock);
event_data = data1;
/* timestamp_lo/hi values are in units of 100ms */
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 3dfe9efc09..b3de490d36 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1063,6 +1063,8 @@ static int bnxt_dev_info_get_op(struct rte_eth_dev *eth_dev,
dev_info->vmdq_pool_base = 0;
dev_info->vmdq_queue_base = 0;
+ dev_info->err_handle_mode = RTE_ETH_ERROR_HANDLE_MODE_PROACTIVE;
+
return 0;
}
@@ -4382,13 +4384,18 @@ static void bnxt_dev_recover(void *arg)
PMD_DRV_LOG(INFO, "Port: %u Recovered from FW reset\n",
bp->eth_dev->data->port_id);
pthread_mutex_unlock(&bp->err_recovery_lock);
-
+ rte_eth_dev_callback_process(bp->eth_dev,
+ RTE_ETH_EVENT_RECOVERY_SUCCESS,
+ NULL);
return;
err_start:
bnxt_dev_stop(bp->eth_dev);
err:
bp->flags |= BNXT_FLAG_FATAL_ERROR;
bnxt_uninit_resources(bp, false);
+ rte_eth_dev_callback_process(bp->eth_dev,
+ RTE_ETH_EVENT_RECOVERY_FAILED,
+ NULL);
if (bp->eth_dev->data->dev_conf.intr_conf.rmv)
rte_eth_dev_callback_process(bp->eth_dev,
RTE_ETH_EVENT_INTR_RMV,
@@ -4560,6 +4567,10 @@ static void bnxt_check_fw_health(void *arg)
PMD_DRV_LOG(ERR, "Detected FW dead condition\n");
+ rte_eth_dev_callback_process(bp->eth_dev,
+ RTE_ETH_EVENT_ERR_RECOVERING,
+ NULL);
+
if (bnxt_is_primary_func(bp))
wait_msec = info->primary_func_wait_period;
else
--
2.17.1
next prev parent reply other threads:[~2022-10-09 7:59 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220128124831.427-1-kalesh-anakkur.purayil@broadcom.com>
2022-09-22 7:41 ` [PATCH v9 0/5] support " Chengwen Feng
2022-09-22 7:41 ` [PATCH v9 1/5] ethdev: support get port " Chengwen Feng
2022-10-03 17:35 ` Ferruh Yigit
2022-10-05 1:56 ` fengchengwen
2022-09-22 7:41 ` [PATCH v9 2/5] ethdev: support proactive " Chengwen Feng
2022-10-03 17:35 ` Ferruh Yigit
2022-09-22 7:41 ` [PATCH v9 3/5] app/testpmd: support error handling mode event Chengwen Feng
2022-09-22 7:41 ` [PATCH v9 4/5] net/hns3: support proactive error handling mode Chengwen Feng
2022-09-22 7:41 ` [PATCH v9 5/5] net/bnxt: " Chengwen Feng
2022-10-09 7:53 ` [PATCH v10 0/5] support " Chengwen Feng
2022-10-09 7:53 ` [PATCH v10 1/5] ethdev: support get port " Chengwen Feng
2022-10-09 7:53 ` [PATCH v10 2/5] ethdev: support proactive " Chengwen Feng
2022-10-09 7:53 ` [PATCH v10 3/5] app/testpmd: support error handling mode event Chengwen Feng
2022-10-09 7:53 ` [PATCH v10 4/5] net/hns3: support proactive error handling mode Chengwen Feng
2022-10-09 7:53 ` Chengwen Feng [this message]
2022-10-09 9:10 ` [PATCH v11 0/5] support " Chengwen Feng
2022-10-09 9:10 ` [PATCH v11 1/5] ethdev: support get port " Chengwen Feng
2022-10-10 8:38 ` Andrew Rybchenko
2022-10-10 8:44 ` Andrew Rybchenko
2022-10-09 9:10 ` [PATCH v11 2/5] ethdev: support proactive " Chengwen Feng
2022-10-10 8:47 ` Andrew Rybchenko
2022-10-11 14:48 ` fengchengwen
2022-10-09 9:10 ` [PATCH v11 3/5] app/testpmd: support error handling mode event Chengwen Feng
2022-10-09 9:10 ` [PATCH v11 4/5] net/hns3: support proactive error handling mode Chengwen Feng
2022-10-09 11:05 ` Dongdong Liu
2022-10-09 9:10 ` [PATCH v11 5/5] net/bnxt: " Chengwen Feng
2022-10-12 3:45 ` [PATCH v12 0/5] support " Chengwen Feng
2022-10-12 3:45 ` [PATCH v12 1/5] ethdev: add error handling mode to device info Chengwen Feng
2022-10-12 3:45 ` [PATCH v12 2/5] ethdev: support proactive error handling mode Chengwen Feng
2022-10-13 8:58 ` Andrew Rybchenko
2022-10-13 12:50 ` fengchengwen
2022-10-12 3:45 ` [PATCH v12 3/5] app/testpmd: support error handling mode event Chengwen Feng
2022-10-12 3:45 ` [PATCH v12 4/5] net/hns3: support proactive error handling mode Chengwen Feng
2022-10-12 3:45 ` [PATCH v12 5/5] net/bnxt: " Chengwen Feng
2022-10-13 12:42 ` [PATCH v13 0/5] support " Chengwen Feng
2022-10-13 12:42 ` [PATCH v13 1/5] ethdev: add error handling mode to device info Chengwen Feng
2022-10-13 12:42 ` [PATCH v13 2/5] ethdev: support proactive error handling mode Chengwen Feng
2022-10-13 12:42 ` [PATCH v13 3/5] app/testpmd: support error handling mode event Chengwen Feng
2022-10-13 12:42 ` [PATCH v13 4/5] net/hns3: support proactive error handling mode Chengwen Feng
2022-10-13 12:42 ` [PATCH v13 5/5] net/bnxt: " Chengwen Feng
2022-10-17 7:42 ` [PATCH v13 0/5] support " Andrew Rybchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221009075329.46858-6-fengchengwen@huawei.com \
--to=fengchengwen@huawei.com \
--cc=Andrew.Rybchenko@oktetlabs.ru \
--cc=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=ferruh.yigit@xilinx.com \
--cc=kalesh-anakkur.purayil@broadcom.com \
--cc=mdr@ashroe.eu \
--cc=somnath.kotur@broadcom.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).