Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/23796/?format=api
http://patches.dpdk.org/api/patches/23796/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1492741689-40422-1-git-send-email-jianfeng.tan@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": "<1492741689-40422-1-git-send-email-jianfeng.tan@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1492741689-40422-1-git-send-email-jianfeng.tan@intel.com", "date": "2017-04-21T02:28:09", "name": "[dpdk-dev] net/virtio-user: fix recognize physical devices", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "462457491d194071438e1918fc5e8ad400dba05b", "submitter": { "id": 313, "url": "http://patches.dpdk.org/api/people/313/?format=api", "name": "Jianfeng Tan", "email": "jianfeng.tan@intel.com" }, "delegate": { "id": 355, "url": "http://patches.dpdk.org/api/users/355/?format=api", "username": "yliu", "first_name": "Yuanhan", "last_name": "Liu", "email": "yuanhan.liu@linux.intel.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1492741689-40422-1-git-send-email-jianfeng.tan@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/23796/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/23796/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id EF09A377A;\n\tFri, 21 Apr 2017 04:27:24 +0200 (CEST)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 612AA2C72\n\tfor <dev@dpdk.org>; Fri, 21 Apr 2017 04:27:23 +0200 (CEST)", "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t20 Apr 2017 19:27:22 -0700", "from dpdk06.sh.intel.com ([10.239.129.195])\n\tby orsmga002.jf.intel.com with ESMTP; 20 Apr 2017 19:27:21 -0700" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.37,228,1488873600\"; d=\"scan'208\";a=\"77037903\"", "From": "Jianfeng Tan <jianfeng.tan@intel.com>", "To": "dev@dpdk.org", "Cc": "yuanhan.liu@linux.intel.com,\n\tJianfeng Tan <jianfeng.tan@intel.com>", "Date": "Fri, 21 Apr 2017 02:28:09 +0000", "Message-Id": "<1492741689-40422-1-git-send-email-jianfeng.tan@intel.com>", "X-Mailer": "git-send-email 2.7.4", "Subject": "[dpdk-dev] [PATCH] net/virtio-user: fix recognize physical devices", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Segfault happens when using virtio-user after commit 7f0a669e7b04\n(\"ethdev: add allocation helper for virtual drivers\").\n\nIt's due to we use ethdev->device to recognize physical devices,\nbut after above commit, this field is also filled for virtual\ndevices. Then we obtain the wrong pci_dev pointer and accessing\nits field when copying pci info results in segfault.\n\nTo fix it, we use hw->virtio_user_dev to differentiate physical\ndevices from virtual devices.\n\nFixes: 6a7c0dfcdf40 (\"net/virtio: do not depend on PCI device of ethdev\")\n\nSigned-off-by: Jianfeng Tan <jianfeng.tan@intel.com>\n---\n drivers/net/virtio/virtio_ethdev.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)", "diff": "diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c\nindex e6c57b3..3d712bd 100644\n--- a/drivers/net/virtio/virtio_ethdev.c\n+++ b/drivers/net/virtio/virtio_ethdev.c\n@@ -1348,7 +1348,7 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)\n \tif (virtio_negotiate_features(hw, req_features) < 0)\n \t\treturn -1;\n \n-\tif (eth_dev->device) {\n+\tif (!hw->virtio_user_dev) {\n \t\tpci_dev = RTE_DEV_TO_PCI(eth_dev->device);\n \t\trte_eth_copy_pci_info(eth_dev, pci_dev);\n \t}\n", "prefixes": [ "dpdk-dev" ] }{ "id": 23796, "url": "