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 34EECA04B5; Wed, 30 Sep 2020 14:18:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A54B91DAFD; Wed, 30 Sep 2020 14:18:42 +0200 (CEST) Received: from relay.smtp-ext.broadcom.com (saphodev.broadcom.com [192.19.232.172]) by dpdk.org (Postfix) with ESMTP id 3726C1D669 for ; Wed, 30 Sep 2020 14:18:40 +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 396B73CE63 for ; Wed, 30 Sep 2020 05:18:38 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 relay.smtp-ext.broadcom.com 396B73CE63 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1601468318; bh=zYGZl6zMMdf1aM73bEY3HwQBLICWTS5bcrGsBuu8ttw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WECrourF//bpPHP4T2hrCotRkNJJXSkmtihOY5CBI1TyFFL43XdlPFIiGwZo23Fhm RdIsq6GCWOnJ1COiCbE/HLssqPjVKec7vKNSA/Nkpt6pIFEWt/lRpQ/T5qO/sWDMP/ 45RZWR0gt7GnVpPnmkm0EMjbw/vzn1JX2VOrnf50= From: Kalesh A P To: dev@dpdk.org Date: Wed, 30 Sep 2020 18:03:12 +0530 Message-Id: <20200930123314.27669-2-kalesh-anakkur.purayil@broadcom.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20200930123314.27669-1-kalesh-anakkur.purayil@broadcom.com> References: <20200122101654.20824-1-kalesh-anakkur.purayil@broadcom.com> <20200930123314.27669-1-kalesh-anakkur.purayil@broadcom.com> Subject: [dpdk-dev] [RFC PATCH v4 1/3] ethdev: support device reset and recovery events 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 Adding support for device reset and recovery events in the rte_eth_event framework. FW error and FW reset conditions would be managed internally by PMD without needing application intervention. In such cases, PMD would need reset/recovery events to notify application that PMD is undergoing a reset. Signed-off-by: Somnath Kotur Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde --- lib/librte_ethdev/rte_ethdev.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index 9759f13..c0c90b7 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -3207,6 +3207,23 @@ enum rte_eth_event_type { RTE_ETH_EVENT_DESTROY, /**< port is released */ RTE_ETH_EVENT_IPSEC, /**< IPsec offload related event */ RTE_ETH_EVENT_FLOW_AGED,/**< New aged-out flows is detected */ + RTE_ETH_EVENT_RESET, + /**< port resetting from an error + * + * PMD detected a FW reset or error condition. + * PMD will try to recover from the error. + * Data path will be halted and Control path operations + * would fail at this time. + */ + RTE_ETH_EVENT_RECOVERED, + /**< port recovered from an error + * + * PMD has recovered from the error condition. + * Control path and Data path are up now. + * Since the device undergone a reset, flow rules + * offloaded prior to the reset will be lost and + * the application has to recreate the rules again. + */ RTE_ETH_EVENT_MAX /**< max value of this enum */ }; -- 2.10.1