Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/111144/?format=api
https://patches.dpdk.org/api/patches/111144/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220514071435.3024492-1-dunk@denkimushi.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": "<20220514071435.3024492-1-dunk@denkimushi.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220514071435.3024492-1-dunk@denkimushi.com", "date": "2022-05-14T07:14:35", "name": "[v7] eal/ppc: fix compilation for musl", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "7904610dac213344ee138d63bc5e2456d7fe28a8", "submitter": { "id": 2656, "url": "https://patches.dpdk.org/api/people/2656/?format=api", "name": "Duncan Bellamy", "email": "dunk@denkimushi.com" }, "delegate": { "id": 24651, "url": "https://patches.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220514071435.3024492-1-dunk@denkimushi.com/mbox/", "series": [ { "id": 22934, "url": "https://patches.dpdk.org/api/series/22934/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=22934", "date": "2022-05-14T07:14:35", "name": "[v7] eal/ppc: fix compilation for musl", "version": 7, "mbox": "https://patches.dpdk.org/series/22934/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/111144/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/111144/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 1B1EDA00C3;\n\tSat, 14 May 2022 09:14:58 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 0249C410E0;\n\tSat, 14 May 2022 09:14:58 +0200 (CEST)", "from tentoumushi.denkimushi.com (tentoumushi.denkimushi.com\n [81.187.253.217])\n by mails.dpdk.org (Postfix) with ESMTP id 82C4B40395\n for <dev@dpdk.org>; Sat, 14 May 2022 09:14:51 +0200 (CEST)" ], "From": "Duncan Bellamy <dunk@denkimushi.com>", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=denkimushi.com;\n s=dkim; t=1652512487;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=gZ0WhMY5QIANmVBB4jmWu7yn7smBiMlODyi0YPeDkq4=;\n b=CxgwQ1PMpRut92kY7r0aHj9k4QCzXkn0ET9a3VvwBvtpvF2ZeRKV/s9qwjE5qj2HHBuOo2\n YMAjgjvLb+ZNCP9PjgLEWLBPDM7z4G12UaZ2TvzfNctgv4w1OhBdW2lI8ebq2e4jQtM9gs\n Yc6yy/AbYgW35X0MyXZb0C1dbxBFwDU=", "To": "dev@dpdk.org", "Cc": "Duncan Bellamy <dunk@denkimushi.com>", "Subject": "[PATCH v7] eal/ppc: fix compilation for musl", "Date": "Sat, 14 May 2022 08:14:35 +0100", "Message-Id": "<20220514071435.3024492-1-dunk@denkimushi.com>", "In-Reply-To": "<20220502142615.3705639-1-dunk@denkimushi.com>", "References": "<20220502142615.3705639-1-dunk@denkimushi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "ARC-Seal": "i=1; s=dkim; d=denkimushi.com; t=1652512487; a=rsa-sha256; cv=none;\n b=Zdz2Cxm+6xRT7UNug9YoAnKa+bdREc5HhctYk0nP7xORCPhkdvsGyoFmQhuS45/CfHCqWR\n 1Fs2jpvfG2IidzkeE0l7NYYlLcNQeufuinUr6+eqKpp3y8GDkQU7FRr1qTJv84KFpZ3Ivi\n Jl0/0DKOIBSwjf7HH2pOyDLks17Q9NY=", "ARC-Authentication-Results": "i=1; ORIGINATING;\n auth=pass smtp.auth=dunk@denkimushi.com smtp.mailfrom=dunk@denkimushi.com", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=denkimushi.com;\n s=dkim; t=1652512487;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=gZ0WhMY5QIANmVBB4jmWu7yn7smBiMlODyi0YPeDkq4=;\n b=Xm/gXv4ackvPfYzZcQfdwq8CUrBnPO3tUtkcTBbNzWPcuLmNqbmVu6f4+eRH1HnzzDxwxu\n OnL4Y6lLePd/Tncdqei1MmGK82ruyfSqUN2NOtvMtDA7RrcJsC5KN2xNb4ucDMqdkUGwk3\n 3DI4Gb8wkjlH9qCGRVizzOPzrFMtwZM=", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "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" }, "content": "musl lacks __ppc_get_timebase() but has __builtin_ppc_get_timebase()\n\nSigned-off-by: Duncan Bellamy <dunk@denkimushi.com>\n---\n lib/eal/ppc/include/rte_cycles.h | 7 ++++++\n lib/eal/ppc/rte_cycles.c | 39 ++++++++++++++++++++++++++++++++\n 2 files changed, 46 insertions(+)", "diff": "diff --git a/lib/eal/ppc/include/rte_cycles.h b/lib/eal/ppc/include/rte_cycles.h\nindex 5585f9273c..666fc9b0bf 100644\n--- a/lib/eal/ppc/include/rte_cycles.h\n+++ b/lib/eal/ppc/include/rte_cycles.h\n@@ -10,7 +10,10 @@\n extern \"C\" {\n #endif\n \n+#include <features.h>\n+#ifdef __GLIBC__\n #include <sys/platform/ppc.h>\n+#endif\n \n #include \"generic/rte_cycles.h\"\n \n@@ -26,7 +29,11 @@ extern \"C\" {\n static inline uint64_t\n rte_rdtsc(void)\n {\n+#ifdef __GLIBC__\n \treturn __ppc_get_timebase();\n+#else\n+\treturn __builtin_ppc_get_timebase();\n+#endif\n }\n \n static inline uint64_t\ndiff --git a/lib/eal/ppc/rte_cycles.c b/lib/eal/ppc/rte_cycles.c\nindex 3180adb0ff..cd4bdff8b8 100644\n--- a/lib/eal/ppc/rte_cycles.c\n+++ b/lib/eal/ppc/rte_cycles.c\n@@ -2,12 +2,51 @@\n * Copyright (C) IBM Corporation 2019.\n */\n \n+#include <features.h>\n+#ifdef __GLIBC__\n #include <sys/platform/ppc.h>\n+#elif RTE_EXEC_ENV_LINUX\n+#include <string.h>\n+#include <stdio.h>\n+#endif\n \n #include \"eal_private.h\"\n \n uint64_t\n get_tsc_freq_arch(void)\n {\n+#ifdef __GLIBC__\n \treturn __ppc_get_timebase_freq();\n+#elif RTE_EXEC_ENV_LINUX\n+\tstatic unsigned long base;\n+\tchar buf[512];\n+\tssize_t nr;\n+\tFILE *f;\n+\n+\tif (base != 0)\n+\t\tgoto out;\n+\n+\tf = fopen(\"/proc/cpuinfo\", \"rb\");\n+\tif (f == NULL)\n+\t\tgoto out;\n+\n+\twhile (fgets(buf, sizeof(buf), f) != NULL) {\n+\t\tchar *ret = strstr(buf, \"timebase\");\n+\n+\t\tif (ret == NULL)\n+\t\t\tcontinue;\n+\t\tret += sizeof(\"timebase\") - 1;\n+\t\tret = strchr(ret, ':');\n+\t\tif (ret == NULL)\n+\t\t\tcontinue;\n+\t\tbase = strtoul(ret + 1, NULL, 10);\n+\t\tbreak;\n+\t}\n+\tfclose(f);\n+out:\n+\treturn (uint64_t) base;\n+#else\n+\treturn 0;\n+#endif\n+\n }\n", "prefixes": [ "v7" ] }{ "id": 111144, "url": "