Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/116636/?format=api
https://patches.dpdk.org/api/patches/116636/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220922074151.39450-2-fengchengwen@huawei.com/", "project": { "id": 1, "url": "https://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20220922074151.39450-2-fengchengwen@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220922074151.39450-2-fengchengwen@huawei.com", "date": "2022-09-22T07:41:47", "name": "[v9,1/5] ethdev: support get port error handling mode", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "9a78b508dbbe0032688b4829441410d5600b84e2", "submitter": { "id": 2146, "url": "https://patches.dpdk.org/api/people/2146/?format=api", "name": "fengchengwen", "email": "fengchengwen@huawei.com" }, "delegate": { "id": 319, "url": "https://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220922074151.39450-2-fengchengwen@huawei.com/mbox/", "series": [ { "id": 24773, "url": "https://patches.dpdk.org/api/series/24773/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=24773", "date": "2022-09-22T07:41:51", "name": "support error handling mode", "version": 9, "mbox": "https://patches.dpdk.org/series/24773/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/116636/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/116636/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 03E0DA0543;\n\tThu, 22 Sep 2022 09:48:20 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2DAE741145;\n\tThu, 22 Sep 2022 09:48:11 +0200 (CEST)", "from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187])\n by mails.dpdk.org (Postfix) with ESMTP id 2A9FB400D7\n for <dev@dpdk.org>; Thu, 22 Sep 2022 09:48:07 +0200 (CEST)", "from dggpeml500024.china.huawei.com (unknown [172.30.72.56])\n by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4MY6jS2vkszlWT6;\n Thu, 22 Sep 2022 15:43:56 +0800 (CST)", "from localhost.localdomain (10.67.165.24) by\n dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2375.31; Thu, 22 Sep 2022 15:48:04 +0800" ], "From": "Chengwen Feng <fengchengwen@huawei.com>", "To": "<thomas@monjalon.net>, <ferruh.yigit@xilinx.com>, <ferruh.yigit@amd.com>", "CC": "<dev@dpdk.org>, <kalesh-anakkur.purayil@broadcom.com>,\n <somnath.kotur@broadcom.com>, <ajit.khaparde@broadcom.com>, <mdr@ashroe.eu>,\n <Andrew.Rybchenko@oktetlabs.ru>", "Subject": "[PATCH v9 1/5] ethdev: support get port error handling mode", "Date": "Thu, 22 Sep 2022 07:41:47 +0000", "Message-ID": "<20220922074151.39450-2-fengchengwen@huawei.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20220922074151.39450-1-fengchengwen@huawei.com>", "References": "<20220128124831.427-1-kalesh-anakkur.purayil@broadcom.com>\n <20220922074151.39450-1-fengchengwen@huawei.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-Originating-IP": "[10.67.165.24]", "X-ClientProxiedBy": "dggems705-chm.china.huawei.com (10.3.19.182) To\n 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 <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "This patch support gets port's error handling mode by\nrte_eth_dev_info_get() API.\n\nCurrently, the defined modes include:\n1) NONE: it means no error handling modes are supported by this port.\n2) PASSIVE: passive error handling, after the PMD detect that a reset\nis required, the PMD reports RTE_ETH_EVENT_INTR_RESET event, and\napplication invoke rte_eth_dev_reset() to recover the port.\n\nSigned-off-by: Chengwen Feng <fengchengwen@huawei.com>\n---\n app/test-pmd/config.c | 2 ++\n drivers/net/e1000/igb_ethdev.c | 2 ++\n drivers/net/ena/ena_ethdev.c | 2 ++\n drivers/net/iavf/iavf_ethdev.c | 2 ++\n drivers/net/ixgbe/ixgbe_ethdev.c | 2 ++\n drivers/net/txgbe/txgbe_ethdev_vf.c | 2 ++\n lib/ethdev/rte_ethdev.h | 19 ++++++++++++++++++-\n 7 files changed, 30 insertions(+), 1 deletion(-)", "diff": "diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex 86054455d2..0c10c663e9 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -922,6 +922,8 @@ port_infos_display(portid_t port_id)\n \t\t\tprintf(\"Switch Rx domain: %u\\n\",\n \t\t\t dev_info.switch_info.rx_domain);\n \t}\n+\tif (dev_info.err_handle_mode == RTE_ETH_ERROR_HANDLE_MODE_PASSIVE)\n+\t\tprintf(\"Device error handling mode: passive\\n\");\n }\n \n void\ndiff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c\nindex a9c18b27e8..dea69c9db1 100644\n--- a/drivers/net/e1000/igb_ethdev.c\n+++ b/drivers/net/e1000/igb_ethdev.c\n@@ -2341,6 +2341,8 @@ eth_igbvf_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n \tdev_info->rx_desc_lim = rx_desc_lim;\n \tdev_info->tx_desc_lim = tx_desc_lim;\n \n+\tdev_info->err_handle_mode = RTE_ETH_ERROR_HANDLE_MODE_PASSIVE;\n+\n \treturn 0;\n }\n \ndiff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c\nindex 3e88bcda6c..efcb163027 100644\n--- a/drivers/net/ena/ena_ethdev.c\n+++ b/drivers/net/ena/ena_ethdev.c\n@@ -2482,6 +2482,8 @@ static int ena_infos_get(struct rte_eth_dev *dev,\n \tdev_info->default_rxportconf.ring_size = ENA_DEFAULT_RING_SIZE;\n \tdev_info->default_txportconf.ring_size = ENA_DEFAULT_RING_SIZE;\n \n+\tdev_info->err_handle_mode = RTE_ETH_ERROR_HANDLE_MODE_PASSIVE;\n+\n \treturn 0;\n }\n \ndiff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c\nindex 652f0d00a5..b2ef2dc366 100644\n--- a/drivers/net/iavf/iavf_ethdev.c\n+++ b/drivers/net/iavf/iavf_ethdev.c\n@@ -1178,6 +1178,8 @@ iavf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n \t\t.nb_align = IAVF_ALIGN_RING_DESC,\n \t};\n \n+\tdev_info->err_handle_mode = RTE_ETH_ERROR_HANDLE_MODE_PASSIVE;\n+\n \treturn 0;\n }\n \ndiff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c\nindex f31bbb7895..7b68b171e6 100644\n--- a/drivers/net/ixgbe/ixgbe_ethdev.c\n+++ b/drivers/net/ixgbe/ixgbe_ethdev.c\n@@ -4056,6 +4056,8 @@ ixgbevf_dev_info_get(struct rte_eth_dev *dev,\n \tdev_info->rx_desc_lim = rx_desc_lim;\n \tdev_info->tx_desc_lim = tx_desc_lim;\n \n+\tdev_info->err_handle_mode = RTE_ETH_ERROR_HANDLE_MODE_PASSIVE;\n+\n \treturn 0;\n }\n \ndiff --git a/drivers/net/txgbe/txgbe_ethdev_vf.c b/drivers/net/txgbe/txgbe_ethdev_vf.c\nindex f52cd8bc19..3b1f7c913b 100644\n--- a/drivers/net/txgbe/txgbe_ethdev_vf.c\n+++ b/drivers/net/txgbe/txgbe_ethdev_vf.c\n@@ -521,6 +521,8 @@ txgbevf_dev_info_get(struct rte_eth_dev *dev,\n \tdev_info->rx_desc_lim = rx_desc_lim;\n \tdev_info->tx_desc_lim = tx_desc_lim;\n \n+\tdev_info->err_handle_mode = RTE_ETH_ERROR_HANDLE_MODE_PASSIVE;\n+\n \treturn 0;\n }\n \ndiff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h\nindex de9e970d4d..930b0a2fff 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -1848,6 +1848,19 @@ enum rte_eth_representor_type {\n \tRTE_ETH_REPRESENTOR_PF, /**< representor of Physical Function. */\n };\n \n+/**\n+ * Ethernet device error handling mode.\n+ */\n+enum rte_eth_err_handle_mode {\n+\t/** No error handling modes are supported. */\n+\tRTE_ETH_ERROR_HANDLE_MODE_NONE,\n+\t/** Passive error handling, after the PMD detect that a reset is\n+\t * required, the PMD reports @see RTE_ETH_EVENT_INTR_RESET event, and\n+\t * application invoke @see rte_eth_dev_reset to recover the port.\n+\t */\n+\tRTE_ETH_ERROR_HANDLE_MODE_PASSIVE,\n+};\n+\n /**\n * A structure used to retrieve the contextual information of\n * an Ethernet device, such as the controlling driver of the\n@@ -1908,8 +1921,12 @@ struct rte_eth_dev_info {\n \t * embedded managed interconnect/switch.\n \t */\n \tstruct rte_eth_switch_info switch_info;\n+\t/** Supported error handling mode. @see enum rte_eth_err_handle_mode */\n+\tuint8_t err_handle_mode;\n \n-\tuint64_t reserved_64s[2]; /**< Reserved for future fields */\n+\tuint8_t reserved_8; /**< Reserved for future fields */\n+\tuint16_t reserved_16s[3]; /**< Reserved for future fields */\n+\tuint64_t reserved_64; /**< Reserved for future fields */\n \tvoid *reserved_ptrs[2]; /**< Reserved for future fields */\n };\n \n", "prefixes": [ "v9", "1/5" ] }{ "id": 116636, "url": "