From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7BF6AA052F; Wed, 22 Jan 2020 11:00:17 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E1383343C; Wed, 22 Jan 2020 10:59:56 +0100 (CET) Received: from relay.smtp.broadcom.com (unknown [192.19.211.62]) by dpdk.org (Postfix) with ESMTP id 91F4BF04 for ; Wed, 22 Jan 2020 10:59:50 +0100 (CET) Received: from dhcp-10-123-153-22.dhcp.broadcom.net (bgccx-dev-host-lnx2.bec.broadcom.net [10.123.153.22]) by relay.smtp.broadcom.com (Postfix) with ESMTP id B350528DFC4; Wed, 22 Jan 2020 01:59:49 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com B350528DFC4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1579687189; bh=1dm5KAtDwwtQU7QDfMr3NRabSLfcW/Es/FZIVldMqJA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lioO0xMlrm84PBFpt8Lft9uM+FlTdN/ErnHxDX+157z0d6OTey6Hck8s5bF9K/wC+ iHxF+FLg6/kqn9o94lEI0S/04uqa5GYDApnZ6pDqG/nEVKtW58Ur2TFtAQT6FMosN9 6qqgS+w3WaFlHcMrId61DaXZgviLlGGl4dTiOn1M= From: Kalesh A P To: dev@dpdk.org Cc: thomas@monjalon.net, ferruh.yigit@intel.com, declan.doherty@intel.com Date: Wed, 22 Jan 2020 15:46:54 +0530 Message-Id: <20200122101654.20824-4-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20200122101654.20824-1-kalesh-anakkur.purayil@broadcom.com> References: <20200122101654.20824-1-kalesh-anakkur.purayil@broadcom.com> Subject: [dpdk-dev] [RFC PATCH 3/3] app/testpmd: handle device recovery event X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 Added code to handle device recovery event in testpmd. This is an indication from PMD that it has recovered from a FW reset or FW error condition. Signed-off-by: Kalesh AP Reviewed-by: Ajit Kumar Khaparde --- app/test-pmd/testpmd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index f9f4cd1..d1f063e 100644 --- a/app/test-pmd/testpmd.c +++ b/app/test-pmd/testpmd.c @@ -375,6 +375,7 @@ static const char * const eth_event_desc[] = { [RTE_ETH_EVENT_INTR_RMV] = "device removal", [RTE_ETH_EVENT_NEW] = "device probed", [RTE_ETH_EVENT_DESTROY] = "device released", + [RTE_ETH_EVENT_RECOVERED] = "device recovered", [RTE_ETH_EVENT_MAX] = NULL, }; @@ -388,7 +389,8 @@ uint32_t event_print_mask = (UINT32_C(1) << RTE_ETH_EVENT_UNKNOWN) | (UINT32_C(1) << RTE_ETH_EVENT_INTR_RESET) | (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_INTR_RMV) | + (UINT32_C(1) << RTE_ETH_EVENT_RECOVERED); /* * Decide if all memory are locked for performance. */ @@ -2920,6 +2922,9 @@ eth_event_callback(portid_t port_id, enum rte_eth_event_type type, void *param, rmv_port_callback, (void *)(intptr_t)port_id)) fprintf(stderr, "Could not set up deferred device removal\n"); break; + case RTE_ETH_EVENT_RECOVERED: + printf("Please recreate any rules offloaded prior to this\n"); + break; default: break; } -- 2.10.1