Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/42349/?format=api
http://patches.dpdk.org/api/patches/42349/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/ad1b00e2cee98f4fa1e0754062da5ef4a668be78.1530791217.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": "<ad1b00e2cee98f4fa1e0754062da5ef4a668be78.1530791217.git.gaetan.rivet@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/ad1b00e2cee98f4fa1e0754062da5ef4a668be78.1530791217.git.gaetan.rivet@6wind.com", "date": "2018-07-05T11:48:21", "name": "[v10,14/27] kvargs: add generic string matching callback", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "6ae745fa44e2e80ca73aa57562bfdb043521d087", "submitter": { "id": 269, "url": "http://patches.dpdk.org/api/people/269/?format=api", "name": "Gaëtan Rivet", "email": "gaetan.rivet@6wind.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/ad1b00e2cee98f4fa1e0754062da5ef4a668be78.1530791217.git.gaetan.rivet@6wind.com/mbox/", "series": [ { "id": 419, "url": "http://patches.dpdk.org/api/series/419/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=419", "date": "2018-07-05T11:48:07", "name": "Device querying", "version": 10, "mbox": "http://patches.dpdk.org/series/419/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/42349/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/42349/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 5ECEE1BF61;\n\tThu, 5 Jul 2018 13:49:38 +0200 (CEST)", "from mail-wm0-f68.google.com (mail-wm0-f68.google.com\n\t[74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 8318E1BED9\n\tfor <dev@dpdk.org>; Thu, 5 Jul 2018 13:49:15 +0200 (CEST)", "by mail-wm0-f68.google.com with SMTP id b188-v6so10645864wme.3\n\tfor <dev@dpdk.org>; Thu, 05 Jul 2018 04:49:15 -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\to42-v6sm15809183wrc.50.2018.07.05.04.49.13\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 05 Jul 2018 04:49:13 -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=ro5b/V/df5FS4FmkLaHb19yi4/xQrxaDntciNRLw1E8=;\n\tb=IPlNdmKKQ0NcBfpyjoTjvaFsLVt3D9XpD/HDv9Fgwv+TF1Cdkhn+7sydHKBIkX5Eo9\n\tz+yDBRUGWvL8ovkgsMuwnh4tZ0TxZ/XfccAfPXG6h2SJqo+kP6j2FhKNLXHp87oZ8u7n\n\tSnYCYCaHuNqGLNO6hSnG4scSDn+7Jt6QSKmmVYsbapui6ilVOPX03/l6TnrV0dbNdka7\n\tfarKGuXP8hq5XYzz+q/wewiKElXk1++vFG+tybNb8tmX7wR3yeKLmzXGKho9ec+OoyIS\n\trSNJxhFWvK+o0LdH1JR9D0TZS943Oiqe11pE5jXiKhAM0jznKcYoWD4eysAO+hLfmJqR\n\tc9WA==", "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=ro5b/V/df5FS4FmkLaHb19yi4/xQrxaDntciNRLw1E8=;\n\tb=RwiRjixHVHj9BpNCRMxf2ujnUFehUJDr9jN0fDbTRCjQ/NRdIN4O3y2KXDZtNuPhvc\n\tZ7g3PJBYi6Y8KSUwFnbyi0hFGAW1NSVgqqPintsUeI6oPgoXC8QzYgRh/mjzjNVMpNla\n\tV0j9RujtUpQolSpMAFYbtwJ0/X0MvEYiQDsGCtm/xRlYzqdQnfdVQmMufOP+MfQqBHl7\n\toYVrpfHZHax02rQwDMKXIsMfUisk7AwPglQcpcumetLzgwR4B0GcQecIW8tg0MX8MvFC\n\tJ5QkNhrFaHD+goqy1OlUXFk3YiwDFLogmRIu5VWOON1avFkfJNC0IJVLIHMW8Pi9CKBQ\n\tvSLA==", "X-Gm-Message-State": "APt69E3y5ImNIxeocjX6E/Q05eICcis3hazIkMv2IAAJlpL2htYT81MK\n\tn9tjqXp82gajmdKupabBBaxJNhFj", "X-Google-Smtp-Source": "AAOMgpc/tU2iYETThxUzt342PxMcrZdZfANdoQ93yHftNScPSk9H1foPReiYf/366V807vVRXI7/ZQ==", "X-Received": "by 2002:a1c:894f:: with SMTP id\n\tl76-v6mr3817662wmd.103.1530791354813; \n\tThu, 05 Jul 2018 04:49:14 -0700 (PDT)", "From": "Gaetan Rivet <gaetan.rivet@6wind.com>", "To": "dev@dpdk.org", "Cc": "Gaetan Rivet <gaetan.rivet@6wind.com>", "Date": "Thu, 5 Jul 2018 13:48:21 +0200", "Message-Id": "<ad1b00e2cee98f4fa1e0754062da5ef4a668be78.1530791217.git.gaetan.rivet@6wind.com>", "X-Mailer": "git-send-email 2.18.0", "In-Reply-To": "<cover.1530791217.git.gaetan.rivet@6wind.com>", "References": "<cover.1530791217.git.gaetan.rivet@6wind.com>", "Subject": "[dpdk-dev] [PATCH v10 14/27] kvargs: add generic string matching\n\tcallback", "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 can be used as a callback to\nrte_kvargs_process.\n\nThis should reduce code duplication.\n\nSigned-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>\n---\n lib/librte_kvargs/rte_kvargs.c | 10 +++++++++\n lib/librte_kvargs/rte_kvargs.h | 28 ++++++++++++++++++++++++\n lib/librte_kvargs/rte_kvargs_version.map | 1 +\n 3 files changed, 39 insertions(+)", "diff": "diff --git a/lib/librte_kvargs/rte_kvargs.c b/lib/librte_kvargs/rte_kvargs.c\nindex 519f77679..8270d2939 100644\n--- a/lib/librte_kvargs/rte_kvargs.c\n+++ b/lib/librte_kvargs/rte_kvargs.c\n@@ -193,3 +193,13 @@ rte_kvargs_parse2(const char *args, const char * const valid_keys[],\n \tfree(copy);\n \treturn kvlist;\n }\n+\n+__rte_experimental\n+int\n+rte_kvargs_strcmp(const char *key __rte_unused,\n+\t\t const char *value, void *opaque)\n+{\n+\tconst char *str = opaque;\n+\n+\treturn -abs(strcmp(str, value));\n+}\ndiff --git a/lib/librte_kvargs/rte_kvargs.h b/lib/librte_kvargs/rte_kvargs.h\nindex 98c4ed1bf..ac2999ef3 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@@ -151,6 +153,32 @@ int rte_kvargs_process(const struct rte_kvargs *kvlist,\n unsigned rte_kvargs_count(const struct rte_kvargs *kvlist,\n \tconst char *key_match);\n \n+/**\n+ * Generic kvarg handler for string comparison.\n+ *\n+ * This function can be used for a generic string comparison processing\n+ * on a list of kvargs.\n+ *\n+ * @param key\n+ * kvarg pair key.\n+ *\n+ * @param value\n+ * kvarg pair value.\n+ *\n+ * @param opaque\n+ * Opaque pointer to a string.\n+ *\n+ * @return\n+ * 0 if the strings match.\n+ * !0 otherwise or on error.\n+ *\n+ * Unless strcmp, comparison ordering is not kept.\n+ * In order for rte_kvargs_process to stop processing on match error,\n+ * a negative value is returned even if strcmp had returned a positive one.\n+ */\n+__rte_experimental\n+int rte_kvargs_strcmp(const char *key, const char *value, void *opaque);\n+\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/librte_kvargs/rte_kvargs_version.map b/lib/librte_kvargs/rte_kvargs_version.map\nindex b9fe44b98..6a41a6b65 100644\n--- a/lib/librte_kvargs/rte_kvargs_version.map\n+++ b/lib/librte_kvargs/rte_kvargs_version.map\n@@ -13,5 +13,6 @@ EXPERIMENTAL {\n \tglobal:\n \n \trte_kvargs_parse2;\n+\trte_kvargs_strcmp;\n \n } DPDK_2.0;\n", "prefixes": [ "v10", "14/27" ] }{ "id": 42349, "url": "