Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/43794/?format=api
https://patches.dpdk.org/api/patches/43794/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20180820164421.28763-2-bluca@debian.org/", "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": "<20180820164421.28763-2-bluca@debian.org>", "list_archive_url": "https://inbox.dpdk.org/dev/20180820164421.28763-2-bluca@debian.org", "date": "2018-08-20T16:44:21", "name": "[v3,2/2] virtio: fix PCI config err handling", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "4615916014a781748cfecd7449e7b2ee239f8aef", "submitter": { "id": 823, "url": "https://patches.dpdk.org/api/people/823/?format=api", "name": "Luca Boccassi", "email": "bluca@debian.org" }, "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/20180820164421.28763-2-bluca@debian.org/mbox/", "series": [ { "id": 1022, "url": "https://patches.dpdk.org/api/series/1022/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=1022", "date": "2018-08-20T16:44:20", "name": "[v3,1/2] bus/pci: harmonize and document rte_pci_read_config return value", "version": 3, "mbox": "https://patches.dpdk.org/series/1022/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/43794/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/43794/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 0D0C74C90;\n\tMon, 20 Aug 2018 18:44:35 +0200 (CEST)", "from mail-wm0-f66.google.com (mail-wm0-f66.google.com\n\t[74.125.82.66]) by dpdk.org (Postfix) with ESMTP id 047704C72\n\tfor <dev@dpdk.org>; Mon, 20 Aug 2018 18:44:32 +0200 (CEST)", "by mail-wm0-f66.google.com with SMTP id i134-v6so7521174wmf.0\n\tfor <dev@dpdk.org>; Mon, 20 Aug 2018 09:44:32 -0700 (PDT)", "from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556])\n\tby smtp.gmail.com with ESMTPSA id\n\tq135-v6sm125557wmd.4.2018.08.20.09.44.30\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tMon, 20 Aug 2018 09:44:31 -0700 (PDT)" ], "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=tquBm/nu+71UUlE4McGkMI5f0hlcGYZ8F+lSdq1weO8=;\n\tb=gMxHOrV4/jnvJxABp0LCU95fWyMESVS3t6SDbKESP0zF/8xh6coxyjy0QCmo84MMrT\n\tF3KBmAZXFTDyYNgM4FF1kakeFqi85BtH8A7LaiAhQVUrnR2ifI5JHX7H9YG+ODvnHAQ/\n\tfrdbrFDbzr4zPLs8HReFMm96ByUrYfk6UXN0COANC+RItOaDBrg5rao4jOqoobJDclyL\n\tGg9JdtBfnBnHz+uqTMuMrNBKJkVJRjJKcTAIIXoeAXWx5RuQkQq6g5UEpDNyptNpGPbB\n\t31cicWwoJjw4OjtYDg4QyNsfJB8LWbF3mMWUyyPd/72FVZhKCIRw92/tJHxxwrOjhb8a\n\tnw2A==", "X-Gm-Message-State": "AOUpUlELOHaIlZSKspjdTroR/LXTRm2q1NPjypFoqoMzaCPrh//NI70N\n\tr3m/N5mZl+XFOgXQAFc/1NahIGjf", "X-Google-Smtp-Source": "AA+uWPxKUGUCAvQgIyWaJguLapmjMTP3iKAcsFEFTWm5v059VI3Eu4XHEV5qER/xGM5NTAk1n+TUdQ==", "X-Received": "by 2002:a1c:7908:: with SMTP id\n\tl8-v6mr16998767wme.80.1534783472303; \n\tMon, 20 Aug 2018 09:44:32 -0700 (PDT)", "From": "Luca Boccassi <bluca@debian.org>", "To": "dev@dpdk.org", "Cc": "maxime.coquelin@redhat.com, zhihong.wang@intel.com, tiwei.bie@intel.com, \n\tbruce.richardson@intel.com, brian.russell@intl.att.com", "Date": "Mon, 20 Aug 2018 17:44:21 +0100", "Message-Id": "<20180820164421.28763-2-bluca@debian.org>", "X-Mailer": "git-send-email 2.18.0", "In-Reply-To": "<20180820164421.28763-1-bluca@debian.org>", "References": "<20180816184750.30843-1-bluca@debian.org>\n\t<20180820164421.28763-1-bluca@debian.org>", "Subject": "[dpdk-dev] [PATCH v3 2/2] virtio: fix PCI config err handling", "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": "From: Brian Russell <brussell@brocade.com>\n\nIn virtio_read_caps and vtpci_msix_detect, rte_pci_read_config returns\nthe number of bytes read from PCI config or < 0 on error.\nIf less than the expected number of bytes are read then log the\nfailure and return rather than carrying on with garbage.\n\nFixes: 6ba1f63b5ab0 (\"virtio: support specification 1.0\")\n\nSigned-off-by: Brian Russell <brussell@brocade.com>\nSigned-off-by: Luca Boccassi <bluca@debian.org>\n---\nv2: handle additional rte_pci_read_config incomplete reads\nv3: do not handle rte_pci_read_config of virtio cap, added in v2,\n as it's less clear what the right thing to do there is\n\n drivers/net/virtio/virtio_pci.c | 24 ++++++++++++++----------\n 1 file changed, 14 insertions(+), 10 deletions(-)", "diff": "diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c\nindex 6bd22e54a6..e1df2c3b4d 100644\n--- a/drivers/net/virtio/virtio_pci.c\n+++ b/drivers/net/virtio/virtio_pci.c\n@@ -567,16 +567,18 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)\n \t}\n \n \tret = rte_pci_read_config(dev, &pos, 1, PCI_CAPABILITY_LIST);\n-\tif (ret < 0) {\n-\t\tPMD_INIT_LOG(DEBUG, \"failed to read pci capability list\");\n+\tif (ret != 1) {\n+\t\tPMD_INIT_LOG(DEBUG,\n+\t\t\t \"failed to read pci capability list, ret %d\", ret);\n \t\treturn -1;\n \t}\n \n \twhile (pos) {\n \t\tret = rte_pci_read_config(dev, &cap, sizeof(cap), pos);\n-\t\tif (ret < 0) {\n-\t\t\tPMD_INIT_LOG(ERR,\n-\t\t\t\t\"failed to read pci cap at pos: %x\", pos);\n+\t\tif (ret != sizeof(cap)) {\n+\t\t\tPMD_INIT_LOG(DEBUG,\n+\t\t\t\t \"failed to read pci cap at pos: %x ret %d\",\n+\t\t\t\t pos, ret);\n \t\t\tbreak;\n \t\t}\n \n@@ -693,16 +695,18 @@ vtpci_msix_detect(struct rte_pci_device *dev)\n \tint ret;\n \n \tret = rte_pci_read_config(dev, &pos, 1, PCI_CAPABILITY_LIST);\n-\tif (ret < 0) {\n-\t\tPMD_INIT_LOG(DEBUG, \"failed to read pci capability list\");\n+\tif (ret != 1) {\n+\t\tPMD_INIT_LOG(DEBUG,\n+\t\t\t \"failed to read pci capability list, ret %d\", ret);\n \t\treturn VIRTIO_MSIX_NONE;\n \t}\n \n \twhile (pos) {\n \t\tret = rte_pci_read_config(dev, &cap, sizeof(cap), pos);\n-\t\tif (ret < 0) {\n-\t\t\tPMD_INIT_LOG(ERR,\n-\t\t\t\t\"failed to read pci cap at pos: %x\", pos);\n+\t\tif (ret != sizeof(cap)) {\n+\t\t\tPMD_INIT_LOG(DEBUG,\n+\t\t\t\t \"failed to read pci cap at pos: %x ret %d\",\n+\t\t\t\t pos, ret);\n \t\t\tbreak;\n \t\t}\n \n", "prefixes": [ "v3", "2/2" ] }{ "id": 43794, "url": "