Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/48645/?format=api
http://patches.dpdk.org/api/patches/48645/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/e31a2cde4f69ad12c1d1ec04d3aa47ca225b74d1.1544546363.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": "<e31a2cde4f69ad12c1d1ec04d3aa47ca225b74d1.1544546363.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/e31a2cde4f69ad12c1d1ec04d3aa47ca225b74d1.1544546363.git.anatoly.burakov@intel.com", "date": "2018-12-11T16:43:32", "name": "[v2,5/5] test: add segment fd API test", "commit_ref": null, "pull_url": null, "state": "superseded", "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/e31a2cde4f69ad12c1d1ec04d3aa47ca225b74d1.1544546363.git.anatoly.burakov@intel.com/mbox/", "series": [ { "id": 2730, "url": "http://patches.dpdk.org/api/series/2730/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=2730", "date": "2018-12-11T16:43:27", "name": "Allow using virtio without hugepages", "version": 2, "mbox": "http://patches.dpdk.org/series/2730/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/48645/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/48645/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 4752D5F2D;\n\tTue, 11 Dec 2018 17:43:43 +0100 (CET)", "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n\tby dpdk.org (Postfix) with ESMTP id 5F50E5B38\n\tfor <dev@dpdk.org>; Tue, 11 Dec 2018 17:43:37 +0100 (CET)", "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t11 Dec 2018 08:43:36 -0800", "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga005.jf.intel.com with ESMTP; 11 Dec 2018 08:43:34 -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\twBBGhX6a026222; Tue, 11 Dec 2018 16:43:33 GMT", "from sivswdev05.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev05.ir.intel.com with ESMTP id wBBGhXAl007068;\n\tTue, 11 Dec 2018 16:43:33 GMT", "(from aburakov@localhost)\n\tby sivswdev05.ir.intel.com with LOCAL id wBBGhXmr007064;\n\tTue, 11 Dec 2018 16:43:33 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,342,1539673200\"; d=\"scan'208\";a=\"282736509\"", "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": "Tue, 11 Dec 2018 16:43:32 +0000", "Message-Id": "<e31a2cde4f69ad12c1d1ec04d3aa47ca225b74d1.1544546363.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 1.7.0.7", "In-Reply-To": [ "<cover.1544546363.git.anatoly.burakov@intel.com>", "<cover.1544546363.git.anatoly.burakov@intel.com>" ], "References": [ "<cover.1544546363.git.anatoly.burakov@intel.com>", "<cover.1542130721.git.anatoly.burakov@intel.com>\n\t<cover.1544546363.git.anatoly.burakov@intel.com>" ], "Subject": "[dpdk-dev] [PATCH v2 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>\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": [ "v2", "5/5" ] }{ "id": 48645, "url": "