Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/42178/?format=api
http://patches.dpdk.org/api/patches/42178/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/062cf5694b1776a18f2f0718224d7e379c77ba7c.1530655929.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": "<062cf5694b1776a18f2f0718224d7e379c77ba7c.1530655929.git.gaetan.rivet@6wind.com>", "list_archive_url": "https://inbox.dpdk.org/dev/062cf5694b1776a18f2f0718224d7e379c77ba7c.1530655929.git.gaetan.rivet@6wind.com", "date": "2018-07-03T22:14:52", "name": "[v9,09/27] eal/dev: add device iterator interface", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "a84a819144c98591ff314bb9d8cde92993ce6855", "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/062cf5694b1776a18f2f0718224d7e379c77ba7c.1530655929.git.gaetan.rivet@6wind.com/mbox/", "series": [ { "id": 383, "url": "http://patches.dpdk.org/api/series/383/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=383", "date": "2018-07-03T22:14:43", "name": "Device querying", "version": 9, "mbox": "http://patches.dpdk.org/series/383/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/42178/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/42178/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 2F6CB1BE85;\n\tWed, 4 Jul 2018 00:15:51 +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 CC0731BE6C\n\tfor <dev@dpdk.org>; Wed, 4 Jul 2018 00:15:45 +0200 (CEST)", "by mail-wm0-f68.google.com with SMTP id v16-v6so3797647wmv.5\n\tfor <dev@dpdk.org>; Tue, 03 Jul 2018 15:15:45 -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\ti190-v6sm3771084wmd.33.2018.07.03.15.15.43\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 03 Jul 2018 15:15:44 -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=k3CrXusUMOVLa+lXJfElspjsm+qcd/OYCmAsvAgaQ89BDZ2yz56HefaZI/tghJnAkW\n\tOBnUOlFETB7+vG6jXNDACC7c3N4T6/F1XcuHB0Fwwum72ywAS3JSiybHEUlG250ZtqPh\n\tN5xS9IlOnBs0aV/I61kwZsmNKYi83qYj3piacW5Iea2fPnjJ2sJcXM5MpAjVnveL8IPy\n\t6QyiwEd3iDqrx2jchNKnmgartIw9S1oLdrIS900xovGWCuFs1QOUTIRsAmQKoOuOLxY5\n\tuHIymP2D8QZkQ8oL9Unupv3CJj/rOIsrvv6Lf+bdpdds7PTI2CUYMfjUvSLNOhZrerTR\n\tStUA==", "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=W5LAmtVerq3wd/BeK0YzmavAVDbkHRqN6/IdToScBuBIlj93qeKmGOTdG4HjDX1LO9\n\tCY3pJbGOacZGC9dYLEWJ50tWagOrgS+wMTk5rDfhei/zjsS57lwm8/TGyJUd77Q1BSRZ\n\tQP+y6XidWsGDOG+Dum2vYEda7ILe3y6jNAVJln8bPO+KqwTIZ1KbcR9h0xwSW8rFel6k\n\tW3f0AqK/3r6Gp27YrcvAVYBYMwteyZcC5s5O9kvD0mk1T/WaRn1VG3SDh2jJfCTcHZS2\n\tZPP33N8CDqi6nGUf65f1m/jHywD+xBzdwE8gdVrsGHojfKEPXzkTbI0dfsoyAT4TzjMW\n\tmYGw==", "X-Gm-Message-State": "APt69E3LOyM2pV5njuUVS3IuCUkik/jea1WPxVmTDBC6JDinv/fgNsZy\n\tywXGtlLvILZAnqgk6YM29JSlQxta", "X-Google-Smtp-Source": "AAOMgpc8ZKZn279OwmbAMHCsJ7A6UhVuEFtOODUZDCiMDrRJ+VFklPbwbzWp3woaBCuXmPk3SYcH+Q==", "X-Received": "by 2002:a1c:f106:: with SMTP id\n\tp6-v6mr11571786wmh.68.1530656145139; \n\tTue, 03 Jul 2018 15:15:45 -0700 (PDT)", "From": "Gaetan Rivet <gaetan.rivet@6wind.com>", "To": "dev@dpdk.org", "Cc": "Gaetan Rivet <gaetan.rivet@6wind.com>", "Date": "Wed, 4 Jul 2018 00:14:52 +0200", "Message-Id": "<062cf5694b1776a18f2f0718224d7e379c77ba7c.1530655929.git.gaetan.rivet@6wind.com>", "X-Mailer": "git-send-email 2.11.0", "In-Reply-To": [ "<cover.1530655929.git.gaetan.rivet@6wind.com>", "<cover.1530655929.git.gaetan.rivet@6wind.com>" ], "References": [ "<cover.1521124599.git.gaetan.rivet@6wind.com>\n\t<cover.1530655929.git.gaetan.rivet@6wind.com>", "<cover.1530655929.git.gaetan.rivet@6wind.com>" ], "Subject": "[dpdk-dev] [PATCH v9 09/27] 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": [ "v9", "09/27" ] }{ "id": 42178, "url": "