Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/56075/?format=api
http://patches.dpdk.org/api/patches/56075/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1562234612-631-2-git-send-email-arybchenko@solarflare.com/", "project": { "id": 1, "url": "http://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": "<1562234612-631-2-git-send-email-arybchenko@solarflare.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1562234612-631-2-git-send-email-arybchenko@solarflare.com", "date": "2019-07-04T10:03:30", "name": "[1/3] eventdev: fix to set positive rte_errno", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "9624f1038c9a40036b4e18f77d36769fb7cdfaa2", "submitter": { "id": 607, "url": "http://patches.dpdk.org/api/people/607/?format=api", "name": "Andrew Rybchenko", "email": "arybchenko@solarflare.com" }, "delegate": { "id": 310, "url": "http://patches.dpdk.org/api/users/310/?format=api", "username": "jerin", "first_name": "Jerin", "last_name": "Jacob", "email": "jerinj@marvell.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1562234612-631-2-git-send-email-arybchenko@solarflare.com/mbox/", "series": [ { "id": 5335, "url": "http://patches.dpdk.org/api/series/5335/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=5335", "date": "2019-07-04T10:03:29", "name": "eventdev fixes to set positive rte_errno", "version": 1, "mbox": "http://patches.dpdk.org/series/5335/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/56075/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/56075/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 984331BDE5;\n\tThu, 4 Jul 2019 12:03:58 +0200 (CEST)", "from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com\n\t[67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 9EBB11B9A0;\n\tThu, 4 Jul 2019 12:03:56 +0200 (CEST)", "from webmail.solarflare.com (webmail.solarflare.com\n\t[12.187.104.26])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id\n\t896C940006A; Thu, 4 Jul 2019 10:03:55 +0000 (UTC)", "from ocex03.SolarFlarecom.com (10.20.40.36) by\n\tocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server\n\t(TLS) id 15.0.1395.4; Thu, 4 Jul 2019 03:03:52 -0700", "from opal.uk.solarflarecom.com (10.17.10.1) by\n\tocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server\n\t(TLS) id\n\t15.0.1395.4 via Frontend Transport; Thu, 4 Jul 2019 03:03:52 -0700", "from ukv-loginhost.uk.solarflarecom.com\n\t(ukv-loginhost.uk.solarflarecom.com [10.17.10.39])\n\tby opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id\n\tx64A3ph8021322; Thu, 4 Jul 2019 11:03:51 +0100", "from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1])\n\tby ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id\n\t0C7981613C2; Thu, 4 Jul 2019 11:03:51 +0100 (BST)" ], "X-Virus-Scanned": "Proofpoint Essentials engine", "From": "Andrew Rybchenko <arybchenko@solarflare.com>", "To": "Jerin Jacob <jerinj@marvell.com>, Nikhil Rao <nikhil.rao@intel.com>,\n\t\"Erik Gabriel Carrillo\" <erik.g.carrillo@intel.com>", "CC": "<dev@dpdk.org>, Dilshod Urazov <Dilshod.Urazov@oktetlabs.ru>,\n\t<stable@dpdk.org>", "Date": "Thu, 4 Jul 2019 11:03:30 +0100", "Message-ID": "<1562234612-631-2-git-send-email-arybchenko@solarflare.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1562234612-631-1-git-send-email-arybchenko@solarflare.com>", "References": "<1562234612-631-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.5.1010-24738.005", "X-TM-AS-Result": "No-11.852300-4.000000-10", "X-TMASE-MatchedRID": "BkMpb3gCdH6KQsBMcfAIqeuhtmmz4+rYKDskCYe7jihjyv+d0Z0OxYVH\n\t2zcrc5+5jCil0wQw2lLiAp6vkYgGXbhYaHW9RIv/Pja3w1ExF8Q/pOSL72dTfwdkFovAReUoLPJ\n\ttWpbJjY3LLCKyF09LW3r3QpbFFsBrtLBZFT+Jy66bbGl0ztMpl3vEgoSBmr8BUjFJwpdmcrTj3a\n\tQyxbuPYmINlOGYJobx0WfbEzp7A7uwOCWVB42yGtYpUOCigMK3wJjn8yqLU6Ko8aocg8ZmIx3+O\n\tLpZQttdYkf8dVZxle+9moU6TdG2HSjehnVy6ln2joyKzEmtrEdJaD67iKvY08uSXx71bvSLRh00\n\tGGPaDz9abtDUTUShUTQ6mr/whkMreIWtaoT+rz5TLFbi+a8u3awmLjb7urxIC/U4++8MvOxv2TR\n\tSfxSVxuLzNWBegCW2wgn7iDBesS0gBwKKRHe+r+U77lit4zi38iBs26LS5H6Hdu5AlF853VnYi/\n\tNf+ZkigqTzsdnpBF4=", "X-TM-AS-User-Approved-Sender": "No", "X-TM-AS-User-Blocked-Sender": "No", "X-TMASE-Result": "10--11.852300-4.000000", "X-TMASE-Version": "SMEX-12.5.0.1300-8.5.1010-24738.005", "X-MDID": "1562234636-18AvSe9yRFkm", "Subject": "[dpdk-dev] [PATCH 1/3] eventdev: fix to set positive rte_errno", "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": "From: Dilshod Urazov <Dilshod.Urazov@oktetlabs.ru>\n\nFixes: c9bf83947e2e (\"eventdev: add eth Tx adapter APIs\")\nFixes: 47d05b292820 (\"eventdev: add timer adapter common code\")\nFixes: 6750b21bd6af (\"eventdev: add default software timer adapter\")\nFixes: c75f7897ea35 (\"eventdev: set error code in port link/unlink functions\")\nFixes: 7d1acc9dde93 (\"eventdev: introduce helper function for enqueue burst\")\nFixes: 406aed4e0dd9 (\"eventdev: add errno-style return values\")\nFixes: c64e1b7b20d2 (\"eventdev: add new software event timer adapter\")\nCc: stable@dpdk.org\n\nSigned-off-by: Dilshod Urazov <Dilshod.Urazov@oktetlabs.ru>\nSigned-off-by: Andrew Rybchenko <arybchenko@solarflare.com>\n---\n lib/librte_eventdev/rte_event_eth_tx_adapter.h | 8 ++++----\n lib/librte_eventdev/rte_event_timer_adapter.c | 18 +++++++++---------\n lib/librte_eventdev/rte_eventdev.c | 16 ++++++++--------\n lib/librte_eventdev/rte_eventdev.h | 26 +++++++++++++-------------\n 4 files changed, 34 insertions(+), 34 deletions(-)", "diff": "diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.h b/lib/librte_eventdev/rte_event_eth_tx_adapter.h\nindex 9bed12b..c848261 100644\n--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.h\n+++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.h\n@@ -332,10 +332,10 @@ struct rte_event_eth_tx_adapter_stats {\n * *rte_event*. If the return value is less than *nb_events*, the remaining\n * events at the end of ev[] are not consumed and the caller has to take care\n * of them, and rte_errno is set accordingly. Possible errno values include:\n- * - -EINVAL The port ID is invalid, device ID is invalid, an event's queue\n+ * - EINVAL The port ID is invalid, device ID is invalid, an event's queue\n * ID is invalid, or an event's sched type doesn't match the\n * capabilities of the destination queue.\n- * - -ENOSPC The event port was backpressured and unable to enqueue\n+ * - ENOSPC The event port was backpressured and unable to enqueue\n * one or more events. This error code is only applicable to\n * closed systems.\n */\n@@ -350,12 +350,12 @@ struct rte_event_eth_tx_adapter_stats {\n #ifdef RTE_LIBRTE_EVENTDEV_DEBUG\n \tif (dev_id >= RTE_EVENT_MAX_DEVS ||\n \t\t!rte_eventdevs[dev_id].attached) {\n-\t\trte_errno = -EINVAL;\n+\t\trte_errno = EINVAL;\n \t\treturn 0;\n \t}\n \n \tif (port_id >= dev->data->nb_ports) {\n-\t\trte_errno = -EINVAL;\n+\t\trte_errno = EINVAL;\n \t\treturn 0;\n \t}\n #endif\ndiff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c\nindex 459bc47..5ce399e 100644\n--- a/lib/librte_eventdev/rte_event_timer_adapter.c\n+++ b/lib/librte_eventdev/rte_event_timer_adapter.c\n@@ -192,17 +192,17 @@ struct rte_event_timer_adapter *\n \t\t\t\t\t\t &adapter->data->caps,\n \t\t\t\t\t\t &adapter->ops);\n \tif (ret < 0) {\n-\t\trte_errno = ret;\n+\t\trte_errno = -ret;\n \t\tgoto free_memzone;\n \t}\n \n \tif (!(adapter->data->caps &\n \t RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT)) {\n-\t\tFUNC_PTR_OR_NULL_RET_WITH_ERRNO(conf_cb, -EINVAL);\n+\t\tFUNC_PTR_OR_NULL_RET_WITH_ERRNO(conf_cb, EINVAL);\n \t\tret = conf_cb(adapter->data->id, adapter->data->event_dev_id,\n \t\t\t &adapter->data->event_port_id, conf_arg);\n \t\tif (ret < 0) {\n-\t\t\trte_errno = ret;\n+\t\t\trte_errno = -ret;\n \t\t\tgoto free_memzone;\n \t\t}\n \t}\n@@ -214,10 +214,10 @@ struct rte_event_timer_adapter *\n \t\tadapter->ops = &swtim_ops;\n \n \t/* Allow driver to do some setup */\n-\tFUNC_PTR_OR_NULL_RET_WITH_ERRNO(adapter->ops->init, -ENOTSUP);\n+\tFUNC_PTR_OR_NULL_RET_WITH_ERRNO(adapter->ops->init, ENOTSUP);\n \tret = adapter->ops->init(adapter);\n \tif (ret < 0) {\n-\t\trte_errno = ret;\n+\t\trte_errno = -ret;\n \t\tgoto free_memzone;\n \t}\n \n@@ -509,11 +509,11 @@ struct event_buffer {\n \t*nb_events_flushed = rte_event_enqueue_burst(dev_id, port_id,\n \t\t\t\t\t\t &events[tail_idx], n);\n \tif (*nb_events_flushed != n) {\n-\t\tif (rte_errno == -EINVAL) {\n+\t\tif (rte_errno == EINVAL) {\n \t\t\tEVTIM_LOG_ERR(\"failed to enqueue invalid event - \"\n \t\t\t\t \"dropping it\");\n \t\t\t(*nb_events_inv)++;\n-\t\t} else if (rte_errno == -ENOSPC)\n+\t\t} else if (rte_errno == ENOSPC)\n \t\t\trte_pause();\n \t}\n \n@@ -832,7 +832,7 @@ struct swtim {\n \tif (ret < 0) {\n \t\tif (ret != -EALREADY) {\n \t\t\tEVTIM_LOG_ERR(\"failed to initialize timer subsystem\");\n-\t\t\trte_errno = ret;\n+\t\t\trte_errno = -ret;\n \t\t\tgoto free_mempool;\n \t\t}\n \t}\n@@ -840,7 +840,7 @@ struct swtim {\n \tret = rte_timer_data_alloc(&sw->timer_data_id);\n \tif (ret < 0) {\n \t\tEVTIM_LOG_ERR(\"failed to allocate timer data instance\");\n-\t\trte_errno = ret;\n+\t\trte_errno = -ret;\n \t\tgoto free_mempool;\n \t}\n \ndiff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c\nindex cc3199f..f44c869 100644\n--- a/lib/librte_eventdev/rte_eventdev.c\n+++ b/lib/librte_eventdev/rte_eventdev.c\n@@ -889,18 +889,18 @@\n \tuint16_t *links_map;\n \tint i, diag;\n \n-\tRTE_EVENTDEV_VALID_DEVID_OR_ERRNO_RET(dev_id, -EINVAL, 0);\n+\tRTE_EVENTDEV_VALID_DEVID_OR_ERRNO_RET(dev_id, EINVAL, 0);\n \tdev = &rte_eventdevs[dev_id];\n \n \tif (*dev->dev_ops->port_link == NULL) {\n \t\tRTE_EDEV_LOG_ERR(\"Function not supported\\n\");\n-\t\trte_errno = -ENOTSUP;\n+\t\trte_errno = ENOTSUP;\n \t\treturn 0;\n \t}\n \n \tif (!is_valid_port(dev, port_id)) {\n \t\tRTE_EDEV_LOG_ERR(\"Invalid port_id=%\" PRIu8, port_id);\n-\t\trte_errno = -EINVAL;\n+\t\trte_errno = EINVAL;\n \t\treturn 0;\n \t}\n \n@@ -921,7 +921,7 @@\n \n \tfor (i = 0; i < nb_links; i++)\n \t\tif (queues[i] >= dev->data->nb_queues) {\n-\t\t\trte_errno = -EINVAL;\n+\t\t\trte_errno = EINVAL;\n \t\t\treturn 0;\n \t\t}\n \n@@ -948,18 +948,18 @@\n \tint i, diag, j;\n \tuint16_t *links_map;\n \n-\tRTE_EVENTDEV_VALID_DEVID_OR_ERRNO_RET(dev_id, -EINVAL, 0);\n+\tRTE_EVENTDEV_VALID_DEVID_OR_ERRNO_RET(dev_id, EINVAL, 0);\n \tdev = &rte_eventdevs[dev_id];\n \n \tif (*dev->dev_ops->port_unlink == NULL) {\n \t\tRTE_EDEV_LOG_ERR(\"Function not supported\");\n-\t\trte_errno = -ENOTSUP;\n+\t\trte_errno = ENOTSUP;\n \t\treturn 0;\n \t}\n \n \tif (!is_valid_port(dev, port_id)) {\n \t\tRTE_EDEV_LOG_ERR(\"Invalid port_id=%\" PRIu8, port_id);\n-\t\trte_errno = -EINVAL;\n+\t\trte_errno = EINVAL;\n \t\treturn 0;\n \t}\n \n@@ -988,7 +988,7 @@\n \tnb_unlinks = j;\n \tfor (i = 0; i < nb_unlinks; i++)\n \t\tif (queues[i] >= dev->data->nb_queues) {\n-\t\t\trte_errno = -EINVAL;\n+\t\t\trte_errno = EINVAL;\n \t\t\treturn 0;\n \t\t}\n \ndiff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h\nindex 927f43c..5044a13 100644\n--- a/lib/librte_eventdev/rte_eventdev.h\n+++ b/lib/librte_eventdev/rte_eventdev.h\n@@ -1318,12 +1318,12 @@ struct rte_eventdev {\n \n #ifdef RTE_LIBRTE_EVENTDEV_DEBUG\n \tif (dev_id >= RTE_EVENT_MAX_DEVS || !rte_eventdevs[dev_id].attached) {\n-\t\trte_errno = -EINVAL;\n+\t\trte_errno = EINVAL;\n \t\treturn 0;\n \t}\n \n \tif (port_id >= dev->data->nb_ports) {\n-\t\trte_errno = -EINVAL;\n+\t\trte_errno = EINVAL;\n \t\treturn 0;\n \t}\n #endif\n@@ -1372,10 +1372,10 @@ struct rte_eventdev {\n * *rte_event*. If the return value is less than *nb_events*, the remaining\n * events at the end of ev[] are not consumed and the caller has to take care\n * of them, and rte_errno is set accordingly. Possible errno values include:\n- * - -EINVAL The port ID is invalid, device ID is invalid, an event's queue\n+ * - EINVAL The port ID is invalid, device ID is invalid, an event's queue\n * ID is invalid, or an event's sched type doesn't match the\n * capabilities of the destination queue.\n- * - -ENOSPC The event port was backpressured and unable to enqueue\n+ * - ENOSPC The event port was backpressured and unable to enqueue\n * one or more events. This error code is only applicable to\n * closed systems.\n * @see rte_event_port_attr_get(), RTE_EVENT_PORT_ATTR_ENQ_DEPTH\n@@ -1422,10 +1422,10 @@ struct rte_eventdev {\n * *rte_event*. If the return value is less than *nb_events*, the remaining\n * events at the end of ev[] are not consumed and the caller has to take care\n * of them, and rte_errno is set accordingly. Possible errno values include:\n- * - -EINVAL The port ID is invalid, device ID is invalid, an event's queue\n+ * - EINVAL The port ID is invalid, device ID is invalid, an event's queue\n * ID is invalid, or an event's sched type doesn't match the\n * capabilities of the destination queue.\n- * - -ENOSPC The event port was backpressured and unable to enqueue\n+ * - ENOSPC The event port was backpressured and unable to enqueue\n * one or more events. This error code is only applicable to\n * closed systems.\n * @see rte_event_port_attr_get(), RTE_EVENT_PORT_ATTR_ENQ_DEPTH\n@@ -1473,10 +1473,10 @@ struct rte_eventdev {\n * *rte_event*. If the return value is less than *nb_events*, the remaining\n * events at the end of ev[] are not consumed and the caller has to take care\n * of them, and rte_errno is set accordingly. Possible errno values include:\n- * - -EINVAL The port ID is invalid, device ID is invalid, an event's queue\n+ * - EINVAL The port ID is invalid, device ID is invalid, an event's queue\n * ID is invalid, or an event's sched type doesn't match the\n * capabilities of the destination queue.\n- * - -ENOSPC The event port was backpressured and unable to enqueue\n+ * - ENOSPC The event port was backpressured and unable to enqueue\n * one or more events. This error code is only applicable to\n * closed systems.\n * @see rte_event_port_attr_get(), RTE_EVENT_PORT_ATTR_ENQ_DEPTH\n@@ -1595,12 +1595,12 @@ struct rte_eventdev {\n \n #ifdef RTE_LIBRTE_EVENTDEV_DEBUG\n \tif (dev_id >= RTE_EVENT_MAX_DEVS || !rte_eventdevs[dev_id].attached) {\n-\t\trte_errno = -EINVAL;\n+\t\trte_errno = EINVAL;\n \t\treturn 0;\n \t}\n \n \tif (port_id >= dev->data->nb_ports) {\n-\t\trte_errno = -EINVAL;\n+\t\trte_errno = EINVAL;\n \t\treturn 0;\n \t}\n #endif\n@@ -1673,9 +1673,9 @@ struct rte_eventdev {\n * of link[] are not established, and the caller has to take care of them.\n * If return value is less than *nb_links* then implementation shall update the\n * rte_errno accordingly, Possible rte_errno values are\n- * (-EDQUOT) Quota exceeded(Application tried to link the queue configured with\n+ * (EDQUOT) Quota exceeded(Application tried to link the queue configured with\n * RTE_EVENT_QUEUE_CFG_SINGLE_LINK to more than one event ports)\n- * (-EINVAL) Invalid parameter\n+ * (EINVAL) Invalid parameter\n *\n */\n int\n@@ -1720,7 +1720,7 @@ struct rte_eventdev {\n * end of queues[] are not unlinked, and the caller has to take care of them.\n * If return value is less than *nb_unlinks* then implementation shall update\n * the rte_errno accordingly, Possible rte_errno values are\n- * (-EINVAL) Invalid parameter\n+ * (EINVAL) Invalid parameter\n */\n int\n rte_event_port_unlink(uint8_t dev_id, uint8_t port_id,\n", "prefixes": [ "1/3" ] }{ "id": 56075, "url": "