Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/78846/?format=api
https://patches.dpdk.org/api/patches/78846/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200925123113.68916-7-maxime.coquelin@redhat.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": "<20200925123113.68916-7-maxime.coquelin@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20200925123113.68916-7-maxime.coquelin@redhat.com", "date": "2020-09-25T12:31:11", "name": "[v2,6/8] net/virtio: adapt Virtio-user status size", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "f615896187940dbd181ee4fb7908c024526c9674", "submitter": { "id": 512, "url": "https://patches.dpdk.org/api/people/512/?format=api", "name": "Maxime Coquelin", "email": "maxime.coquelin@redhat.com" }, "delegate": { "id": 2642, "url": "https://patches.dpdk.org/api/users/2642/?format=api", "username": "mcoquelin", "first_name": "Maxime", "last_name": "Coquelin", "email": "maxime.coquelin@redhat.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20200925123113.68916-7-maxime.coquelin@redhat.com/mbox/", "series": [ { "id": 12512, "url": "https://patches.dpdk.org/api/series/12512/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=12512", "date": "2020-09-25T12:31:05", "name": "virtio-user: introduce vhost-vdpa backend", "version": 2, "mbox": "https://patches.dpdk.org/series/12512/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/78846/comments/", "check": "warning", "checks": "https://patches.dpdk.org/api/patches/78846/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 3E3AAA04C0;\n\tFri, 25 Sep 2020 14:32:42 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 637081E97D;\n\tFri, 25 Sep 2020 14:31:52 +0200 (CEST)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [63.128.21.124])\n by dpdk.org (Postfix) with ESMTP id 817CB1E976\n for <dev@dpdk.org>; Fri, 25 Sep 2020 14:31:51 +0200 (CEST)", "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-336-71u7tfSIP5eVcBwA8OK-KQ-1; Fri, 25 Sep 2020 08:31:48 -0400", "from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com\n [10.5.11.11])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BE5091882FB3;\n Fri, 25 Sep 2020 12:31:47 +0000 (UTC)", "from localhost.localdomain (unknown [10.36.110.9])\n by smtp.corp.redhat.com (Postfix) with ESMTP id CE20B78830;\n Fri, 25 Sep 2020 12:31:41 +0000 (UTC)" ], "Dkim-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1601037110;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=oBlCL84kPS+4wRwE/vpU53MkLN38AOguLXyiD5rF/fk=;\n b=OjqoqztJxlwjBsnQ38rO44SljkAKTmA7AZPpCSSYOptK4q8hhatkqj2ojZ9Rp0B6P9hArH\n 5vi0fNHusjX/il+WvtLuL8FnhOVoI/Vf+6WsAB5bahA1IDEzjZpFAgdPOpK6iXmRUNZwUJ\n /+24nfhQqgbyaBEL+sXb78bh8+GEJ6k=", "X-MC-Unique": "71u7tfSIP5eVcBwA8OK-KQ-1", "From": "Maxime Coquelin <maxime.coquelin@redhat.com>", "To": "dev@dpdk.org, chenbo.xia@intel.com, patrick.fu@intel.com,\n amorenoz@redhat.com", "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>", "Date": "Fri, 25 Sep 2020 14:31:11 +0200", "Message-Id": "<20200925123113.68916-7-maxime.coquelin@redhat.com>", "In-Reply-To": "<20200925123113.68916-1-maxime.coquelin@redhat.com>", "References": "<20200925123113.68916-1-maxime.coquelin@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.11", "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com", "X-Mimecast-Spam-Score": "0", "X-Mimecast-Originator": "redhat.com", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain; charset=\"US-ASCII\"", "Subject": "[dpdk-dev] [PATCH v2 6/8] net/virtio: adapt Virtio-user status size", "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://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "Set proper payload size for set/get status message. The payload\nsize varies according to backend types.\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\nSigned-off-by: Patrick Fu <patrick.fu@intel.com>\n---\n .../net/virtio/virtio_user/virtio_user_dev.c | 34 +++++++++++++------\n 1 file changed, 23 insertions(+), 11 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 0128a5fefb..5988bc92fe 100644\n--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c\n+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c\n@@ -784,11 +784,15 @@ virtio_user_send_status_update(struct virtio_user_dev *dev, uint8_t status)\n \tint ret;\n \tuint64_t arg = status;\n \n-\t/* Vhost-user only for now */\n-\tif (dev->backend_type != VIRTIO_USER_BACKEND_VHOST_USER)\n+\tif (dev->backend_type == VIRTIO_USER_BACKEND_VHOST_USER)\n+\t\tret = dev->ops->send_request(dev,\n+\t\t\t\tVHOST_USER_SET_STATUS, &arg);\n+\telse if (dev->backend_type == VIRTIO_USER_BACKEND_VHOST_VDPA)\n+\t\tret = dev->ops->send_request(dev,\n+\t\t\t\tVHOST_USER_SET_STATUS, &status);\n+\telse\n \t\treturn 0;\n \n-\tret = dev->ops->send_request(dev, VHOST_USER_SET_STATUS, &arg);\n \tif (ret) {\n \t\tPMD_INIT_LOG(ERR, \"VHOST_USER_SET_STATUS failed (%d): %s\", ret,\n \t\t\t strerror(errno));\n@@ -802,24 +806,32 @@ int\n virtio_user_update_status(struct virtio_user_dev *dev)\n {\n \tuint64_t ret;\n+\tuint8_t status;\n \tint err;\n \n-\t/* Vhost-user only for now */\n-\tif (dev->backend_type != VIRTIO_USER_BACKEND_VHOST_USER)\n+\tif (dev->backend_type == VIRTIO_USER_BACKEND_VHOST_USER) {\n+\t\terr = dev->ops->send_request(dev, VHOST_USER_GET_STATUS, &ret);\n+\t\tif (!err && ret > UINT8_MAX) {\n+\t\t\tPMD_INIT_LOG(ERR, \"Invalid VHOST_USER_GET_STATUS \"\n+\t\t\t\t\t\"response 0x%\" PRIx64 \"\\n\", ret);\n+\t\t\treturn -1;\n+\t\t}\n+\n+\t\tstatus = ret;\n+\t} else if (dev->backend_type == VIRTIO_USER_BACKEND_VHOST_VDPA) {\n+\t\terr = dev->ops->send_request(dev, VHOST_USER_GET_STATUS,\n+\t\t\t\t&status);\n+\t} else {\n \t\treturn 0;\n+\t}\n \n-\terr = dev->ops->send_request(dev, VHOST_USER_GET_STATUS, &ret);\n \tif (err) {\n \t\tPMD_INIT_LOG(ERR, \"VHOST_USER_GET_STATUS failed (%d): %s\", err,\n \t\t\t strerror(errno));\n \t\treturn -1;\n \t}\n-\tif (ret > UINT8_MAX) {\n-\t\tPMD_INIT_LOG(ERR, \"Invalid VHOST_USER_GET_STATUS response 0x%\" PRIx64 \"\\n\", ret);\n-\t\treturn -1;\n-\t}\n \n-\tdev->status = ret;\n+\tdev->status = status;\n \tPMD_INIT_LOG(DEBUG, \"Updated Device Status(0x%08x):\\n\"\n \t\t\t\"\\t-RESET: %u\\n\"\n \t\t\t\"\\t-ACKNOWLEDGE: %u\\n\"\n", "prefixes": [ "v2", "6/8" ] }{ "id": 78846, "url": "