Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/40810/?format=api
http://patches.dpdk.org/api/patches/40810/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1528461427-164113-1-git-send-email-dariuszx.stojaczyk@intel.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": "<1528461427-164113-1-git-send-email-dariuszx.stojaczyk@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1528461427-164113-1-git-send-email-dariuszx.stojaczyk@intel.com", "date": "2018-06-08T12:37:06", "name": "[dpdk-dev,1/2] eal/thread: fix return codes for rte_thread_setname()", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "10c9f008f7ff296e7725f79f60fdbf813f5ebd87", "submitter": { "id": 744, "url": "http://patches.dpdk.org/api/people/744/?format=api", "name": "Stojaczyk, DariuszX", "email": "dariuszx.stojaczyk@intel.com" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1528461427-164113-1-git-send-email-dariuszx.stojaczyk@intel.com/mbox/", "series": [ { "id": 44, "url": "http://patches.dpdk.org/api/series/44/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=44", "date": "2018-06-08T12:37:06", "name": "[dpdk-dev,1/2] eal/thread: fix return codes for rte_thread_setname()", "version": 1, "mbox": "http://patches.dpdk.org/series/44/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/40810/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/40810/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 9653D8DB2;\n\tFri, 8 Jun 2018 10:56:07 +0200 (CEST)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id AB1197CE1;\n\tFri, 8 Jun 2018 10:56:05 +0200 (CEST)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t08 Jun 2018 01:56:04 -0700", "from kraken.imu.intel.com (HELO Sent) ([10.217.246.153])\n\tby fmsmga001.fm.intel.com with SMTP; 08 Jun 2018 01:56:01 -0700", "by Sent (sSMTP sendmail emulation); Fri, 08 Jun 2018 14:39:16 +0200" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.49,490,1520924400\"; d=\"scan'208\";a=\"62360861\"", "From": "Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>", "To": "dev@dpdk.org", "Cc": "Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>,\n\tthomas.monjalon@6wind.com, stable@dpdk.org", "Date": "Fri, 8 Jun 2018 14:37:06 +0200", "Message-Id": "<1528461427-164113-1-git-send-email-dariuszx.stojaczyk@intel.com>", "X-Mailer": "git-send-email 2.7.4", "Subject": "[dpdk-dev] [PATCH 1/2] eal/thread: fix return codes for\n\trte_thread_setname()", "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://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "The doc says this function returns negative errno\non error, but it currently returns either -1 or\npositive errno.\n\nIt was incorrectly assumed that pthread_setname_np()\nreturns negative error numbers. It always returns\npositive ones, so this patch negates its return value\nbefore returning.\n\nWhile here, also ignore rte_thread_setname() failure\nin rte_ctrl_thread_create() and print a debug message\ninstead.\n\nFixes: 3901ed99c2f8 (\"eal: fix thread naming on FreeBSD\")\nCc: thomas.monjalon@6wind.com\nCc: stable@dpdk.org\n\nSigned-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>\n---\n lib/librte_eal/common/eal_common_thread.c | 3 ++-\n lib/librte_eal/linuxapp/eal/eal_thread.c | 4 ++--\n 2 files changed, 4 insertions(+), 3 deletions(-)", "diff": "diff --git a/lib/librte_eal/common/eal_common_thread.c b/lib/librte_eal/common/eal_common_thread.c\nindex 4239863..8110ac2 100644\n--- a/lib/librte_eal/common/eal_common_thread.c\n+++ b/lib/librte_eal/common/eal_common_thread.c\n@@ -191,7 +191,8 @@ rte_ctrl_thread_create(pthread_t *thread, const char *name,\n \tif (name != NULL) {\n \t\tret = rte_thread_setname(*thread, name);\n \t\tif (ret < 0)\n-\t\t\tgoto fail;\n+\t\t\tRTE_LOG(DEBUG, EAL,\n+\t\t\t\t\"Cannot set name for ctrl thread\\n\");\n \t}\n \n \tcpu_found = 0;\ndiff --git a/lib/librte_eal/linuxapp/eal/eal_thread.c b/lib/librte_eal/linuxapp/eal/eal_thread.c\nindex f652ff9..b496fc7 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_thread.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_thread.c\n@@ -176,7 +176,7 @@ int rte_sys_gettid(void)\n \n int rte_thread_setname(pthread_t id, const char *name)\n {\n-\tint ret = -1;\n+\tint ret = ENOSYS;\n #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)\n #if __GLIBC_PREREQ(2, 12)\n \tret = pthread_setname_np(id, name);\n@@ -184,5 +184,5 @@ int rte_thread_setname(pthread_t id, const char *name)\n #endif\n \tRTE_SET_USED(id);\n \tRTE_SET_USED(name);\n-\treturn ret;\n+\treturn -ret;\n }\n", "prefixes": [ "dpdk-dev", "1/2" ] }{ "id": 40810, "url": "