Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/11643/?format=api
https://patches.dpdk.org/api/patches/11643/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1458634185-2526-1-git-send-email-mukawa@igel.co.jp/", "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": "<1458634185-2526-1-git-send-email-mukawa@igel.co.jp>", "list_archive_url": "https://inbox.dpdk.org/dev/1458634185-2526-1-git-send-email-mukawa@igel.co.jp", "date": "2016-03-22T08:09:45", "name": "[dpdk-dev] vhost PMD: Fix wrong handling of maximum value of rx/tx queues", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "3cea4c67e297fcd19a74d33e15802d889f7d306d", "submitter": { "id": 64, "url": "https://patches.dpdk.org/api/people/64/?format=api", "name": "Tetsuya Mukawa", "email": "mukawa@igel.co.jp" }, "delegate": { "id": 10, "url": "https://patches.dpdk.org/api/users/10/?format=api", "username": "bruce", "first_name": "Bruce", "last_name": "Richardson", "email": "bruce.richardson@intel.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1458634185-2526-1-git-send-email-mukawa@igel.co.jp/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/11643/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/11643/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 608412B93;\n\tTue, 22 Mar 2016 09:09:52 +0100 (CET)", "from mail-pf0-f170.google.com (mail-pf0-f170.google.com\n\t[209.85.192.170]) by dpdk.org (Postfix) with ESMTP id 139E72949\n\tfor <dev@dpdk.org>; Tue, 22 Mar 2016 09:09:51 +0100 (CET)", "by mail-pf0-f170.google.com with SMTP id x3so299708406pfb.1\n\tfor <dev@dpdk.org>; Tue, 22 Mar 2016 01:09:51 -0700 (PDT)", "from localhost.localdomain (napt.igel.co.jp. [219.106.231.132])\n\tby smtp.gmail.com with ESMTPSA id\n\tll7sm46107712pab.6.2016.03.22.01.09.48\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tTue, 22 Mar 2016 01:09:49 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=igel-co-jp.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id;\n\tbh=aGSibLF1VpGPAyXZOFN4nR6BzCtcxa2xSmdbQlNIiEA=;\n\tb=YE4wE6gIUhYKRypTjyVZ3/IhNKNJeHIw0yPIJI48bxLRoZhcE5+f+U+wMvyuluX80Q\n\tMsFJvjvauWGPfF/rZ/ziU5RbNFTmwARY+xOsxnO3gZDOZC5Y17u76/e3CLBGOavofvel\n\tFXcQi5qRpjknHGXtTvchXocOUGN4pW0dk9wIxuYuO2XTYkmFeKUYZKUVbxH2EUlSZgdO\n\ttirHv/MfBKYDapVH7UlXNQZkz0UvDOWjnqgc6brCBvb1arb0yPjk4VHpJGIZiTyIThzj\n\t8+QTR4MRYYFPJjlRDLd89Re7E3DSinuQSJkXn2dzrYNjkyrnbXdRpUwgiDrnaD2RNmlW\n\tA66w==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=aGSibLF1VpGPAyXZOFN4nR6BzCtcxa2xSmdbQlNIiEA=;\n\tb=eG79pgJtPTkTutJ50mE5AEvS9Z28tKwsXLvXxrgHQe7I+04pGsWvJfYhKhcM4w5pUp\n\toBtwzbXRQdK3GJeyfmB5e0Q1VDn2Fszj1Xywgs7ZbMjUlhHXSH4SSNHhBnMaPcejVVd0\n\t/zL5mACJYH6U0wFqMKacTQwwcPkmSIAc4ZUs8Bw9NmAFZAC0p/3u44xQ4zMKAdZ/RHJV\n\tYjSW3FmB5xyJ8ue7i284Dbq6AHKMx/bRLBDh3bfiKjthF96NgYSX6RgaKRHjg0sdPyVU\n\tnavihq57A49A4qdPin3IxyU80OWc4Hfz2frug+AosJ78QliFEjjfjJlo1jvni2kp4zCD\n\tx/pA==", "X-Gm-Message-State": "AD7BkJIZGaR3icFZzZ42DDq/Zw2Iwq6G0RCIbtrPZtsiowMG18pgdNkenqU4NtYWVOxfOw==", "X-Received": "by 10.98.89.7 with SMTP id n7mr50709922pfb.81.1458634190505;\n\tTue, 22 Mar 2016 01:09:50 -0700 (PDT)", "From": "Tetsuya Mukawa <mukawa@igel.co.jp>", "To": "dev@dpdk.org,\n\tciara.loftus@intel.com", "Cc": "ann.zhuangyanying@huawei.com, bruce.richardson@intel.com,\n\tyuanhan.liu@linux.intel.com, Tetsuya Mukawa <mukawa@igel.co.jp>", "Date": "Tue, 22 Mar 2016 17:09:45 +0900", "Message-Id": "<1458634185-2526-1-git-send-email-mukawa@igel.co.jp>", "X-Mailer": "git-send-email 2.1.4", "Subject": "[dpdk-dev] [PATCH] vhost PMD: Fix wrong handling of maximum value\n\tof rx/tx queues", "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": "Currently, the maximum value of rx/tx queueus are kept by EAL. But,\nthe value are used like below different meanings in vhost PMD.\n - The maximum value of current enabled queues.\n - The maximum value of current supported queues.\n\nThis wrong double meaning will cause an issue like below steps.\n\n* Invoke application with below option.\n --vdev 'eth_vhost0,iface=<socket path>,queues=4'\n* Configure queues like below.\n rte_eth_dev_configure(portid, 2, 2, ...);\n* Configure queues again like below.\n rte_eth_dev_configure(portid, 4, 4, ...);\n\nThe second rte_eth_dev_configure() will be failed because both\nthe maximum value of current enabled queues and supported queues\nwill be '2' after calling first rte_eth_dev_configure().\n\nTo fix the issue, the patch prepare one more variable to keep the\nnumber of maximum supported queues in vhost PMD.\n\nSigned-off-by: Tetsuya Mukawa <mukawa@igel.co.jp>\n---\n drivers/net/vhost/rte_eth_vhost.c | 14 ++++++++++++--\n 1 file changed, 12 insertions(+), 2 deletions(-)", "diff": "diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c\nindex 6b9d287..5fd8c70 100644\n--- a/drivers/net/vhost/rte_eth_vhost.c\n+++ b/drivers/net/vhost/rte_eth_vhost.c\n@@ -88,6 +88,7 @@ struct vhost_queue {\n struct pmd_internal {\n \tchar *dev_name;\n \tchar *iface_name;\n+\tuint16_t max_queues;\n \n \tvolatile uint16_t once;\n };\n@@ -555,11 +556,19 @@ static void\n eth_dev_info(struct rte_eth_dev *dev,\n \t struct rte_eth_dev_info *dev_info)\n {\n+\tstruct pmd_internal *internal;\n+\n+\tinternal = dev->data->dev_private;\n+\tif (internal == NULL) {\n+\t\tRTE_LOG(ERR, PMD, \"Invalid device specified\\n\");\n+\t\treturn;\n+\t}\n+\n \tdev_info->driver_name = drivername;\n \tdev_info->max_mac_addrs = 1;\n \tdev_info->max_rx_pktlen = (uint32_t)-1;\n-\tdev_info->max_rx_queues = dev->data->nb_rx_queues;\n-\tdev_info->max_tx_queues = dev->data->nb_tx_queues;\n+\tdev_info->max_rx_queues = internal->max_queues;\n+\tdev_info->max_tx_queues = internal->max_queues;\n \tdev_info->min_rx_bufsize = 0;\n }\n \n@@ -751,6 +760,7 @@ eth_dev_vhost_create(const char *name, char *iface_name, int16_t queues,\n \tmemmove(data->name, eth_dev->data->name, sizeof(data->name));\n \tdata->nb_rx_queues = queues;\n \tdata->nb_tx_queues = queues;\n+\tinternal->max_queues = queues;\n \tdata->dev_link = pmd_link;\n \tdata->mac_addrs = eth_addr;\n \n", "prefixes": [ "dpdk-dev" ] }{ "id": 11643, "url": "