From: Kalesh AP <kalesh-anakkur.pura...@broadcom.com>

This patch supports error handling mode event process.

Signed-off-by: Kalesh AP <kalesh-anakkur.pura...@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.ko...@broadcom.com>
Signed-off-by: Chengwen Feng <fengcheng...@huawei.com>
Reviewed-by: Ajit Khaparde <ajit.khapa...@broadcom.com>
---
 app/test-pmd/parameters.c | 10 ++++++++--
 app/test-pmd/testpmd.c    |  8 +++++++-
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index ff760460ec..b56383dc4a 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -167,9 +167,9 @@ usage(char* progname)
        printf("  --no-rmv-interrupt: disable device removal interrupt.\n");
        printf("  --bitrate-stats=N: set the logical core N to perform "
                "bit-rate calculation.\n");
-       printf("  --print-event 
<unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|flow_aged|all>:
 "
+       printf("  --print-event 
<unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|flow_aged|err_recovering|recovery_success|recovery_failed|all>:
 "
               "enable print of designated event or all of them.\n");
-       printf("  --mask-event 
<unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|flow_aged|all>:
 "
+       printf("  --mask-event 
<unknown|intr_lsc|queue_state|intr_reset|vf_mbox|macsec|intr_rmv|flow_aged|err_recovering|recovery_success|recovery_failed||all>:
 "
               "disable print of designated event or all of them.\n");
        printf("  --flow-isolate-all: "
               "requests flow API isolated mode on all ports at initialization 
time.\n");
@@ -453,6 +453,12 @@ parse_event_printing_config(const char *optarg, int enable)
                mask = UINT32_C(1) << RTE_ETH_EVENT_DESTROY;
        else if (!strcmp(optarg, "flow_aged"))
                mask = UINT32_C(1) << RTE_ETH_EVENT_FLOW_AGED;
+       else if (!strcmp(optarg, "err_recovering"))
+               mask = UINT32_C(1) << RTE_ETH_EVENT_ERR_RECOVERING;
+       else if (!strcmp(optarg, "recovery_success"))
+               mask = UINT32_C(1) << RTE_ETH_EVENT_RECOVERY_SUCCESS;
+       else if (!strcmp(optarg, "recovery_failed"))
+               mask = UINT32_C(1) << RTE_ETH_EVENT_RECOVERY_FAILED;
        else if (!strcmp(optarg, "all"))
                mask = ~UINT32_C(0);
        else {
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 5b0f0838dc..f4f1888446 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -426,6 +426,9 @@ static const char * const eth_event_desc[] = {
        [RTE_ETH_EVENT_DESTROY] = "device released",
        [RTE_ETH_EVENT_FLOW_AGED] = "flow aged",
        [RTE_ETH_EVENT_RX_AVAIL_THRESH] = "RxQ available descriptors threshold 
reached",
+       [RTE_ETH_EVENT_ERR_RECOVERING] = "error recovering",
+       [RTE_ETH_EVENT_RECOVERY_SUCCESS] = "error recovery successful",
+       [RTE_ETH_EVENT_RECOVERY_FAILED] = "error recovery failed",
        [RTE_ETH_EVENT_MAX] = NULL,
 };
 
@@ -440,7 +443,10 @@ uint32_t event_print_mask = (UINT32_C(1) << 
RTE_ETH_EVENT_UNKNOWN) |
                            (UINT32_C(1) << RTE_ETH_EVENT_IPSEC) |
                            (UINT32_C(1) << RTE_ETH_EVENT_MACSEC) |
                            (UINT32_C(1) << RTE_ETH_EVENT_INTR_RMV) |
-                           (UINT32_C(1) << RTE_ETH_EVENT_FLOW_AGED);
+                           (UINT32_C(1) << RTE_ETH_EVENT_FLOW_AGED) |
+                           (UINT32_C(1) << RTE_ETH_EVENT_ERR_RECOVERING) |
+                           (UINT32_C(1) << RTE_ETH_EVENT_RECOVERY_SUCCESS) |
+                           (UINT32_C(1) << RTE_ETH_EVENT_RECOVERY_FAILED);
 /*
  * Decide if all memory are locked for performance.
  */
-- 
2.17.1

Reply via email to