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 3EF95A0544; Mon, 10 Oct 2022 10:44:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 30FB64021E; Mon, 10 Oct 2022 10:44:18 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 1AF7140146 for ; Mon, 10 Oct 2022 10:44:17 +0200 (CEST) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 76C925E; Mon, 10 Oct 2022 11:44:16 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 76C925E DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1665391456; bh=lrXZCBybTiBDcTNZirBFjSaOmduDCijrO5wttWfUBXk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=APlaz2E5Rm7+ZN/Ke2M+9SO6ycRcfEDXzf7XhIsVVVKVp4qTFELSM8PeFF7Y78Z/p +f3xc8QEigGVfKdUDQHSXKJtm5kuNuF/G65BYPbe4QO0jHz+hfg097gU0pJlGhb/qY K58eS7t2FALnXhuEEr6dYGz0AxbjEe8NQhp+cMSM= Message-ID: <307d2f52-d2ef-b0b7-e6c5-a668898a998c@oktetlabs.ru> Date: Mon, 10 Oct 2022 11:44:16 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [PATCH v11 1/5] ethdev: support get port error handling mode Content-Language: en-US To: Chengwen Feng , 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 References: <20220128124831.427-1-kalesh-anakkur.purayil@broadcom.com> <20221009091009.38978-1-fengchengwen@huawei.com> <20221009091009.38978-2-fengchengwen@huawei.com> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: <20221009091009.38978-2-fengchengwen@huawei.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 On 10/9/22 12:10, Chengwen Feng wrote: > This patch support gets port's error handling mode by > rte_eth_dev_info_get() API. > > Currently, the defined modes include: > 1) NONE: it means no error handling modes are supported by this port. > 2) PASSIVE: passive error handling, after the PMD detect that a reset > is required, the PMD reports RTE_ETH_EVENT_INTR_RESET event, and > application invoke rte_eth_dev_reset() to recover the port. > > Signed-off-by: Chengwen Feng in fact one more point below > --- > app/test-pmd/config.c | 2 ++ > drivers/net/e1000/igb_ethdev.c | 2 ++ > drivers/net/ena/ena_ethdev.c | 2 ++ > drivers/net/iavf/iavf_ethdev.c | 2 ++ > drivers/net/ixgbe/ixgbe_ethdev.c | 2 ++ > drivers/net/txgbe/txgbe_ethdev_vf.c | 2 ++ > lib/ethdev/rte_ethdev.h | 22 +++++++++++++++++++++- > 7 files changed, 33 insertions(+), 1 deletion(-) > > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c > index 841e8efe78..bd7f2ba257 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c > @@ -921,6 +921,8 @@ port_infos_display(portid_t port_id) > printf("Switch Rx domain: %u\n", > dev_info.switch_info.rx_domain); > } > + if (dev_info.err_handle_mode == RTE_ETH_ERROR_HANDLE_MODE_PASSIVE) > + printf("Device error handling mode: passive\n"); It should be done using switch/case instead of if/elseif. Also I'd say that none should be handled as well. > } > > void