Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/48765/?format=api
http://patches.dpdk.org/api/patches/48765/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/98395a6100625b09e0477a665c687ba69c6f9e99.1544701282.git.anatoly.burakov@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": "<98395a6100625b09e0477a665c687ba69c6f9e99.1544701282.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/98395a6100625b09e0477a665c687ba69c6f9e99.1544701282.git.anatoly.burakov@intel.com", "date": "2018-12-13T11:43:19", "name": "[v3,5/5] test: add segment fd API test", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "38932da9eaab2a9e547696a0c6463e7f25a5053a", "submitter": { "id": 4, "url": "http://patches.dpdk.org/api/people/4/?format=api", "name": "Anatoly Burakov", "email": "anatoly.burakov@intel.com" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/98395a6100625b09e0477a665c687ba69c6f9e99.1544701282.git.anatoly.burakov@intel.com/mbox/", "series": [ { "id": 2758, "url": "http://patches.dpdk.org/api/series/2758/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=2758", "date": "2018-12-13T11:43:14", "name": "Allow using virtio-user without hugepages", "version": 3, "mbox": "http://patches.dpdk.org/series/2758/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/48765/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/48765/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 A95E71B517;\n\tThu, 13 Dec 2018 12:43:32 +0100 (CET)", "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n\tby dpdk.org (Postfix) with ESMTP id 9CF2F1B4F5\n\tfor <dev@dpdk.org>; Thu, 13 Dec 2018 12:43:24 +0100 (CET)", "from orsmga007.jf.intel.com ([10.7.209.58])\n\tby fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t13 Dec 2018 03:43:23 -0800", "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga007.jf.intel.com with ESMTP; 13 Dec 2018 03:43:21 -0800", "from sivswdev05.ir.intel.com (sivswdev05.ir.intel.com\n\t[10.243.17.64])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\twBDBhKZs032163; Thu, 13 Dec 2018 11:43:20 GMT", "from sivswdev05.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev05.ir.intel.com with ESMTP id wBDBhKFd012569;\n\tThu, 13 Dec 2018 11:43:20 GMT", "(from aburakov@localhost)\n\tby sivswdev05.ir.intel.com with LOCAL id wBDBhKv4012565;\n\tThu, 13 Dec 2018 11:43:20 GMT" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.56,348,1539673200\"; d=\"scan'208\";a=\"98448780\"", "From": "Anatoly Burakov <anatoly.burakov@intel.com>", "To": "dev@dpdk.org", "Cc": "przemyslawx.lal@intel.com, kuralamudhan.ramakrishnan@intel.com,\n\tivan.coughlan@intel.com, tiwei.bie@intel.com, ray.kinsella@intel.com, \n\tmaxime.coquelin@redhat.com", "Date": "Thu, 13 Dec 2018 11:43:19 +0000", "Message-Id": "<98395a6100625b09e0477a665c687ba69c6f9e99.1544701282.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 1.7.0.7", "In-Reply-To": [ "<cover.1544701282.git.anatoly.burakov@intel.com>", "<cover.1544701282.git.anatoly.burakov@intel.com>" ], "References": [ "<cover.1544701282.git.anatoly.burakov@intel.com>", "<cover.1544546363.git.anatoly.burakov@intel.com>\n\t<cover.1544701282.git.anatoly.burakov@intel.com>" ], "Subject": "[dpdk-dev] [PATCH v3 5/5] test: add segment fd API test", "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": "Use memory autotest to also test segment fd API. This will not do\nany checks - just see if the relevant API's return success or\nindicate that the API is not supported.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\nAcked-by: Tiwei Bie <tiwei.bie@intel.com>\n---\n test/test/test_memory.c | 43 +++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 43 insertions(+)", "diff": "diff --git a/test/test/test_memory.c b/test/test/test_memory.c\nindex b96bca771..3da803e4e 100644\n--- a/test/test/test_memory.c\n+++ b/test/test/test_memory.c\n@@ -37,10 +37,44 @@ check_mem(const struct rte_memseg_list *msl __rte_unused,\n \treturn 0;\n }\n \n+static int\n+check_seg_fds(const struct rte_memseg_list *msl, const struct rte_memseg *ms,\n+\t\tvoid *arg __rte_unused)\n+{\n+\tsize_t offset;\n+\tint ret;\n+\n+\t/* skip external segments */\n+\tif (msl->external)\n+\t\treturn 0;\n+\n+\t/* try segment fd first. we're in a callback, so thread-unsafe */\n+\tret = rte_memseg_get_fd_thread_unsafe(ms);\n+\tif (ret < 0) {\n+\t\t/* ENOTSUP means segment is valid, but there is not support for\n+\t\t * segment fd API (e.g. on FreeBSD).\n+\t\t */\n+\t\tif (errno == ENOTSUP)\n+\t\t\treturn 1;\n+\t\t/* all other errors are treated as failures */\n+\t\treturn -1;\n+\t}\n+\n+\t/* we're able to get memseg fd - try getting its offset */\n+\tret = rte_memseg_get_fd_offset_thread_unsafe(ms, &offset);\n+\tif (ret < 0) {\n+\t\tif (errno == ENOTSUP)\n+\t\t\treturn 1;\n+\t\treturn -1;\n+\t}\n+\treturn 0;\n+}\n+\n static int\n test_memory(void)\n {\n \tuint64_t s;\n+\tint ret;\n \n \t/*\n \t * dump the mapped memory: the python-expect script checks\n@@ -59,6 +93,15 @@ test_memory(void)\n \t/* try to read memory (should not segfault) */\n \trte_memseg_walk(check_mem, NULL);\n \n+\t/* check segment fd support */\n+\tret = rte_memseg_walk(check_seg_fds, NULL);\n+\tif (ret == 1) {\n+\t\tprintf(\"Segment fd API is unsupported\\n\");\n+\t} else if (ret == -1) {\n+\t\tprintf(\"Error getting segment fd's\\n\");\n+\t\treturn -1;\n+\t}\n+\n \treturn 0;\n }\n \n", "prefixes": [ "v3", "5/5" ] }{ "id": 48765, "url": "