Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/51099/?format=api
http://patches.dpdk.org/api/patches/51099/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190311173702.24471-16-ncopa@alpinelinux.org/", "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": "<20190311173702.24471-16-ncopa@alpinelinux.org>", "list_archive_url": "https://inbox.dpdk.org/dev/20190311173702.24471-16-ncopa@alpinelinux.org", "date": "2019-03-11T17:37:02", "name": "[15/15] eal/linux: use gettid(2) for debug message in sigbus_handler", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "12baa5d26d9ef254b59303bc6cbf8936f2d59b32", "submitter": { "id": 1242, "url": "http://patches.dpdk.org/api/people/1242/?format=api", "name": "Natanael Copa", "email": "ncopa@alpinelinux.org" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190311173702.24471-16-ncopa@alpinelinux.org/mbox/", "series": [ { "id": 3705, "url": "http://patches.dpdk.org/api/series/3705/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=3705", "date": "2019-03-11T17:36:47", "name": "Build fixes for musl libc", "version": 1, "mbox": "http://patches.dpdk.org/series/3705/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/51099/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/51099/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 5E8005F1B;\n\tMon, 11 Mar 2019 18:37:56 +0100 (CET)", "from mx1.tetrasec.net (mx1.tetrasec.net [74.117.190.25])\n\tby dpdk.org (Postfix) with ESMTP id 73FD358C6\n\tfor <dev@dpdk.org>; Mon, 11 Mar 2019 18:37:46 +0100 (CET)", "from mx1.tetrasec.net (mail.local [127.0.0.1])\n\tby mx1.tetrasec.net (Postfix) with ESMTP id EE07D9E1F68;\n\tMon, 11 Mar 2019 17:37:45 +0000 (UTC)", "from ncopa-desktop.lan (67.63.200.37.customer.cdi.no\n\t[37.200.63.67])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\t(Authenticated sender: n@tanael.org)\n\tby mx1.tetrasec.net (Postfix) with ESMTPSA id 1FB6A9E1F70;\n\tMon, 11 Mar 2019 17:37:44 +0000 (UTC)" ], "From": "Natanael Copa <ncopa@alpinelinux.org>", "To": "dev@dpdk.org", "Cc": "Natanael Copa <ncopa@alpinelinux.org>", "Date": "Mon, 11 Mar 2019 18:37:02 +0100", "Message-Id": "<20190311173702.24471-16-ncopa@alpinelinux.org>", "X-Mailer": "git-send-email 2.21.0", "In-Reply-To": "<20190311173702.24471-1-ncopa@alpinelinux.org>", "References": "<20190311173702.24471-1-ncopa@alpinelinux.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "quoted-printable", "Subject": "[dpdk-dev] [PATCH 15/15] eal/linux: use gettid(2) for debug message\n\tin sigbus_handler", "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": "There is no guarantee that pthread_self() returns the thread id or that\npthread_t is an integer. Use gettid(2) to get the kernel thread id\ninstead.\n\nThis fixes the following warning when building with musl libc:\n\n../lib/librte_eal/linuxapp/eal/eal_dev.c: In function 'sigbus_handler':\n../lib/librte_eal/linuxapp/eal/eal_dev.c:70:3: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]\n (int)pthread_self(), info->si_addr);\n ^\n\nSigned-off-by: Natanael Copa <ncopa@alpinelinux.org>\n---\n\nThis is not reallly a compile error, but the warning looked a bit scary, and\ncode looked wrong, so I fixed it.\n\n lib/librte_eal/linuxapp/eal/eal_dev.c | 8 +++++++-\n 1 file changed, 7 insertions(+), 1 deletion(-)", "diff": "diff --git a/lib/librte_eal/linuxapp/eal/eal_dev.c b/lib/librte_eal/linuxapp/eal/eal_dev.c\nindex 2830c8687..9ad6650cf 100644\n--- a/lib/librte_eal/linuxapp/eal/eal_dev.c\n+++ b/lib/librte_eal/linuxapp/eal/eal_dev.c\n@@ -7,6 +7,7 @@\n #include <fcntl.h>\n #include <signal.h>\n #include <sys/socket.h>\n+#include <sys/types.h>\n #include <linux/netlink.h>\n \n #include <rte_string_fns.h>\n@@ -30,6 +31,11 @@ static bool hotplug_handle;\n #define EAL_UEV_MSG_LEN 4096\n #define EAL_UEV_MSG_ELEM_LEN 128\n \n+#if !defined(__GLIBC__)\n+#include <sys/syscall.h>\n+#define gettid() syscall(SYS_gettid)\n+#endif\n+\n /*\n * spinlock for device hot-unplug failure handling. If it try to access bus or\n * device, such as handle sigbus on bus or handle memory failure for device\n@@ -67,7 +73,7 @@ static void sigbus_handler(int signum, siginfo_t *info,\n \tint ret;\n \n \tRTE_LOG(DEBUG, EAL, \"Thread[%d] catch SIGBUS, fault address:%p\\n\",\n-\t\t(int)pthread_self(), info->si_addr);\n+\t\t(int)gettid(), info->si_addr);\n \n \trte_spinlock_lock(&failure_handle_lock);\n \tret = rte_bus_sigbus_handler(info->si_addr);\n", "prefixes": [ "15/15" ] }{ "id": 51099, "url": "