Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/44441/?format=api
https://patches.dpdk.org/api/patches/44441/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20180907230958.21402-1-thomas@monjalon.net/", "project": { "id": 1, "url": "https://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": "<20180907230958.21402-1-thomas@monjalon.net>", "list_archive_url": "https://inbox.dpdk.org/dev/20180907230958.21402-1-thomas@monjalon.net", "date": "2018-09-07T23:09:58", "name": "[RFC] eal: allow hotplug to skip an already probed device", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "3829c0fbb334ed0673d61794d825aaa62f05497f", "submitter": { "id": 685, "url": "https://patches.dpdk.org/api/people/685/?format=api", "name": "Thomas Monjalon", "email": "thomas@monjalon.net" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20180907230958.21402-1-thomas@monjalon.net/mbox/", "series": [ { "id": 1237, "url": "https://patches.dpdk.org/api/series/1237/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=1237", "date": "2018-09-07T23:09:58", "name": "[RFC] eal: allow hotplug to skip an already probed device", "version": 1, "mbox": "https://patches.dpdk.org/series/1237/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/44441/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/44441/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 B40DD5F19;\n\tSat, 8 Sep 2018 01:10:08 +0200 (CEST)", "from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com\n\t[66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 491305F12\n\tfor <dev@dpdk.org>; Sat, 8 Sep 2018 01:10:07 +0200 (CEST)", "from compute1.internal (compute1.nyi.internal [10.202.2.41])\n\tby mailout.nyi.internal (Postfix) with ESMTP id C6FD321FFE;\n\tFri, 7 Sep 2018 19:10:06 -0400 (EDT)", "from mailfrontend2 ([10.202.2.163])\n\tby compute1.internal (MEProxy); Fri, 07 Sep 2018 19:10:06 -0400", "from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])\n\tby mail.messagingengine.com (Postfix) with ESMTPA id 748241029C;\n\tFri, 7 Sep 2018 19:10:05 -0400 (EDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=\n\tcc:date:from:message-id:subject:to:x-me-sender:x-me-sender\n\t:x-sasl-enc; s=mesmtp; bh=En8k9of4iucTDaGMb9IHEIBZzFMXN8hsfuVpz7\n\tAM0UE=; b=T4ijSREhyt4YbszDRJc65/H9XSIK61RB5wJOWqmQa3i3BueQ1/h+1C\n\tc2gn5eXtvC3zA4K05GwrPMVL4VRzEsszAHNYRiE4PWAR3ZFhJLomIx2RSwLz8Yqg\n\tRWO7/7b3DDxm3xgrI5xppEY7I/wRtcEfA7BPyAUTA+fCxpVdXUHqk=", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n\tmessagingengine.com; h=cc:date:from:message-id:subject:to\n\t:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=En8k9of4iucTDaGMb\n\t9IHEIBZzFMXN8hsfuVpz7AM0UE=; b=fb2UI2w6fvQlfM+1sPq54vA9vQkFeOq3f\n\tbA3w9RQpA1VoxWY1fQV+kvSEQiuj2dD3JpScr7DvyPzpg7q+hNX2rpqjv8zVNT9X\n\t4vjcSRkBgtX+UI/YNICDnjEqcN1dQZJGEcB7Uv4cs628MDOepIvQqcxlabhKUHrH\n\tzTbcrq5o/k0Rxf+JQiuS8uoYeEXl0AuoOzD60UxfWhaahJc2eVNvBeT0b2adFvmC\n\tG/yZ7Q1hJBRsjLVqT6aHXx/FqdJ0HkoHGNI78XwrG6LTF5kqkYicy5EQNO0ClopM\n\tI5MsVASCopTM5efqoeQ8ij6f5r4RKOznjrVMVkOzmnKXsYqyMe6nw==" ], "X-ME-Proxy": "<xmx:TQWTW-nWgKhNxesQp2SHSggC0-hJEA5FgKQK7wJiDLuLt7yIpqFScQ>\n\t<xmx:TQWTW9jtXZ-UqnE3QOQ_FrMkYuIjpVmStxB6KWVdl7l4Hc-yNMuEmg>\n\t<xmx:TgWTW-1kfDSWqWcQ7zFopjcjZcBnaGAk5xKFR6q-PBx0ZEnjRoCK4A>\n\t<xmx:TgWTWxRsyXQa9htfiCv_sL0dEv-0yyNTGbd1IipNprkY6fBTRnSxWA>\n\t<xmx:TgWTWwZm7NddEkhL0sobeO1B0s1AJ4gTKx7Z6E8YfeQy7z5jqaY4iQ>\n\t<xmx:TgWTW9AeckYPjtVVIKKX3-8BhKsSatyNvaV8sHj488j24Oj-6HwTvQ>", "X-ME-Sender": "<xms:TQWTWzrjz4SUy3e1niydwxkQfcTF_wn6bjLTF1Ok6qlgM4yhLYXBVw>", "From": "Thomas Monjalon <thomas@monjalon.net>", "To": "dev@dpdk.org", "Cc": "gaetan.rivet@6wind.com", "Date": "Sat, 8 Sep 2018 01:09:58 +0200", "Message-Id": "<20180907230958.21402-1-thomas@monjalon.net>", "X-Mailer": "git-send-email 2.18.0", "Subject": "[dpdk-dev] [RFC] eal: allow hotplug to skip an already probed device", "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": "In the devargs syntax for device representors, it is possible to add\nseveral devices at once: -w dbdf,representor=[0-3]\nIt will become a more frequent case when introducing wildcards\nand ranges in the new devargs syntax.\n\nIf a devargs string is provided for probing, and updated with a bigger\nrange for a new probing, then we do not want it to fail because\npart of this range was already probed previously.\n\nOn the opposite, we could require rte_eal_hotplug_add() to try\nto add all matching devices, and fail if one is already probed.\n\nThat's why a new parameter is added to specify if the function\nmust fail or not when trying to add an already probed device.\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\n---\nThis patch contains only the change in the function itself as RFC.\n\nThis idea was presented at Dublin during the \"hotplug talk\".\n---\n lib/librte_eal/common/eal_common_dev.c | 4 +++-\n lib/librte_eal/common/include/rte_dev.h | 5 ++++-\n 2 files changed, 7 insertions(+), 2 deletions(-)", "diff": "diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c\nindex 678dbcac7..17d7e9089 100644\n--- a/lib/librte_eal/common/eal_common_dev.c\n+++ b/lib/librte_eal/common/eal_common_dev.c\n@@ -128,7 +128,7 @@ int rte_eal_dev_detach(struct rte_device *dev)\n }\n \n int __rte_experimental rte_eal_hotplug_add(const char *busname, const char *devname,\n-\t\t\tconst char *devargs)\n+\t\t\tconst char *devargs, bool fail_existing)\n {\n \tstruct rte_bus *bus;\n \tstruct rte_device *dev;\n@@ -173,6 +173,8 @@ int __rte_experimental rte_eal_hotplug_add(const char *busname, const char *devn\n \t}\n \n \tif (dev->driver != NULL) {\n+\t\tif (!fail_existing)\n+\t\t\treturn 0;\n \t\tRTE_LOG(ERR, EAL, \"Device is already plugged\\n\");\n \t\treturn -EEXIST;\n \t}\ndiff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h\nindex b80a80598..10a1cd2b4 100644\n--- a/lib/librte_eal/common/include/rte_dev.h\n+++ b/lib/librte_eal/common/include/rte_dev.h\n@@ -201,11 +201,14 @@ int rte_eal_dev_detach(struct rte_device *dev);\n * capable of handling it and pass it to the driver probing function.\n * @param devargs\n * Device arguments to be passed to the driver.\n+ * @param fail_existing\n+ * If true and a matching device is already probed, then return -EEXIST.\n+ * If false, then skip the already probed device without returning an error.\n * @return\n * 0 on success, negative on error.\n */\n int __rte_experimental rte_eal_hotplug_add(const char *busname, const char *devname,\n-\t\t\tconst char *devargs);\n+\t\t\tconst char *devargs, bool fail_existing);\n \n /**\n * @warning\n", "prefixes": [ "RFC" ] }{ "id": 44441, "url": "