Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/123280/?format=api
http://patches.dpdk.org/api/patches/123280/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230207151747.245808-19-maxime.coquelin@redhat.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": "<20230207151747.245808-19-maxime.coquelin@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230207151747.245808-19-maxime.coquelin@redhat.com", "date": "2023-02-07T15:17:44", "name": "[v2,18/21] net/virtio-user: add new callback to enable control queue", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "7b5122d9a146115fc2c9dadbdad03480d6e24e53", "submitter": { "id": 512, "url": "http://patches.dpdk.org/api/people/512/?format=api", "name": "Maxime Coquelin", "email": "maxime.coquelin@redhat.com" }, "delegate": { "id": 2642, "url": "http://patches.dpdk.org/api/users/2642/?format=api", "username": "mcoquelin", "first_name": "Maxime", "last_name": "Coquelin", "email": "maxime.coquelin@redhat.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230207151747.245808-19-maxime.coquelin@redhat.com/mbox/", "series": [ { "id": 26854, "url": "http://patches.dpdk.org/api/series/26854/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=26854", "date": "2023-02-07T15:17:33", "name": "Add control queue & MQ support to Virtio-user vDPA", "version": 2, "mbox": "http://patches.dpdk.org/series/26854/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/123280/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/123280/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 82B3341C30;\n\tTue, 7 Feb 2023 16:19:09 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id CB71342D5F;\n\tTue, 7 Feb 2023 16:18:43 +0100 (CET)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by mails.dpdk.org (Postfix) with ESMTP id 1DCE242D5A\n for <dev@dpdk.org>; Tue, 7 Feb 2023 16:18:42 +0100 (CET)", "from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com\n [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n us-mta-414-SpwgUwG-NWiH2hvT0yBiIQ-1; Tue, 07 Feb 2023 10:18:40 -0500", "from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com\n [10.11.54.7])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8641D830F8F;\n Tue, 7 Feb 2023 15:18:23 +0000 (UTC)", "from max-t490s.redhat.com (unknown [10.39.208.26])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 396B4140EBF4;\n Tue, 7 Feb 2023 15:18:22 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1675783121;\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=95VqHw5coG81LL4lCLdZvhiAVX+gj8UYNIx9g2zWwXc=;\n b=WZALlum5qPZ3aAodRinJkwnqkuncxZHvc9ih0tUl+0pr1+1UKc9vyraIWnpScvyKjE1FLX\n StyG5u4zmlchueGJByEbeVKnfddEhMbaH0dmLCcyxiV9JvZYHqQYGPyrOg3qR1i1inXtg4\n Lj7gTjsq/L8KKE+hnj1hQV3GYxemWQs=", "X-MC-Unique": "SpwgUwG-NWiH2hvT0yBiIQ-1", "From": "Maxime Coquelin <maxime.coquelin@redhat.com>", "To": "dev@dpdk.org, chenbo.xia@intel.com, david.marchand@redhat.com,\n eperezma@redhat.com, stephen@networkplumber.org", "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>", "Subject": "[PATCH v2 18/21] net/virtio-user: add new callback to enable control\n queue", "Date": "Tue, 7 Feb 2023 16:17:44 +0100", "Message-Id": "<20230207151747.245808-19-maxime.coquelin@redhat.com>", "In-Reply-To": "<20230207151747.245808-1-maxime.coquelin@redhat.com>", "References": "<20230207151747.245808-1-maxime.coquelin@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.1 on 10.11.54.7", "X-Mimecast-Spam-Score": "0", "X-Mimecast-Originator": "redhat.com", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain; charset=\"US-ASCII\"; x-default=true", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "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" }, "content": "This patch introduces a new callback that is to be called\nwhen the backend supports control virtqueue.\n\nImplementation for Vhost-vDPA backend is added in this patch.\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\nReviewed-by: Chenbo Xia <chenbo.xia@intel.com>\n---\n drivers/net/virtio/virtio_user/vhost.h | 1 +\n drivers/net/virtio/virtio_user/vhost_vdpa.c | 15 +++++++++++++++\n drivers/net/virtio/virtio_user/virtio_user_dev.c | 3 +++\n 3 files changed, 19 insertions(+)", "diff": "diff --git a/drivers/net/virtio/virtio_user/vhost.h b/drivers/net/virtio/virtio_user/vhost.h\nindex dfbf6be033..f817cab77a 100644\n--- a/drivers/net/virtio/virtio_user/vhost.h\n+++ b/drivers/net/virtio/virtio_user/vhost.h\n@@ -82,6 +82,7 @@ struct virtio_user_backend_ops {\n \tint (*get_config)(struct virtio_user_dev *dev, uint8_t *data, uint32_t off, uint32_t len);\n \tint (*set_config)(struct virtio_user_dev *dev, const uint8_t *data, uint32_t off,\n \t\t\tuint32_t len);\n+\tint (*cvq_enable)(struct virtio_user_dev *dev, int enable);\n \tint (*enable_qp)(struct virtio_user_dev *dev, uint16_t pair_idx, int enable);\n \tint (*dma_map)(struct virtio_user_dev *dev, void *addr, uint64_t iova, size_t len);\n \tint (*dma_unmap)(struct virtio_user_dev *dev, void *addr, uint64_t iova, size_t len);\ndiff --git a/drivers/net/virtio/virtio_user/vhost_vdpa.c b/drivers/net/virtio/virtio_user/vhost_vdpa.c\nindex a0897f8dd1..3fd13d9fac 100644\n--- a/drivers/net/virtio/virtio_user/vhost_vdpa.c\n+++ b/drivers/net/virtio/virtio_user/vhost_vdpa.c\n@@ -564,6 +564,20 @@ vhost_vdpa_destroy(struct virtio_user_dev *dev)\n \treturn 0;\n }\n \n+static int\n+vhost_vdpa_cvq_enable(struct virtio_user_dev *dev, int enable)\n+{\n+\tstruct vhost_vring_state state = {\n+\t\t.index = dev->max_queue_pairs * 2,\n+\t\t.num = enable,\n+\t};\n+\n+\tif (vhost_vdpa_set_vring_enable(dev, &state))\n+\t\treturn -1;\n+\n+\treturn 0;\n+}\n+\n static int\n vhost_vdpa_enable_queue_pair(struct virtio_user_dev *dev,\n \t\t\t uint16_t pair_idx,\n@@ -629,6 +643,7 @@ struct virtio_user_backend_ops virtio_ops_vdpa = {\n \t.set_status = vhost_vdpa_set_status,\n \t.get_config = vhost_vdpa_get_config,\n \t.set_config = vhost_vdpa_set_config,\n+\t.cvq_enable = vhost_vdpa_cvq_enable,\n \t.enable_qp = vhost_vdpa_enable_queue_pair,\n \t.dma_map = vhost_vdpa_dma_map_batch,\n \t.dma_unmap = vhost_vdpa_dma_unmap_batch,\ndiff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c\nindex 1a5386a3f6..b0d603ee12 100644\n--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c\n+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c\n@@ -767,6 +767,9 @@ virtio_user_handle_mq(struct virtio_user_dev *dev, uint16_t q_pairs)\n \tfor (i = q_pairs; i < dev->max_queue_pairs; ++i)\n \t\tret |= dev->ops->enable_qp(dev, i, 0);\n \n+\tif (dev->scvq)\n+\t\tret |= dev->ops->cvq_enable(dev, 1);\n+\n \tdev->queue_pairs = q_pairs;\n \n \treturn ret;\n", "prefixes": [ "v2", "18/21" ] }{ "id": 123280, "url": "