Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/80730/?format=api
http://patchwork.dpdk.org/api/patches/80730/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/1602682146-4722-2-git-send-email-arybchenko@solarflare.com/", "project": { "id": 1, "url": "http://patchwork.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": "<1602682146-4722-2-git-send-email-arybchenko@solarflare.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1602682146-4722-2-git-send-email-arybchenko@solarflare.com", "date": "2020-10-14T13:28:56", "name": "[01/11] ethdev: change eth dev stop function to return int", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "36a3b7f6c45815fc84fe0b0786ac81b8185bfd8c", "submitter": { "id": 607, "url": "http://patchwork.dpdk.org/api/people/607/?format=api", "name": "Andrew Rybchenko", "email": "arybchenko@solarflare.com" }, "delegate": { "id": 319, "url": "http://patchwork.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/1602682146-4722-2-git-send-email-arybchenko@solarflare.com/mbox/", "series": [ { "id": 12958, "url": "http://patchwork.dpdk.org/api/series/12958/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=12958", "date": "2020-10-14T13:28:55", "name": "ethdev: change device stop to return status", "version": 1, "mbox": "http://patchwork.dpdk.org/series/12958/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/80730/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/80730/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id D8B07A04B7;\n\tWed, 14 Oct 2020 15:31:32 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 177A41DE1C;\n\tWed, 14 Oct 2020 15:29:28 +0200 (CEST)", "from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com\n [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 151CC1DDC4\n for <dev@dpdk.org>; Wed, 14 Oct 2020 15:29:19 +0200 (CEST)", "from mx1-us1.ppe-hosted.com (unknown [10.110.50.150])\n by dispatch1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id\n AA32C200CC; Wed, 14 Oct 2020 13:29:17 +0000 (UTC)", "from us4-mdac16-7.at1.mdlocal (unknown [10.110.49.174])\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id A854E800A7;\n Wed, 14 Oct 2020 13:29:17 +0000 (UTC)", "from mx1-us1.ppe-hosted.com (unknown [10.110.49.103])\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id\n 1A890100079;\n Wed, 14 Oct 2020 13:29:17 +0000 (UTC)", "from webmail.solarflare.com (uk.solarflare.com [193.34.186.16])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))\n (No client certificate requested)\n by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id\n BDE4698007B;\n Wed, 14 Oct 2020 13:29:15 +0000 (UTC)", "from ukex01.SolarFlarecom.com (10.17.10.4) by\n ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id\n 15.0.1497.2; Wed, 14 Oct 2020 14:29:12 +0100", "from opal.uk.solarflarecom.com (10.17.10.1) by\n ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server id\n 15.0.1497.2 via Frontend Transport; Wed, 14 Oct 2020 14:29:12 +0100", "from ukv-loginhost.uk.solarflarecom.com\n (ukv-loginhost.uk.solarflarecom.com [10.17.10.39])\n by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id 09EDTAfq009116;\n Wed, 14 Oct 2020 14:29:10 +0100", "from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1])\n by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 40BDB1613A9;\n Wed, 14 Oct 2020 14:29:10 +0100 (BST)" ], "X-Virus-Scanned": "Proofpoint Essentials engine", "From": "Andrew Rybchenko <arybchenko@solarflare.com>", "To": "Ray Kinsella <mdr@ashroe.eu>, Neil Horman <nhorman@tuxdriver.com>, \"Thomas\n Monjalon\" <thomas@monjalon.net>, Ferruh Yigit <ferruh.yigit@intel.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>", "CC": "<dev@dpdk.org>, Ivan Ilchenko <Ivan.Ilchenko@oktetlabs.ru>", "Date": "Wed, 14 Oct 2020 14:28:56 +0100", "Message-ID": "<1602682146-4722-2-git-send-email-arybchenko@solarflare.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1602682146-4722-1-git-send-email-arybchenko@solarflare.com>", "References": "<1602682146-4722-1-git-send-email-arybchenko@solarflare.com>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-TM-AS-Product-Ver": "SMEX-12.5.0.1300-8.6.1012-25724.003", "X-TM-AS-Result": "No-1.238400-8.000000-10", "X-TMASE-MatchedRID": "xz5dUIpVk2xWSqhPlGB83xz2MDiYujy50mSc1YzbC53iYlKox3ryNARj\n Z4/TzBlyZcz/Uu/FtYOn93rCC6a9lnT3K3VineCfw9GVhGa/57Y/pOSL72dTfwdkFovAReUoilv\n Ab18i4hPcL9OnXn2+9aW+3hCtK6/nFMFUQi+pamFVXhlmZsTdjEqAhuLHn5fE2MwxXd5kM2EY8d\n fj5o9RIpsamEZjK8gS8kaXXEQhzj2KhA2hG2DTq0rM69p7lDSswwD0mzFpRreHX0cDZiY+DdpGx\n yJBq9LmNqJuRbVKGyWAMuqetGVetnyef22ep6XYro1URZJFbJtsFus3s9zpUXm5u95yjsiuCSnS\n 3fyfdR0RrylMHUEZ4smM7iBaipcjgzxA6OA+3HSSgNLsUaQePPXKSh9pUFrtZfUv9UxvY+zw7Jx\n wU0EvZMqEROLb/+yO4/0Jvn0rwAJmtL4Dw+zNb5hXfxzgoU6P", "X-TM-AS-User-Approved-Sender": "Yes", "X-TM-AS-User-Blocked-Sender": "No", "X-TMASE-Result": "10--1.238400-8.000000", "X-TMASE-Version": "SMEX-12.5.0.1300-8.6.1012-25724.003", "X-MDID": "1602682157-RsglfFYIvzWf", "X-PPE-DISP": "1602682157;RsglfFYIvzWf", "Subject": "[dpdk-dev] [PATCH 01/11] ethdev: change eth dev stop function to\n\treturn int", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "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", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "From: Ivan Ilchenko <Ivan.Ilchenko@oktetlabs.ru>\n\nChange rte_eth_dev_stop() return value from void to int\nand return negative errno values in case of error conditions.\nAlso update the usage of the function in ethdev according to\nthe new return type.\n\nSigned-off-by: Ivan Ilchenko <Ivan.Ilchenko@oktetlabs.ru>\nSigned-off-by: Andrew Rybchenko <arybchenko@solarflare.com>\n---\n doc/guides/rel_notes/deprecation.rst | 1 -\n lib/librte_ethdev/rte_ethdev.c | 27 ++++++++++++++++++++-------\n lib/librte_ethdev/rte_ethdev.h | 2 +-\n 3 files changed, 21 insertions(+), 9 deletions(-)", "diff": "diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst\nindex 584e720879..f0bf656b47 100644\n--- a/doc/guides/rel_notes/deprecation.rst\n+++ b/doc/guides/rel_notes/deprecation.rst\n@@ -127,7 +127,6 @@ Deprecation Notices\n negative errno values to indicate various error conditions (e.g.\n invalid port ID, unsupported operation, failed operation):\n \n- - ``rte_eth_dev_stop``\n - ``rte_eth_dev_close``\n \n * ethdev: New offload flags ``DEV_RX_OFFLOAD_FLOW_MARK`` will be added in 19.11.\ndiff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c\nindex 5b7979a3b8..2226e429ba 100644\n--- a/lib/librte_ethdev/rte_ethdev.c\n+++ b/lib/librte_ethdev/rte_ethdev.c\n@@ -1662,7 +1662,7 @@ rte_eth_dev_start(uint16_t port_id)\n \tstruct rte_eth_dev *dev;\n \tstruct rte_eth_dev_info dev_info;\n \tint diag;\n-\tint ret;\n+\tint ret, ret_stop;\n \n \tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);\n \n@@ -1696,7 +1696,13 @@ rte_eth_dev_start(uint16_t port_id)\n \t\tRTE_ETHDEV_LOG(ERR,\n \t\t\t\"Error during restoring configuration for device (port %u): %s\\n\",\n \t\t\tport_id, rte_strerror(-ret));\n-\t\trte_eth_dev_stop(port_id);\n+\t\tret_stop = rte_eth_dev_stop(port_id);\n+\t\tif (ret_stop != 0) {\n+\t\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\t\"Failed to stop device (port %u): %s\\n\",\n+\t\t\t\tport_id, rte_strerror(-ret_stop));\n+\t\t}\n+\n \t\treturn ret;\n \t}\n \n@@ -1709,26 +1715,28 @@ rte_eth_dev_start(uint16_t port_id)\n \treturn 0;\n }\n \n-void\n+int\n rte_eth_dev_stop(uint16_t port_id)\n {\n \tstruct rte_eth_dev *dev;\n \n-\tRTE_ETH_VALID_PORTID_OR_RET(port_id);\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n \tdev = &rte_eth_devices[port_id];\n \n-\tRTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_stop);\n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_stop, -ENOTSUP);\n \n \tif (dev->data->dev_started == 0) {\n \t\tRTE_ETHDEV_LOG(INFO,\n \t\t\t\"Device with port_id=%\"PRIu16\" already stopped\\n\",\n \t\t\tport_id);\n-\t\treturn;\n+\t\treturn 0;\n \t}\n \n \tdev->data->dev_started = 0;\n \t(*dev->dev_ops->dev_stop)(dev);\n \trte_ethdev_trace_stop(port_id);\n+\n+\treturn 0;\n }\n \n int\n@@ -1784,7 +1792,12 @@ rte_eth_dev_reset(uint16_t port_id)\n \n \tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->dev_reset, -ENOTSUP);\n \n-\trte_eth_dev_stop(port_id);\n+\tret = rte_eth_dev_stop(port_id);\n+\tif (ret != 0) {\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Failed to stop device (port %u) before reset: %s - ignore\\n\",\n+\t\t\tport_id, rte_strerror(-ret));\n+\t}\n \tret = dev->dev_ops->dev_reset(dev);\n \n \treturn eth_err(port_id, ret);\ndiff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h\nindex f4cc5917b9..e8eedaf0af 100644\n--- a/lib/librte_ethdev/rte_ethdev.h\n+++ b/lib/librte_ethdev/rte_ethdev.h\n@@ -2278,7 +2278,7 @@ int rte_eth_dev_start(uint16_t port_id);\n * @param port_id\n * The port identifier of the Ethernet device.\n */\n-void rte_eth_dev_stop(uint16_t port_id);\n+int rte_eth_dev_stop(uint16_t port_id);\n \n /**\n * Link up an Ethernet device.\n", "prefixes": [ "01/11" ] }{ "id": 80730, "url": "