Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/48182/?format=api
http://patchwork.dpdk.org/api/patches/48182/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/9ee6c634ef079abef070a72fff26d06e364a609b.1542623365.git.anatoly.burakov@intel.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": "<9ee6c634ef079abef070a72fff26d06e364a609b.1542623365.git.anatoly.burakov@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/9ee6c634ef079abef070a72fff26d06e364a609b.1542623365.git.anatoly.burakov@intel.com", "date": "2018-11-19T10:33:12", "name": "[v2] devbind: don't display non-existent device categories", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "1ae8ad70d6ff07ca7298a59d058a6b2b9ba817ac", "submitter": { "id": 4, "url": "http://patchwork.dpdk.org/api/people/4/?format=api", "name": "Anatoly Burakov", "email": "anatoly.burakov@intel.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/9ee6c634ef079abef070a72fff26d06e364a609b.1542623365.git.anatoly.burakov@intel.com/mbox/", "series": [ { "id": 2485, "url": "http://patchwork.dpdk.org/api/series/2485/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=2485", "date": "2018-11-19T10:33:12", "name": "[v2] devbind: don't display non-existent device categories", "version": 2, "mbox": "http://patchwork.dpdk.org/series/2485/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/48182/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/48182/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 009CC2C52;\n\tMon, 19 Nov 2018 11:33:18 +0100 (CET)", "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n\tby dpdk.org (Postfix) with ESMTP id DB7232B9E\n\tfor <dev@dpdk.org>; Mon, 19 Nov 2018 11:33:15 +0100 (CET)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t19 Nov 2018 02:33:14 -0800", "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby fmsmga001.fm.intel.com with ESMTP; 19 Nov 2018 02:33:13 -0800", "from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com\n\t[10.237.217.45])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\twAJAXDWC010741; Mon, 19 Nov 2018 10:33:13 GMT", "from sivswdev01.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev01.ir.intel.com with ESMTP id wAJAXCug001274;\n\tMon, 19 Nov 2018 10:33:12 GMT", "(from aburakov@localhost)\n\tby sivswdev01.ir.intel.com with LOCAL id wAJAXCuV001266;\n\tMon, 19 Nov 2018 10:33:12 GMT" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.56,252,1539673200\"; d=\"scan'208\";a=\"109299347\"", "From": "Anatoly Burakov <anatoly.burakov@intel.com>", "To": "dev@dpdk.org", "Cc": "david.hunt@intel.com, john.mcnamara@intel.com, thomas@monjalon.net,\n\tferruh.yigit@intel.com, keith.wiles@intel.com", "Date": "Mon, 19 Nov 2018 10:33:12 +0000", "Message-Id": "<9ee6c634ef079abef070a72fff26d06e364a609b.1542623365.git.anatoly.burakov@intel.com>", "X-Mailer": "git-send-email 1.7.0.7", "In-Reply-To": "<07b7c67be5adc770b028212ef8918d4ae8f11255.1542127066.git.anatoly.burakov@intel.com>", "References": "<07b7c67be5adc770b028212ef8918d4ae8f11255.1542127066.git.anatoly.burakov@intel.com>", "Subject": "[dpdk-dev] [PATCH v2] devbind: don't display non-existent device\n\tcategories", "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": "If there aren't any devices of a particular category on user's\nsystem, we still display them, which is bad for usability. Fix\ndevbind to not print out a category unless there are devices in\nit.\n\nSigned-off-by: Anatoly Burakov <anatoly.burakov@intel.com>\nReviewed-by: David Hunt <david.hunt@intel.com>\n---\n\nNotes:\n v2: fix indentation\n\n usertools/dpdk-devbind.py | 27 ++++++++++++++++++++-------\n 1 file changed, 20 insertions(+), 7 deletions(-)", "diff": "diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py\nindex 7d564634c..6051f6f9e 100755\n--- a/usertools/dpdk-devbind.py\n+++ b/usertools/dpdk-devbind.py\n@@ -546,14 +546,27 @@ def show_device_status(devices_type, device_name):\n else:\n kernel_drv.append(devices[d])\n \n+ n_devs = len(dpdk_drv) + len(kernel_drv) + len(no_drv)\n+\n+ # don't bother displaying anything if there are no devices\n+ if n_devs == 0:\n+ msg = \"No '%s' devices detected\" % device_name\n+ print(\"\")\n+ print(msg)\n+ print(\"\".join('=' * len(msg)))\n+ return\n+\n # print each category separately, so we can clearly see what's used by DPDK\n- display_devices(\"%s devices using DPDK-compatible driver\" % device_name,\n- dpdk_drv, \"drv=%(Driver_str)s unused=%(Module_str)s\")\n- display_devices(\"%s devices using kernel driver\" % device_name, kernel_drv,\n- \"if=%(Interface)s drv=%(Driver_str)s \"\n- \"unused=%(Module_str)s %(Active)s\")\n- display_devices(\"Other %s devices\" % device_name, no_drv,\n- \"unused=%(Module_str)s\")\n+ if len(dpdk_drv) != 0:\n+ display_devices(\"%s devices using DPDK-compatible driver\" % device_name,\n+ dpdk_drv, \"drv=%(Driver_str)s unused=%(Module_str)s\")\n+ if len(kernel_drv) != 0:\n+ display_devices(\"%s devices using kernel driver\" % device_name, kernel_drv,\n+ \"if=%(Interface)s drv=%(Driver_str)s \"\n+ \"unused=%(Module_str)s %(Active)s\")\n+ if len(no_drv) != 0:\n+ display_devices(\"Other %s devices\" % device_name, no_drv,\n+ \"unused=%(Module_str)s\")\n \n def show_status():\n '''Function called when the script is passed the \"--status\" option.\n", "prefixes": [ "v2" ] }{ "id": 48182, "url": "