Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/42898/?format=api
http://patches.dpdk.org/api/patches/42898/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/27f0f6106f22f2d1943f0d838d326670e9a37a65.1531345404.git.gaetan.rivet@6wind.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": "<27f0f6106f22f2d1943f0d838d326670e9a37a65.1531345404.git.gaetan.rivet@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/27f0f6106f22f2d1943f0d838d326670e9a37a65.1531345404.git.gaetan.rivet@6wind.com", "date": "2018-07-11T21:44:55", "name": "[v11,05/25] kvargs: introduce a more flexible parsing function", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "37ec5957af666dca3b98fab7365bd498e9ceffbb", "submitter": { "id": 269, "url": "http://patches.dpdk.org/api/people/269/?format=api", "name": "Gaëtan Rivet", "email": "gaetan.rivet@6wind.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/27f0f6106f22f2d1943f0d838d326670e9a37a65.1531345404.git.gaetan.rivet@6wind.com/mbox/", "series": [ { "id": 533, "url": "http://patches.dpdk.org/api/series/533/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=533", "date": "2018-07-11T21:44:50", "name": "Device querying", "version": 11, "mbox": "http://patches.dpdk.org/series/533/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/42898/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/42898/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 9C80B1B576;\n\tWed, 11 Jul 2018 23:45:49 +0200 (CEST)", "from mail-wr1-f67.google.com (mail-wr1-f67.google.com\n\t[209.85.221.67]) by dpdk.org (Postfix) with ESMTP id 4CAD51B449\n\tfor <dev@dpdk.org>; Wed, 11 Jul 2018 23:45:44 +0200 (CEST)", "by mail-wr1-f67.google.com with SMTP id c13-v6so19557957wrt.1\n\tfor <dev@dpdk.org>; Wed, 11 Jul 2018 14:45:44 -0700 (PDT)", "from bidouze.dev.6wind.com. (host.78.145.23.62.rev.coltfrance.com.\n\t[62.23.145.78]) by smtp.gmail.com with ESMTPSA id\n\th5-v6sm10550936wrr.19.2018.07.11.14.45.42\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 11 Jul 2018 14:45:42 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=6wind-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=ri/JnyweicfVQyHpzve2mJ+UMofLqZON5aR82jts/ao=;\n\tb=KxAf/Hc1s6+VRYoBpVqM6UVa11rWiBSQrOaovYvfGEpvJFLmx0nny/3CJOB9LYAjCF\n\t3XL+wpt5xztveFdL5SnzntuRTaPNJFER0eRTGLUdEuQje0G0gbErRYxHTf0s12/JrkZq\n\th009ycUayjocP0pSgTy+KS4LxTaf2ldYhyNa30DdXZj7Mmziv+egz2FyTIrW/rp7tNOK\n\tIhAUVNES2JFHD1h24+GN1cxwnwVwf5Aqa39i9YGgRTJkLi3wyKo9RQb2w92eZ9HCqnPU\n\tbdJIaa6e/rlen/Tgyv/7MThODWdGsyIpss8VrEEpXk3DTo6OrT0PXdRRuZmi+YSzL64X\n\tZYzQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=ri/JnyweicfVQyHpzve2mJ+UMofLqZON5aR82jts/ao=;\n\tb=Dkkg72nf6UsRypLdTPS17VYGcexWOXbIL1H4YhWFc+aQ2HYofIznbIQBFrVgcdzjPU\n\tfPfeIimdh8rO3jA9FmXcLuhunlMcz45uuWgQsJFETbuX0PvAGcK9LHbKQG4eziSQauY3\n\tDLNp4nT7hjWV7gcOHstGzjiT/Z2MX+MYXIZX8+azwE3H4p0pT1MjcOYJ2FWagDRYpA98\n\tL9QzxcYQ+97eN1xhFLV20K+dOoIELhCwlSrDO5a+VdIPMrKgkp0NSxzpcOL/6Raitz56\n\txY0hs9zYsd+qUZxBDG7vvtld13Up/bdEl0iOaj4C/Srg+UZQFrkf8Xo4xkCQE1eH0R56\n\tbKow==", "X-Gm-Message-State": "AOUpUlHVMRBEu1aEVoS/prK2vfXcwKdc/yDQT2vndCIGokVXBm3+t1ZE\n\tf5KPWM8K+nBpqEidJLb13qbfUw/F", "X-Google-Smtp-Source": "AAOMgpeDS5UiqnnxNDirJ+0Gf9jbtWqBKdQxHicDhdCMrB+9Lh+fVU2dK2avh9QqOQJ2NLqOyEFieg==", "X-Received": "by 2002:a5d:4c4c:: with SMTP id\n\tn12-v6mr200751wrt.71.1531345543655; \n\tWed, 11 Jul 2018 14:45:43 -0700 (PDT)", "From": "Gaetan Rivet <gaetan.rivet@6wind.com>", "To": "dev@dpdk.org", "Cc": "Gaetan Rivet <gaetan.rivet@6wind.com>", "Date": "Wed, 11 Jul 2018 23:44:55 +0200", "Message-Id": "<27f0f6106f22f2d1943f0d838d326670e9a37a65.1531345404.git.gaetan.rivet@6wind.com>", "X-Mailer": "git-send-email 2.18.0", "In-Reply-To": "<cover.1531345404.git.gaetan.rivet@6wind.com>", "References": "<cover.1531345404.git.gaetan.rivet@6wind.com>", "Subject": "[dpdk-dev] [PATCH v11 05/25] kvargs: introduce a more flexible\n\tparsing function", "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": "This function permits defining additional terminating characters,\nending the parsing to arbitrary delimiters.\n\nSigned-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>\nAcked-by: Thomas Monjalon <thomas@monjalon.net>\nAcked-by: Shreyansh Jain <shreyansh.jain@nxp.com>\n---\n lib/Makefile | 1 +\n lib/librte_kvargs/meson.build | 2 ++\n lib/librte_kvargs/rte_kvargs.c | 25 ++++++++++++++++++\n lib/librte_kvargs/rte_kvargs.h | 32 ++++++++++++++++++++++++\n lib/librte_kvargs/rte_kvargs_version.map | 7 ++++++\n 5 files changed, 67 insertions(+)", "diff": "diff --git a/lib/Makefile b/lib/Makefile\nindex e8e903c8f..8a65525cd 100644\n--- a/lib/Makefile\n+++ b/lib/Makefile\n@@ -5,6 +5,7 @@ include $(RTE_SDK)/mk/rte.vars.mk\n \n DIRS-y += librte_compat\n DIRS-$(CONFIG_RTE_LIBRTE_KVARGS) += librte_kvargs\n+DEPDIRS-librte_kvargs := librte_compat\n DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_eal\n DIRS-$(CONFIG_RTE_LIBRTE_PCI) += librte_pci\n DEPDIRS-librte_pci := librte_eal\ndiff --git a/lib/librte_kvargs/meson.build b/lib/librte_kvargs/meson.build\nindex 0a81e8da7..a1c724961 100644\n--- a/lib/librte_kvargs/meson.build\n+++ b/lib/librte_kvargs/meson.build\n@@ -7,3 +7,5 @@ includes += include_directories('../../../lib/librte_eal/common/include')\n version = 1\n sources = files('rte_kvargs.c')\n headers = files('rte_kvargs.h')\n+\n+deps += 'compat'\ndiff --git a/lib/librte_kvargs/rte_kvargs.c b/lib/librte_kvargs/rte_kvargs.c\nindex 747f14964..52262fe54 100644\n--- a/lib/librte_kvargs/rte_kvargs.c\n+++ b/lib/librte_kvargs/rte_kvargs.c\n@@ -168,3 +168,28 @@ rte_kvargs_parse(const char *args, const char * const valid_keys[])\n \n \treturn kvlist;\n }\n+\n+__rte_experimental\n+struct rte_kvargs *\n+rte_kvargs_parse_delim(const char *args, const char * const valid_keys[],\n+\t\t const char *valid_ends)\n+{\n+\tstruct rte_kvargs *kvlist = NULL;\n+\tchar *copy;\n+\tsize_t len;\n+\n+\tif (valid_ends == NULL)\n+\t\treturn rte_kvargs_parse(args, valid_keys);\n+\n+\tcopy = strdup(args);\n+\tif (copy == NULL)\n+\t\treturn NULL;\n+\n+\tlen = strcspn(copy, valid_ends);\n+\tcopy[len] = '\\0';\n+\n+\tkvlist = rte_kvargs_parse(copy, valid_keys);\n+\n+\tfree(copy);\n+\treturn kvlist;\n+}\ndiff --git a/lib/librte_kvargs/rte_kvargs.h b/lib/librte_kvargs/rte_kvargs.h\nindex 51b8120b8..7f32fd1f6 100644\n--- a/lib/librte_kvargs/rte_kvargs.h\n+++ b/lib/librte_kvargs/rte_kvargs.h\n@@ -25,6 +25,8 @@\n extern \"C\" {\n #endif\n \n+#include <rte_compat.h>\n+\n /** Maximum number of key/value associations */\n #define RTE_KVARGS_MAX 32\n \n@@ -71,6 +73,36 @@ struct rte_kvargs {\n struct rte_kvargs *rte_kvargs_parse(const char *args,\n \t\tconst char *const valid_keys[]);\n \n+/**\n+ * Allocate a rte_kvargs and store key/value associations from a string.\n+ * This version will consider any byte from valid_ends as a possible\n+ * terminating character, and will not parse beyond any of their occurrence.\n+ *\n+ * The function allocates and fills an rte_kvargs structure from a given\n+ * string whose format is key1=value1,key2=value2,...\n+ *\n+ * The structure can be freed with rte_kvargs_free().\n+ *\n+ * @param args\n+ * The input string containing the key/value associations\n+ *\n+ * @param valid_keys\n+ * A list of valid keys (table of const char *, the last must be NULL).\n+ * This argument is ignored if NULL\n+ *\n+ * @param valid_ends\n+ * Acceptable terminating characters.\n+ * If NULL, the behavior is the same as ``rte_kvargs_parse``.\n+ *\n+ * @return\n+ * - A pointer to an allocated rte_kvargs structure on success\n+ * - NULL on error\n+ */\n+__rte_experimental\n+struct rte_kvargs *rte_kvargs_parse_delim(const char *args,\n+\t\tconst char *const valid_keys[],\n+\t\tconst char *valid_ends);\n+\n /**\n * Free a rte_kvargs structure\n *\ndiff --git a/lib/librte_kvargs/rte_kvargs_version.map b/lib/librte_kvargs/rte_kvargs_version.map\nindex 2030ec46c..afce125a9 100644\n--- a/lib/librte_kvargs/rte_kvargs_version.map\n+++ b/lib/librte_kvargs/rte_kvargs_version.map\n@@ -8,3 +8,10 @@ DPDK_2.0 {\n \n \tlocal: *;\n };\n+\n+EXPERIMENTAL {\n+\tglobal:\n+\n+\trte_kvargs_parse_delim;\n+\n+} DPDK_2.0;\n", "prefixes": [ "v11", "05/25" ] }{ "id": 42898, "url": "