Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/13798/?format=api
https://patches.dpdk.org/api/patches/13798/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1465981637-38015-2-git-send-email-jianfeng.tan@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": "<1465981637-38015-2-git-send-email-jianfeng.tan@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1465981637-38015-2-git-send-email-jianfeng.tan@intel.com", "date": "2016-06-15T09:07:15", "name": "[dpdk-dev,v3,1/3] virtio-user: add mq in vhost user adapter", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "1b7d10116a10a5bccbb7aad82ff3fc17f7ad6827", "submitter": { "id": 313, "url": "https://patches.dpdk.org/api/people/313/?format=api", "name": "Jianfeng Tan", "email": "jianfeng.tan@intel.com" }, "delegate": { "id": 355, "url": "https://patches.dpdk.org/api/users/355/?format=api", "username": "yliu", "first_name": "Yuanhan", "last_name": "Liu", "email": "yuanhan.liu@linux.intel.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1465981637-38015-2-git-send-email-jianfeng.tan@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/13798/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/13798/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 7A2C2C3E6;\n\tWed, 15 Jun 2016 11:07:33 +0200 (CEST)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 28421C37C\n\tfor <dev@dpdk.org>; Wed, 15 Jun 2016 11:07:30 +0200 (CEST)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga102.fm.intel.com with ESMTP; 15 Jun 2016 02:07:29 -0700", "from dpdk06.sh.intel.com ([10.239.128.225])\n\tby FMSMGA003.fm.intel.com with ESMTP; 15 Jun 2016 02:07:29 -0700" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.26,475,1459839600\"; d=\"scan'208\";a=\"719348150\"", "From": "Jianfeng Tan <jianfeng.tan@intel.com>", "To": "dev@dpdk.org", "Cc": "Jianfeng Tan <jianfeng.tan@intel.com>, rich.lane@bigswitch.com,\n\tyuanhan.liu@linux.intel.com, mst@redhat.com,\n\tnakajima.yoshihiro@lab.ntt.co.jp, p.fedin@samsung.com,\n\tann.zhuangyanying@huawei.com, mukawa@igel.co.jp, nhorman@tuxdriver.com", "Date": "Wed, 15 Jun 2016 09:07:15 +0000", "Message-Id": "<1465981637-38015-2-git-send-email-jianfeng.tan@intel.com>", "X-Mailer": "git-send-email 2.1.4", "In-Reply-To": "<1465981637-38015-1-git-send-email-jianfeng.tan@intel.com>", "References": "<1462438781-139674-1-git-send-email-jianfeng.tan@intel.com>\n\t<1465981637-38015-1-git-send-email-jianfeng.tan@intel.com>", "Subject": "[dpdk-dev] [PATCH v3 1/3] virtio-user: add mq in vhost user adapter", "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": "This patch mainly adds method in vhost user adapter to communicate\nenable/disable queues messages with vhost user backend, aka,\nVHOST_USER_SET_VRING_ENABLE.\n\nSigned-off-by: Jianfeng Tan <jianfeng.tan@intel.com>\n---\n drivers/net/virtio/virtio_user/vhost.h | 5 +++++\n drivers/net/virtio/virtio_user/vhost_user.c | 22 ++++++++++++++++++++++\n 2 files changed, 27 insertions(+)", "diff": "diff --git a/drivers/net/virtio/virtio_user/vhost.h b/drivers/net/virtio/virtio_user/vhost.h\nindex 4e04ede..8d1e505 100644\n--- a/drivers/net/virtio/virtio_user/vhost.h\n+++ b/drivers/net/virtio/virtio_user/vhost.h\n@@ -136,6 +136,11 @@ struct vhost_user_msg {\n /* The version of the protocol we support */\n #define VHOST_USER_VERSION 0x1\n \n+#define VHOST_USER_F_PROTOCOL_FEATURES 30\n+#define VHOST_USER_MQ (1ULL << VHOST_USER_F_PROTOCOL_FEATURES)\n+\n int vhost_user_sock(int vhostfd, uint64_t req, void *arg);\n int vhost_user_setup(const char *path);\n+int vhost_user_enable_queue_pair(int vhostfd, unsigned pair_idx, int enable);\n+\n #endif\ndiff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c\nindex 47bbf74..98d98b6 100644\n--- a/drivers/net/virtio/virtio_user/vhost_user.c\n+++ b/drivers/net/virtio/virtio_user/vhost_user.c\n@@ -234,6 +234,7 @@ static const char * const vhost_msg_strings[] = {\n \t[VHOST_USER_SET_VRING_ADDR] = \"VHOST_USER_SET_VRING_ADDR\",\n \t[VHOST_USER_SET_VRING_KICK] = \"VHOST_USER_SET_VRING_KICK\",\n \t[VHOST_USER_SET_MEM_TABLE] = \"VHOST_USER_SET_MEM_TABLE\",\n+\t[VHOST_USER_SET_VRING_ENABLE] = \"VHOST_USER_SET_VRING_ENABLE\",\n \tNULL,\n };\n \n@@ -286,6 +287,7 @@ vhost_user_sock(int vhostfd, uint64_t req, void *arg)\n \n \tcase VHOST_USER_SET_VRING_NUM:\n \tcase VHOST_USER_SET_VRING_BASE:\n+\tcase VHOST_USER_SET_VRING_ENABLE:\n \t\tmemcpy(&msg.payload.state, arg, sizeof(msg.payload.state));\n \t\tmsg.size = sizeof(m.payload.state);\n \t\tbreak;\n@@ -402,3 +404,23 @@ vhost_user_setup(const char *path)\n \n \treturn fd;\n }\n+\n+int\n+vhost_user_enable_queue_pair(int vhostfd, unsigned pair_idx, int enable)\n+{\n+\tint i;\n+\n+\tfor (i = 0; i < 2; ++i) {\n+\t\tstruct vhost_vring_state state = {\n+\t\t\t.index = pair_idx * 2 + i,\n+\t\t\t.num = enable,\n+\t\t};\n+\n+\t\tif (vhost_user_sock(vhostfd,\n+\t\t\t\t VHOST_USER_SET_VRING_ENABLE, &state))\n+\t\t\treturn -1;\n+\t}\n+\n+\treturn 0;\n+\n+}\n", "prefixes": [ "dpdk-dev", "v3", "1/3" ] }{ "id": 13798, "url": "