Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/42580/?format=api
http://patches.dpdk.org/api/patches/42580/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180709033706.27858-3-qi.z.zhang@intel.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": "<20180709033706.27858-3-qi.z.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20180709033706.27858-3-qi.z.zhang@intel.com", "date": "2018-07-09T03:36:49", "name": "[v10,02/19] bus/pci: fix PCI address compare", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "49bacde5446c2c8fce58c6d5afe6ea218040eb88", "submitter": { "id": 504, "url": "http://patches.dpdk.org/api/people/504/?format=api", "name": "Qi Zhang", "email": "qi.z.zhang@intel.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/20180709033706.27858-3-qi.z.zhang@intel.com/mbox/", "series": [ { "id": 467, "url": "http://patches.dpdk.org/api/series/467/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=467", "date": "2018-07-09T03:36:47", "name": "enable hotplug on multi-process", "version": 10, "mbox": "http://patches.dpdk.org/series/467/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/42580/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/42580/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 244C31B295;\n\tMon, 9 Jul 2018 05:36:50 +0200 (CEST)", "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n\tby dpdk.org (Postfix) with ESMTP id 9E7501B059;\n\tMon, 9 Jul 2018 05:36:39 +0200 (CEST)", "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t08 Jul 2018 20:36:37 -0700", "from dpdk51.sh.intel.com ([10.67.110.190])\n\tby fmsmga005.fm.intel.com with ESMTP; 08 Jul 2018 20:36:32 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.51,328,1526367600\"; d=\"scan'208\";a=\"243632702\"", "From": "Qi Zhang <qi.z.zhang@intel.com>", "To": "thomas@monjalon.net,\n\tanatoly.burakov@intel.com", "Cc": "konstantin.ananyev@intel.com, dev@dpdk.org, bruce.richardson@intel.com, \n\tferruh.yigit@intel.com, benjamin.h.shelton@intel.com,\n\tnarender.vangati@intel.com, Qi Zhang <qi.z.zhang@intel.com>,\n\tstable@dpdk.org", "Date": "Mon, 9 Jul 2018 11:36:49 +0800", "Message-Id": "<20180709033706.27858-3-qi.z.zhang@intel.com>", "X-Mailer": "git-send-email 2.13.6", "In-Reply-To": "<20180709033706.27858-1-qi.z.zhang@intel.com>", "References": "<20180607123849.14439-1-qi.z.zhang@intel.com>\n\t<20180709033706.27858-1-qi.z.zhang@intel.com>", "Subject": "[dpdk-dev] [PATCH v10 02/19] bus/pci: fix PCI address compare", "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": "When use memcmp to compare two PCI address, sizeof(struct rte_pci_addr)\nis 4 bytes aligned, and it is 8. While only 7 byte of struct rte_pci_addr\nis valid. So compare the 8th byte will cause the unexpected result, which\nhappens when repeatedly attach/detach a device.\n\nFixes: c752998b5e2e (\"pci: introduce library and driver\")\nCc: stable@dpdk.org\n\nSigned-off-by: Qi Zhang <qi.z.zhang@intel.com>\n---\n drivers/bus/pci/linux/pci_vfio.c | 13 ++++++++++++-\n 1 file changed, 12 insertions(+), 1 deletion(-)", "diff": "diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c\nindex aeeaa9ed8..dd25c3542 100644\n--- a/drivers/bus/pci/linux/pci_vfio.c\n+++ b/drivers/bus/pci/linux/pci_vfio.c\n@@ -43,6 +43,17 @@ static struct rte_tailq_elem rte_vfio_tailq = {\n };\n EAL_REGISTER_TAILQ(rte_vfio_tailq)\n \n+/* Compair two pci address */\n+static int pci_addr_cmp(struct rte_pci_addr *addr1, struct rte_pci_addr *addr2)\n+{\n+\tif (addr1->domain == addr2->domain &&\n+\t\taddr1->bus == addr2->bus &&\n+\t\taddr1->devid == addr2->devid &&\n+\t\taddr1->function == addr2->function)\n+\t\treturn 0;\n+\treturn 1;\n+}\n+\n int\n pci_vfio_read_config(const struct rte_intr_handle *intr_handle,\n \t\t void *buf, size_t len, off_t offs)\n@@ -642,7 +653,7 @@ pci_vfio_unmap_resource(struct rte_pci_device *dev)\n \tvfio_res_list = RTE_TAILQ_CAST(rte_vfio_tailq.head, mapped_pci_res_list);\n \t/* Get vfio_res */\n \tTAILQ_FOREACH(vfio_res, vfio_res_list, next) {\n-\t\tif (memcmp(&vfio_res->pci_addr, &dev->addr, sizeof(dev->addr)))\n+\t\tif (pci_addr_cmp(&vfio_res->pci_addr, &dev->addr))\n \t\t\tcontinue;\n \t\tbreak;\n \t}\n", "prefixes": [ "v10", "02/19" ] }{ "id": 42580, "url": "