Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/91686/?format=api
http://patches.dpdk.org/api/patches/91686/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1618595864-27839-6-git-send-email-jizh@linux.microsoft.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": "<1618595864-27839-6-git-send-email-jizh@linux.microsoft.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1618595864-27839-6-git-send-email-jizh@linux.microsoft.com", "date": "2021-04-16T17:57:40", "name": "[v5,5/9] app/testpmd: add clock_gettime_monotonic", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "a7a3f76489a509730144c958df85b72bbd71afcd", "submitter": { "id": 1934, "url": "http://patches.dpdk.org/api/people/1934/?format=api", "name": "Jie Zhou", "email": "jizh@linux.microsoft.com" }, "delegate": { "id": 319, "url": "http://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1618595864-27839-6-git-send-email-jizh@linux.microsoft.com/mbox/", "series": [ { "id": 16454, "url": "http://patches.dpdk.org/api/series/16454/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=16454", "date": "2021-04-16T17:57:37", "name": "app/testpmd: enable testpmd on Windows", "version": 5, "mbox": "http://patches.dpdk.org/series/16454/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/91686/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/91686/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 E355DA0548;\n\tFri, 16 Apr 2021 19:58:25 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 83205161CDE;\n\tFri, 16 Apr 2021 19:57:58 +0200 (CEST)", "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id 7B85C1609D0\n for <dev@dpdk.org>; Fri, 16 Apr 2021 19:57:49 +0200 (CEST)", "from\n linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net\n (linux.microsoft.com [13.77.154.182])\n by linux.microsoft.com (Postfix) with ESMTPSA id 6B1BB20B83F1;\n Fri, 16 Apr 2021 10:57:48 -0700 (PDT)" ], "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com 6B1BB20B83F1", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com;\n s=default; t=1618595868;\n bh=SPSV9RlZ1v1VwJUeBI5U07x3rL0cpfwGcqGveOg3NVw=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=CL7ZX6ab7s9KDOJYhO14WFyilA5L0GycThGM9hx6GCuH4gjmUkqoLLM/yEUBuffHK\n E56cooiWb80o6r0k+pgxu0EDZLkArcxkrZ71Rn0UrRqDhNvPmMgOEtrh7NEWIi5pvU\n hPuRavrFP5JqOQ4CyIGYT4ZmCcu0mABZ+9m3xZaI=", "From": "Jie Zhou <jizh@linux.microsoft.com>", "To": "dev@dpdk.org", "Cc": "dmitry.kozliuk@gmail.com, xiaoyun.li@intel.com, roretzla@microsoft.com,\n pallavi.kadam@intel.com, thomas@monjalon.net, bruce.richardson@intel.com,\n ferruh.yigit@intel.com", "Date": "Fri, 16 Apr 2021 10:57:40 -0700", "Message-Id": "<1618595864-27839-6-git-send-email-jizh@linux.microsoft.com>", "X-Mailer": "git-send-email 1.8.3.1", "In-Reply-To": "<1618595864-27839-1-git-send-email-jizh@linux.microsoft.com>", "References": "<1618594501-23795-10-git-send-email-jizh@linux.microsoft.com>\n <1618595864-27839-1-git-send-email-jizh@linux.microsoft.com>", "Subject": "[dpdk-dev] [PATCH v5 5/9] app/testpmd: add clock_gettime_monotonic", "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", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Add clock_gettime_monotonic for testpmd on Windows\n\nSigned-off-by: Jie Zhou <jizh@microsoft.com>\nSigned-off-by: Jie Zhou <jizh@linux.microsoft.com>\n---\n app/test-pmd/config.c | 33 ++++++++++++++++++++++++++++++++-\n 1 file changed, 32 insertions(+), 1 deletion(-)", "diff": "diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex ef0b9784d..a5f8fec5b 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -63,6 +63,12 @@\n \n #define NS_PER_SEC 1E9\n \n+#ifdef RTE_EXEC_ENV_WINDOWS\n+#define _clock_gettime_monotonic(cur_time) clock_gettime_monotonic(&cur_time)\n+#else\n+#define _clock_gettime_monotonic(cur_time) clock_gettime(CLOCK_TYPE_ID, &cur_time)\n+#endif\n+\n static char *flowtype_to_str(uint16_t flow_type);\n \n static const struct {\n@@ -170,6 +176,27 @@ print_ethaddr(const char *name, struct rte_ether_addr *eth_addr)\n \tprintf(\"%s%s\", name, buf);\n }\n \n+#ifdef RTE_EXEC_ENV_WINDOWS\n+static int\n+clock_gettime_monotonic(struct timespec *tp)\n+{\n+\tLARGE_INTEGER pf, pc;\n+\tLONGLONG nsec;\n+\n+\tif (QueryPerformanceFrequency(&pf) == 0)\n+\t\treturn -1;\n+\n+\tif (QueryPerformanceCounter(&pc) == 0)\n+\t\treturn -1;\n+\n+\tnsec = pc.QuadPart * NS_PER_SEC / pf.QuadPart;\n+\ttp->tv_sec = nsec / NS_PER_SEC;\n+\ttp->tv_nsec = nsec - tp->tv_sec * NS_PER_SEC;\n+\n+\treturn 0;\n+}\n+#endif\n+\n void\n nic_stats_display(portid_t port_id)\n {\n@@ -186,6 +213,8 @@ nic_stats_display(portid_t port_id)\n \n \tstatic const char *nic_stats_border = \"########################\";\n \n+\tint ret;\n+\n \tif (port_id_is_invalid(port_id, ENABLED_WARN)) {\n \t\tprint_valid_ports();\n \t\treturn;\n@@ -202,7 +231,9 @@ nic_stats_display(portid_t port_id)\n \t \"%-\"PRIu64\"\\n\", stats.opackets, stats.oerrors, stats.obytes);\n \n \tdiff_ns = 0;\n-\tif (clock_gettime(CLOCK_TYPE_ID, &cur_time) == 0) {\n+\n+\tret = _clock_gettime_monotonic(cur_time);\n+\tif (ret == 0) {\n \t\tuint64_t ns;\n \n \t\tns = cur_time.tv_sec * NS_PER_SEC;\n", "prefixes": [ "v5", "5/9" ] }{ "id": 91686, "url": "