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 78BDCA0542; Sun, 9 Oct 2022 11:16:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6620C427FF; Sun, 9 Oct 2022 11:15:55 +0200 (CEST) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id D680940042 for ; Sun, 9 Oct 2022 11:15:50 +0200 (CEST) Received: from dggpeml500024.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Mlbqw2RwtzHtvq; Sun, 9 Oct 2022 17:10:52 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sun, 9 Oct 2022 17:15:49 +0800 From: Chengwen Feng To: , , CC: , , , , , Subject: [PATCH v11 3/5] app/testpmd: support error handling mode event Date: Sun, 9 Oct 2022 09:10:07 +0000 Message-ID: <20221009091009.38978-4-fengchengwen@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221009091009.38978-1-fengchengwen@huawei.com> References: <20220128124831.427-1-kalesh-anakkur.purayil@broadcom.com> <20221009091009.38978-1-fengchengwen@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500024.china.huawei.com (7.185.36.10) X-CFilter-Loop: Reflected 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 From: Kalesh AP This patch supports error handling mode event process. Signed-off-by: Kalesh AP Signed-off-by: Somnath Kotur Signed-off-by: Chengwen Feng Reviewed-by: Ajit Khaparde --- 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 14752f9571..c49681708e 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -166,9 +166,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 : " + printf(" --print-event : " "enable print of designated event or all of them.\n"); - printf(" --mask-event : " + printf(" --mask-event : " "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"); @@ -452,6 +452,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 bb1c901742..7104e61a2c 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -425,6 +425,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, }; @@ -439,7 +442,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