Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/16378/?format=api
http://patches.dpdk.org/api/patches/16378/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1475515645-24667-1-git-send-email-konstantin.ananyev@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": "<1475515645-24667-1-git-send-email-konstantin.ananyev@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1475515645-24667-1-git-send-email-konstantin.ananyev@intel.com", "date": "2016-10-03T17:27:25", "name": "[dpdk-dev] eal: fix c++ compilation issue with rte_delay_us()", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "90200cf65b691eb5f2551f53460e35cc508b53ac", "submitter": { "id": 33, "url": "http://patches.dpdk.org/api/people/33/?format=api", "name": "Ananyev, Konstantin", "email": "konstantin.ananyev@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1475515645-24667-1-git-send-email-konstantin.ananyev@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/16378/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/16378/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<kananye1@ecsmtp.ir.intel.com>", "Received": [ "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby dpdk.org (Postfix) with ESMTP id 3F5022A5E\n\tfor <dev@dpdk.org>; Mon, 3 Oct 2016 19:28:13 +0200 (CEST)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby orsmga105.jf.intel.com with ESMTP; 03 Oct 2016 10:28:12 -0700", "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby fmsmga006.fm.intel.com with ESMTP; 03 Oct 2016 10:28:11 -0700", "from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com\n\t[10.237.217.46])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tu93HSA0p014334; Mon, 3 Oct 2016 18:28:10 +0100", "from sivswdev02.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev02.ir.intel.com with ESMTP id u93HSAOq025208;\n\tMon, 3 Oct 2016 18:28:10 +0100" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.31,438,1473145200\"; d=\"scan'208\";a=\"15729998\"", "From": "Konstantin Ananyev <konstantin.ananyev@intel.com>", "To": [ "dev@dpdk.org", "dev@dpdk.org" ], "Cc": "Konstantin Ananyev <konstantin.ananyev@intel.com>", "Date": "Mon, 3 Oct 2016 18:27:25 +0100", "Message-Id": "<1475515645-24667-1-git-send-email-konstantin.ananyev@intel.com>", "X-Mailer": "git-send-email 1.7.0.7", "Subject": "[dpdk-dev] [PATCH] eal: fix c++ compilation issue with\n\trte_delay_us()", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://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": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "X-List-Received-Date": "Mon, 03 Oct 2016 17:28:13 -0000" }, "content": "When compiling with C++, it treats\nvoid (*rte_delay_us)(unsigned int us);\nas definition of the global variable.\nSo further linking with librte_eal fails.\n\nFixes: b4d63fb62240 (\"eal: customize delay function\")\n\nSteps to reproduce:\n\n$ cat rttm1.cpp\n\n#include <iostream>\n#include <rte_eal.h>\n#include <rte_cycles.h>\n\nusing namespace std;\n\nint main(int argc, char *argv[])\n{\n int ret = rte_eal_init(argc, argv);\n rte_delay_us(1);\n cout << \"return code \";\n cout << ret;\n return ret;\n}\n\n$ g++ -m64 -I/${RTE_SDK}/${RTE_TARGET}/include -c -o rttm1.o rttm1.cpp\n$ gcc -m64 -pthread -o rttm1 rttm1.o -ldl -Wl,-lstdc++ \\\n -L/${RTE_SDK}/${RTE_TARGET}/lib -Wl,-lrte_eal\n.../librte_eal.a(eal_common_timer.o):\n(.bss+0x0): multiple definition of `rte_delay_us'\nrttm1.o:(.bss+0x0): first defined here\ncollect2: error: ld returned 1 exit status\n\n$ nm rttm1.o | grep rte_delay_us\n0000000000000092 t _GLOBAL__sub_I_rte_delay_us\n0000000000000000 B rte_delay_us\n\n\nSigned-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>\n---\n lib/librte_eal/common/include/generic/rte_cycles.h | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)", "diff": "diff --git a/lib/librte_eal/common/include/generic/rte_cycles.h b/lib/librte_eal/common/include/generic/rte_cycles.h\nindex 96a2da9..00103ca 100644\n--- a/lib/librte_eal/common/include/generic/rte_cycles.h\n+++ b/lib/librte_eal/common/include/generic/rte_cycles.h\n@@ -188,7 +188,7 @@ rte_get_timer_hz(void)\n * @param us\n * The number of microseconds to wait.\n */\n-void\n+extern void\n (*rte_delay_us)(unsigned int us);\n \n /**\n", "prefixes": [ "dpdk-dev" ] }{ "id": 16378, "url": "