Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/39413/?format=api
http://patches.dpdk.org/api/patches/39413/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1525675806-22387-1-git-send-email-jiayu.hu@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": "<1525675806-22387-1-git-send-email-jiayu.hu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1525675806-22387-1-git-send-email-jiayu.hu@intel.com", "date": "2018-05-07T06:50:06", "name": "[dpdk-dev] net/virtio-user: fix feature setting with vhost-net backend", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "db61ade67d78766a21e4b9e7e83646be98fe3cc1", "submitter": { "id": 539, "url": "http://patches.dpdk.org/api/people/539/?format=api", "name": "Hu, Jiayu", "email": "jiayu.hu@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1525675806-22387-1-git-send-email-jiayu.hu@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/39413/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/39413/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 F02532C72;\n\tMon, 7 May 2018 08:43:02 +0200 (CEST)", "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n\tby dpdk.org (Postfix) with ESMTP id 63F7023B\n\tfor <dev@dpdk.org>; Mon, 7 May 2018 08:43:01 +0200 (CEST)", "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t06 May 2018 23:42:58 -0700", "from dpdk15.sh.intel.com ([10.67.111.77])\n\tby fmsmga005.fm.intel.com with ESMTP; 06 May 2018 23:42:57 -0700" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.49,373,1520924400\"; d=\"scan'208\";a=\"226334524\"", "From": "Jiayu Hu <jiayu.hu@intel.com>", "To": "dev@dpdk.org", "Cc": "zhiyong.yang@intel.com, maxime.coquelin@redhat.com,\n\tJiayu Hu <jiayu.hu@intel.com>", "Date": "Mon, 7 May 2018 14:50:06 +0800", "Message-Id": "<1525675806-22387-1-git-send-email-jiayu.hu@intel.com>", "X-Mailer": "git-send-email 2.7.4", "Subject": "[dpdk-dev] [PATCH] net/virtio-user: fix feature setting with\n\tvhost-net backend", "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://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": "<https://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, when the backend is vhost-net, which implies\nvirtio-user works in client mode, virtio-user is assigned\nto the default feature VIRTIO_USER_SUPPORTED_FEATURES.\nHowever, virtio-user should request features from the\nbackend in this case.\n\nFixes: bd8f50a45d0f (\"net/virtio-user: support server mode\")\nSigned-off-by: Jiayu Hu <jiayu.hu@intel.com>\n---\n drivers/net/virtio/virtio_user/virtio_user_dev.c | 15 +++++++--------\n 1 file changed, 7 insertions(+), 8 deletions(-)", "diff": "diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c\nindex 38b8bc9..f745163 100644\n--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c\n+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c\n@@ -353,20 +353,22 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,\n \t\treturn -1;\n \t}\n \n-\tif (dev->vhostfd >= 0) {\n+\tif (!dev->is_server) {\n \t\tif (dev->ops->send_request(dev, VHOST_USER_SET_OWNER,\n-\t\t\t\t\t NULL) < 0) {\n+\t\t\t\t\tNULL) < 0) {\n \t\t\tPMD_INIT_LOG(ERR, \"set_owner fails: %s\",\n-\t\t\t\t strerror(errno));\n+\t\t\t\t\tstrerror(errno));\n \t\t\treturn -1;\n \t\t}\n \n \t\tif (dev->ops->send_request(dev, VHOST_USER_GET_FEATURES,\n-\t\t\t\t\t &dev->device_features) < 0) {\n+\t\t\t\t\t&dev->device_features) < 0) {\n \t\t\tPMD_INIT_LOG(ERR, \"get_features failed: %s\",\n-\t\t\t\t strerror(errno));\n+\t\t\t\t\tstrerror(errno));\n \t\t\treturn -1;\n \t\t}\n+\t\tif (dev->mac_specified)\n+\t\t\tdev->device_features |= (1ull << VIRTIO_NET_F_MAC);\n \t} else {\n \t\t/* We just pretend vhost-user can support all these features.\n \t\t * Note that this could be problematic that if some feature is\n@@ -376,9 +378,6 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,\n \t\tdev->device_features = VIRTIO_USER_SUPPORTED_FEATURES;\n \t}\n \n-\tif (dev->mac_specified)\n-\t\tdev->device_features |= (1ull << VIRTIO_NET_F_MAC);\n-\n \tif (cq) {\n \t\t/* device does not really need to know anything about CQ,\n \t\t * so if necessary, we just claim to support CQ\n", "prefixes": [ "dpdk-dev" ] }{ "id": 39413, "url": "