Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/41594/?format=api
http://patchwork.dpdk.org/api/patches/41594/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/a98c198eb3b732c8bb48cd60a8e318d43820275d.1530031921.git.gaetan.rivet@6wind.com/", "project": { "id": 1, "url": "http://patchwork.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": "<a98c198eb3b732c8bb48cd60a8e318d43820275d.1530031921.git.gaetan.rivet@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/a98c198eb3b732c8bb48cd60a8e318d43820275d.1530031921.git.gaetan.rivet@6wind.com", "date": "2018-06-26T16:56:11", "name": "[v8,08/21] eal/dev: add device iterator interface", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "a84a819144c98591ff314bb9d8cde92993ce6855", "submitter": { "id": 269, "url": "http://patchwork.dpdk.org/api/people/269/?format=api", "name": "Gaëtan Rivet", "email": "gaetan.rivet@6wind.com" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/a98c198eb3b732c8bb48cd60a8e318d43820275d.1530031921.git.gaetan.rivet@6wind.com/mbox/", "series": [ { "id": 249, "url": "http://patchwork.dpdk.org/api/series/249/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=249", "date": "2018-06-26T16:56:03", "name": "Device querying", "version": 8, "mbox": "http://patchwork.dpdk.org/series/249/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/41594/comments/", "check": "fail", "checks": "http://patchwork.dpdk.org/api/patches/41594/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 9F4D71BE27;\n\tTue, 26 Jun 2018 18:57:06 +0200 (CEST)", "from mail-wr0-f195.google.com (mail-wr0-f195.google.com\n\t[209.85.128.195]) by dpdk.org (Postfix) with ESMTP id D649F1BE09\n\tfor <dev@dpdk.org>; Tue, 26 Jun 2018 18:56:58 +0200 (CEST)", "by mail-wr0-f195.google.com with SMTP id e18-v6so17976672wrs.5\n\tfor <dev@dpdk.org>; Tue, 26 Jun 2018 09:56:58 -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\tp5-v6sm2680880wre.83.2018.06.26.09.56.56\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 26 Jun 2018 09:56:56 -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\t:in-reply-to:references;\n\tbh=+PtSwL92xvH7QaDOLlLEBP1myR80ZkQw2JwqGJe+bOA=;\n\tb=DYMQUxEnkiy1QinlUZowWV1sxiCYf9fGtwsOT+6etbhZmVa+KhdaIVHdSQYDqu8o9+\n\t/fL8Pcn112NsGB88FmlO/x/2z34yluzPaVK4m6rA1BSHs90Bp7P6TxDCX5vPczjivWuo\n\ty39s+eNoh9CkRJlokNMCLTt+c6MHTE6Ns9II6RPfNpn7ObqkvMqxVZGbxt5F6HbsgFHA\n\tRKUQsjuaAIW21I4QQI/Tkm6cXh0+tjjqlfQe7Zsk/HdQY/Y3PlATf1tTYitFkkzLGdX5\n\tHM+8qJlKCSM5FYEBKO4Rs5gr1Tah/KP45WfaTDEtROKi5qPlHhOUEb33C/kPRTMM0gD8\n\t7n0w==", "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:in-reply-to:references;\n\tbh=+PtSwL92xvH7QaDOLlLEBP1myR80ZkQw2JwqGJe+bOA=;\n\tb=gaZv6jWUyY1RXGV7hkK6HUfR9aibgQnp2fjU4V2ADM2OGUBGTRKkECphM02oPOlcCZ\n\t6Rk588XbuRLLX0Tn+qIZzi4/6dgdsmXZvL2BUnuDrtDRz73tqbAMMCHmmqVoma8F8hvA\n\tkEwlO3WIzNU0eo6Rl2A9rbhEHqzSUxmgDg5AYDl1TwrvDxOl/bGpRW51IQRRyCiNCyuM\n\tCB+vgDls293DHsxk//YvO+FKF3cjZB6LcOmtmPehNHNhNKowxF7BSiFpDwosl0nswX+V\n\t0yRQt10IxlvnQ55xZLlu5UrErPMTp2pWquNFkqXAKBkKyGAjYslzuMY7aehzWCRXE3SG\n\tIKVQ==", "X-Gm-Message-State": "APt69E0Ihc/G35tq51JekUqHg3xFlOJxPPWrJOqml+8S9ATJUdwOPQRu\n\tw2hOSKiuKOBrtw5ellycRYz5uQ1j", "X-Google-Smtp-Source": "AAOMgpcvZ/dGpy7FQENM+vEvKs6t9VJvEDNNMHjyBQXHcBzqRogJsJvotEVrwCiDK9vC/2URkB2XnA==", "X-Received": "by 2002:adf:a963:: with SMTP id\n\tu90-v6mr987421wrc.248.1530032218065; \n\tTue, 26 Jun 2018 09:56:58 -0700 (PDT)", "From": "Gaetan Rivet <gaetan.rivet@6wind.com>", "To": "dev@dpdk.org", "Cc": "Gaetan Rivet <gaetan.rivet@6wind.com>", "Date": "Tue, 26 Jun 2018 18:56:11 +0200", "Message-Id": "<a98c198eb3b732c8bb48cd60a8e318d43820275d.1530031921.git.gaetan.rivet@6wind.com>", "X-Mailer": "git-send-email 2.11.0", "In-Reply-To": [ "<cover.1530031921.git.gaetan.rivet@6wind.com>", "<cover.1530031921.git.gaetan.rivet@6wind.com>" ], "References": [ "<cover.1521124599.git.gaetan.rivet@6wind.com>\n\t<cover.1530031921.git.gaetan.rivet@6wind.com>", "<cover.1530031921.git.gaetan.rivet@6wind.com>" ], "Subject": "[dpdk-dev] [PATCH v8 08/21] eal/dev: add device iterator interface", "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": "A device iterator allows iterating over a set of devices.\nThis set is defined by the two descriptions offered,\n\n * rte_bus\n * rte_class\n\nOnly one description can be provided, or both. It is not allowed to\nprovide no description at all.\n\nEach layer of abstraction then performs a filter based on the\ndescription provided. This filtering allows iterating on their internal\nset of devices, stopping when a match is valid and returning the current\niteration context.\n\nThis context allows starting the next iteration from the same point and\ngoing forward.\n\nSigned-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>\n---\n lib/librte_eal/common/include/rte_dev.h | 47 +++++++++++++++++++++++++++++++++\n 1 file changed, 47 insertions(+)", "diff": "diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h\nindex 3879ff3ca..120df729f 100644\n--- a/lib/librte_eal/common/include/rte_dev.h\n+++ b/lib/librte_eal/common/include/rte_dev.h\n@@ -285,6 +285,53 @@ __attribute__((used)) = str\n static const char DRV_EXP_TAG(name, kmod_dep_export)[] \\\n __attribute__((used)) = str\n \n+/**\n+ * Iteration context.\n+ *\n+ * This context carries over the current iteration state.\n+ */\n+struct rte_dev_iterator {\n+\tconst char *devstr; /**< device string. */\n+\tconst char *busstr; /**< bus-related part of device string. */\n+\tconst char *clsstr; /**< class-related part of device string. */\n+\tstruct rte_bus *bus; /**< bus handle. */\n+\tstruct rte_class *cls; /**< class handle. */\n+\tstruct rte_device *device; /**< current position. */\n+\tvoid *class_device; /**< additional specialized context. */\n+};\n+\n+/**\n+ * Device iteration function.\n+ *\n+ * Find the next device matching properties passed in parameters.\n+ * The function takes an additional ``start`` parameter, that is\n+ * used as starting context when relevant.\n+ *\n+ * The function returns the current element in the iteration.\n+ * This return value will potentially be used as a start parameter\n+ * in subsequent calls to the function.\n+ *\n+ * The additional iterator parameter is only there if a specific\n+ * implementation needs additional context. It must not be modified by\n+ * the iteration function itself.\n+ *\n+ * @param start\n+ * Starting iteration context.\n+ *\n+ * @param devstr\n+ * Device description string.\n+ *\n+ * @param it\n+ * Device iterator.\n+ *\n+ * @return\n+ * The address of the current element matching the device description\n+ * string.\n+ */\n+typedef void *(*rte_dev_iterate_t)(const void *start,\n+\t\t\t\t const char *devstr,\n+\t\t\t\t const struct rte_dev_iterator *it);\n+\n #ifdef __cplusplus\n }\n #endif\n", "prefixes": [ "v8", "08/21" ] }{ "id": 41594, "url": "