Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/45202/?format=api
https://patches.dpdk.org/api/patches/45202/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1537796604-29378-1-git-send-email-alejandro.lucero@netronome.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": "<1537796604-29378-1-git-send-email-alejandro.lucero@netronome.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1537796604-29378-1-git-send-email-alejandro.lucero@netronome.com", "date": "2018-09-24T13:43:24", "name": "ethdev: fix error handling logic", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "9dc2129c097bbb6cbe3ccea9855393177f547003", "submitter": { "id": 270, "url": "https://patches.dpdk.org/api/people/270/?format=api", "name": "Alejandro Lucero", "email": "alejandro.lucero@netronome.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/1537796604-29378-1-git-send-email-alejandro.lucero@netronome.com/mbox/", "series": [ { "id": 1466, "url": "https://patches.dpdk.org/api/series/1466/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=1466", "date": "2018-09-24T13:43:24", "name": "ethdev: fix error handling logic", "version": 1, "mbox": "https://patches.dpdk.org/series/1466/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/45202/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/45202/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 3F0DC2B8C;\n\tMon, 24 Sep 2018 15:44:38 +0200 (CEST)", "from netronome.com (host-79-78-33-110.static.as9105.net\n\t[79.78.33.110]) by dpdk.org (Postfix) with ESMTP id 2905A1AFF;\n\tMon, 24 Sep 2018 15:44:36 +0200 (CEST)", "from netronome.com (localhost [127.0.0.1])\n\tby netronome.com (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id\n\tw8ODhOE8029416; Mon, 24 Sep 2018 14:43:24 +0100", "(from alucero@localhost)\n\tby netronome.com (8.14.4/8.14.4/Submit) id w8ODhOep029415;\n\tMon, 24 Sep 2018 14:43:24 +0100" ], "From": "Alejandro Lucero <alejandro.lucero@netronome.com>", "To": "dev@dpdk.org", "Cc": "stable@dpdk.org", "Date": "Mon, 24 Sep 2018 14:43:24 +0100", "Message-Id": "<1537796604-29378-1-git-send-email-alejandro.lucero@netronome.com>", "X-Mailer": "git-send-email 1.9.1", "Subject": "[dpdk-dev] [PATCH] ethdev: fix error handling logic", "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "This patch fixes how function exit is handled when errors inside\nrte_eth_dev_create.\n\nFixes: e489007a411c (\"ethdev: add generic create/destroy ethdev APIs\")\nCc: stable@dpdk.org\n\nSigned-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>\n---\n lib/librte_ethdev/rte_ethdev.c | 12 +++++-------\n 1 file changed, 5 insertions(+), 7 deletions(-)", "diff": "diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c\nindex aa7730c..ef99f70 100644\n--- a/lib/librte_ethdev/rte_ethdev.c\n+++ b/lib/librte_ethdev/rte_ethdev.c\n@@ -3467,10 +3467,8 @@ int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,\n \n \tif (rte_eal_process_type() == RTE_PROC_PRIMARY) {\n \t\tethdev = rte_eth_dev_allocate(name);\n-\t\tif (!ethdev) {\n-\t\t\tretval = -ENODEV;\n-\t\t\tgoto probe_failed;\n-\t\t}\n+\t\tif (!ethdev)\n+\t\t\treturn -ENODEV;\n \n \t\tif (priv_data_size) {\n \t\t\tethdev->data->dev_private = rte_zmalloc_socket(\n@@ -3480,7 +3478,7 @@ int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,\n \t\t\tif (!ethdev->data->dev_private) {\n \t\t\t\tRTE_LOG(ERR, EAL, \"failed to allocate private data\");\n \t\t\t\tretval = -ENOMEM;\n-\t\t\t\tgoto probe_failed;\n+\t\t\t\tgoto data_alloc_failed;\n \t\t\t}\n \t\t}\n \t} else {\n@@ -3488,8 +3486,7 @@ int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,\n \t\tif (!ethdev) {\n \t\t\tRTE_LOG(ERR, EAL, \"secondary process attach failed, \"\n \t\t\t\t\"ethdev doesn't exist\");\n-\t\t\tretval = -ENODEV;\n-\t\t\tgoto probe_failed;\n+\t\t\treturn -ENODEV;\n \t\t}\n \t}\n \n@@ -3518,6 +3515,7 @@ int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx,\n \tif (rte_eal_process_type() == RTE_PROC_PRIMARY)\n \t\trte_free(ethdev->data->dev_private);\n \n+data_alloc_failed:\n \trte_eth_dev_release_port(ethdev);\n \n \treturn retval;\n", "prefixes": [] }{ "id": 45202, "url": "