Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/69190/?format=api
https://patches.dpdk.org/api/patches/69190/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200423144350.4016-2-fady@mellanox.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": "<20200423144350.4016-2-fady@mellanox.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200423144350.4016-2-fady@mellanox.com", "date": "2020-04-23T14:43:49", "name": "[1/2] timer: move from common to Unix directory", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "d2ee2efdecb04b0680843460354d7b6ab0673450", "submitter": { "id": 1650, "url": "https://patches.dpdk.org/api/people/1650/?format=api", "name": "Fady Bader", "email": "fady@mellanox.com" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20200423144350.4016-2-fady@mellanox.com/mbox/", "series": [ { "id": 9595, "url": "https://patches.dpdk.org/api/series/9595/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=9595", "date": "2020-04-23T14:43:50", "name": "eal timer split and implementation for Windows", "version": 1, "mbox": "https://patches.dpdk.org/series/9595/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/69190/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/69190/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 96C82A034E;\n\tThu, 23 Apr 2020 16:45:21 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 415501C1F2;\n\tThu, 23 Apr 2020 16:45:08 +0200 (CEST)", "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 095151C1DD\n for <dev@dpdk.org>; Thu, 23 Apr 2020 16:45:03 +0200 (CEST)", "from Internal Mail-Server by MTLPINE1 (envelope-from\n fady@mellanox.com)\n with ESMTPS (AES256-SHA encrypted); 23 Apr 2020 17:44:59 +0300", "from l-wincomp04-vm.labs.mlnx (l-wincomp04-vm.mtl.labs.mlnx\n [10.237.1.5])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 03NEiwvv031846;\n Thu, 23 Apr 2020 17:44:58 +0300" ], "From": "Fady Bader <fady@mellanox.com>", "To": "dev@dpdk.org", "Cc": "thomas@monjalon.net, talshn@mellanox.com, fady@mellanox.com,\n dmitry.koziuk@gmail.com, harini.ramakrishnan@microsoft.com,\n ocardona@microsoft.com, anand.rawat@intel.com, ranjit.menon@intel.com", "Date": "Thu, 23 Apr 2020 17:43:49 +0300", "Message-Id": "<20200423144350.4016-2-fady@mellanox.com>", "X-Mailer": "git-send-email 2.16.1.windows.4", "In-Reply-To": "<20200423144350.4016-1-fady@mellanox.com>", "References": "<20200423144350.4016-1-fady@mellanox.com>", "Subject": "[dpdk-dev] [PATCH 1/2] timer: move from common to Unix directory", "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 <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": "Eal common timer doesn't compile under Windows.\n\nCompilation log:\nerror LNK2019:\nunresolved external symbol nanosleep referenced in function rte_delay_us_sleep\nerror LNK2019:\nunresolved external symbol get_tsc_freq referenced in function set_tsc_freq\nerror LNK2019:\nunresolved external symbol sleep referenced in function set_tsc_freq\n\nThe reason was that some functions called POSIX functions.\nThe solution was to move POSIX dependent functions from common to Unix.\n\nSigned-off-by: Fady Bader <fady@mellanox.com>\n---\n lib/librte_eal/common/eal_common_timer.c | 22 ----------------------\n lib/librte_eal/unix/eal_timer.c | 29 +++++++++++++++++++++++++++++\n lib/librte_eal/unix/meson.build | 1 +\n 3 files changed, 30 insertions(+), 22 deletions(-)\n create mode 100644 lib/librte_eal/unix/eal_timer.c", "diff": "diff --git a/lib/librte_eal/common/eal_common_timer.c b/lib/librte_eal/common/eal_common_timer.c\nindex fa9ee1b22..71e0bd035 100644\n--- a/lib/librte_eal/common/eal_common_timer.c\n+++ b/lib/librte_eal/common/eal_common_timer.c\n@@ -35,28 +35,6 @@ rte_delay_us_block(unsigned int us)\n \t\trte_pause();\n }\n \n-void\n-rte_delay_us_sleep(unsigned int us)\n-{\n-\tstruct timespec wait[2];\n-\tint ind = 0;\n-\n-\twait[0].tv_sec = 0;\n-\tif (us >= US_PER_S) {\n-\t\twait[0].tv_sec = us / US_PER_S;\n-\t\tus -= wait[0].tv_sec * US_PER_S;\n-\t}\n-\twait[0].tv_nsec = 1000 * us;\n-\n-\twhile (nanosleep(&wait[ind], &wait[1 - ind]) && errno == EINTR) {\n-\t\t/*\n-\t\t * Sleep was interrupted. Flip the index, so the 'remainder'\n-\t\t * will become the 'request' for a next call.\n-\t\t */\n-\t\tind = 1 - ind;\n-\t}\n-}\n-\n uint64_t\n rte_get_tsc_hz(void)\n {\ndiff --git a/lib/librte_eal/unix/eal_timer.c b/lib/librte_eal/unix/eal_timer.c\nnew file mode 100644\nindex 000000000..36189c346\n--- /dev/null\n+++ b/lib/librte_eal/unix/eal_timer.c\n@@ -0,0 +1,29 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright 2020 Mellanox Technologies, Ltd\n+ */\n+#include <time.h>\n+\n+#include <rte_cycles.h>\n+\n+void\n+rte_delay_us_sleep(unsigned int us)\n+{\n+\tstruct timespec wait[2];\n+\tint ind = 0;\n+\n+\twait[0].tv_sec = 0;\n+\tif (us >= US_PER_S) {\n+\t\twait[0].tv_sec = us / US_PER_S;\n+\t\tus -= wait[0].tv_sec * US_PER_S;\n+\t}\n+\twait[0].tv_nsec = 1000 * us;\n+\n+\twhile (nanosleep(&wait[ind], &wait[1 - ind]) && errno == EINTR) {\n+\t\t/*\n+\t\t * Sleep was interrupted. Flip the index, so the 'remainder'\n+\t\t * will become the 'request' for a next call.\n+\t\t */\n+\t\tind = 1 - ind;\n+\t}\n+}\n+\ndiff --git a/lib/librte_eal/unix/meson.build b/lib/librte_eal/unix/meson.build\nindex 50c019a56..9da601658 100644\n--- a/lib/librte_eal/unix/meson.build\n+++ b/lib/librte_eal/unix/meson.build\n@@ -4,4 +4,5 @@\n sources += files(\n \t'eal.c',\n \t'eal_memory.c',\n+\t'eal_timer.c',\n )\n", "prefixes": [ "1/2" ] }{ "id": 69190, "url": "