Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/6745/?format=api
https://patches.dpdk.org/api/patches/6745/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1439366567-3402-10-git-send-email-changchun.ouyang@intel.com/", "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": "<1439366567-3402-10-git-send-email-changchun.ouyang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1439366567-3402-10-git-send-email-changchun.ouyang@intel.com", "date": "2015-08-12T08:02:44", "name": "[dpdk-dev,v4,09/12] virtio: resolve for control queue", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "7591d557eaca12359aa94df7994f368e8ec18410", "submitter": { "id": 31, "url": "https://patches.dpdk.org/api/people/31/?format=api", "name": "Ouyang Changchun", "email": "changchun.ouyang@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1439366567-3402-10-git-send-email-changchun.ouyang@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/6745/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/6745/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 E9E6B8DA8;\n\tWed, 12 Aug 2015 10:03:22 +0200 (CEST)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 7414F8DA6\n\tfor <dev@dpdk.org>; Wed, 12 Aug 2015 10:03:21 +0200 (CEST)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga103.jf.intel.com with ESMTP; 12 Aug 2015 01:03:20 -0700", "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga001.fm.intel.com with ESMTP; 12 Aug 2015 01:03:19 -0700", "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id t7C83HsU027095;\n\tWed, 12 Aug 2015 16:03:17 +0800", "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid t7C83FqY003689; Wed, 12 Aug 2015 16:03:17 +0800", "(from couyang@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t7C83FSs003685; \n\tWed, 12 Aug 2015 16:03:15 +0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.15,659,1432623600\"; d=\"scan'208\";a=\"767051261\"", "From": "Ouyang Changchun <changchun.ouyang@intel.com>", "To": "dev@dpdk.org", "Date": "Wed, 12 Aug 2015 16:02:44 +0800", "Message-Id": "<1439366567-3402-10-git-send-email-changchun.ouyang@intel.com>", "X-Mailer": "git-send-email 1.7.12.2", "In-Reply-To": "<1439366567-3402-1-git-send-email-changchun.ouyang@intel.com>", "References": "<1434355006-30583-1-git-send-email-changchun.ouyang@intel.com>\n\t<1439366567-3402-1-git-send-email-changchun.ouyang@intel.com>", "Subject": "[dpdk-dev] [PATCH v4 09/12] virtio: resolve for control queue", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <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": "Fix the max virtio queue pair read issue.\n\nControl queue can't work for vhost-user mulitple queue mode,\nso introduce a counter to void the dead loop when polling the control queue(removed in v4).\n\nSigned-off-by: Changchun Ouyang <changchun.ouyang@intel.com>\n---\nChanges in v4:\n - revert the workaround\n - fix the max virtio queue pair read issue\n\nChanges in v2:\n - fix checkpatch errors\n\n drivers/net/virtio/virtio_ethdev.c | 9 ++++-----\n 1 file changed, 4 insertions(+), 5 deletions(-)", "diff": "diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c\nindex 465d3cd..3ce11f8 100644\n--- a/drivers/net/virtio/virtio_ethdev.c\n+++ b/drivers/net/virtio/virtio_ethdev.c\n@@ -1162,7 +1162,6 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)\n \tstruct virtio_hw *hw = eth_dev->data->dev_private;\n \tstruct virtio_net_config *config;\n \tstruct virtio_net_config local_config;\n-\tuint32_t offset_conf = sizeof(config->mac);\n \tstruct rte_pci_device *pci_dev;\n \n \tRTE_BUILD_BUG_ON(RTE_PKTMBUF_HEADROOM < sizeof(struct virtio_net_hdr));\n@@ -1222,7 +1221,8 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)\n \t\tconfig = &local_config;\n \n \t\tif (vtpci_with_feature(hw, VIRTIO_NET_F_STATUS)) {\n-\t\t\toffset_conf += sizeof(config->status);\n+\t\t\tvtpci_read_dev_config(hw, offsetof(struct virtio_net_config, status),\n+\t\t\t\t(uint8_t *)&config->status, sizeof(config->status));\n \t\t} else {\n \t\t\tPMD_INIT_LOG(DEBUG,\n \t\t\t\t \"VIRTIO_NET_F_STATUS is not supported\");\n@@ -1230,15 +1230,14 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)\n \t\t}\n \n \t\tif (vtpci_with_feature(hw, VIRTIO_NET_F_MQ)) {\n-\t\t\toffset_conf += sizeof(config->max_virtqueue_pairs);\n+\t\t\tvtpci_read_dev_config(hw, offsetof(struct virtio_net_config, max_virtqueue_pairs),\n+\t\t\t\t(uint8_t *)&config->max_virtqueue_pairs, sizeof(config->max_virtqueue_pairs));\n \t\t} else {\n \t\t\tPMD_INIT_LOG(DEBUG,\n \t\t\t\t \"VIRTIO_NET_F_MQ is not supported\");\n \t\t\tconfig->max_virtqueue_pairs = 1;\n \t\t}\n \n-\t\tvtpci_read_dev_config(hw, 0, (uint8_t *)config, offset_conf);\n-\n \t\thw->max_rx_queues =\n \t\t\t(VIRTIO_MAX_RX_QUEUES < config->max_virtqueue_pairs) ?\n \t\t\tVIRTIO_MAX_RX_QUEUES : config->max_virtqueue_pairs;\n", "prefixes": [ "dpdk-dev", "v4", "09/12" ] }{ "id": 6745, "url": "