Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/123277/?format=api
https://patches.dpdk.org/api/patches/123277/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230207151747.245808-18-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": "<20230207151747.245808-18-maxime.coquelin@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20230207151747.245808-18-maxime.coquelin@redhat.com", "date": "2023-02-07T15:17:43", "name": "[v2,17/21] net/virtio-user: send shadow virtqueue info to the backend", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "174778ea982b7d45a0fa27daa33f813b448888fa", "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/20230207151747.245808-18-maxime.coquelin@redhat.com/mbox/", "series": [ { "id": 26854, "url": "https://patches.dpdk.org/api/series/26854/?format=api", "web_url": "https://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": "https://patches.dpdk.org/series/26854/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/123277/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/123277/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 9B92741C30;\n\tTue, 7 Feb 2023 16:18:46 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D392E42D40;\n\tTue, 7 Feb 2023 16:18:36 +0100 (CET)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by mails.dpdk.org (Postfix) with ESMTP id 168E342B8E\n for <dev@dpdk.org>; Tue, 7 Feb 2023 16:18:34 +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-391-VoEb-_nnMP6ndMkpUGi3gw-1; Tue, 07 Feb 2023 10:18:30 -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 E6EBE83BA84;\n Tue, 7 Feb 2023 15:18:21 +0000 (UTC)", "from max-t490s.redhat.com (unknown [10.39.208.26])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 99A94140EBF4;\n Tue, 7 Feb 2023 15:18:20 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1675783113;\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=V2ORGJhzMM4/8O34vafMu41uFyUws/4t/6dTRTkYtRU=;\n b=gh66fRNTHmCCpd3O8PLpvV724SmABLH/QEeE0g4nsJvjxYwWydk4ZUInXEitWFJOEE5OPP\n xTRM6Cs/Y5Hv2KpKNB//XN/HUnH8ZUo0tGZvGWvM5lQLKVW1U+y3ZXLfkvJqY0FsGbub5Z\n uBVhkPVx4PzVfK55W/jmzRvsfIF2DQE=", "X-MC-Unique": "VoEb-_nnMP6ndMkpUGi3gw-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 17/21] net/virtio-user: send shadow virtqueue info to the\n backend", "Date": "Tue, 7 Feb 2023 16:17:43 +0100", "Message-Id": "<20230207151747.245808-18-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 adds sending the shadow control queue info\nto the backend.\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\nReviewed-by: Chenbo Xia <chenbo.xia@intel.com>\n---\n .../net/virtio/virtio_user/virtio_user_dev.c | 28 ++++++++++++++++---\n 1 file changed, 24 insertions(+), 4 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 16a0e07413..1a5386a3f6 100644\n--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c\n+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c\n@@ -66,6 +66,18 @@ virtio_user_kick_queue(struct virtio_user_dev *dev, uint32_t queue_sel)\n \t\t.flags = 0, /* disable log */\n \t};\n \n+\tif (queue_sel == dev->max_queue_pairs * 2) {\n+\t\tif (!dev->scvq) {\n+\t\t\tPMD_INIT_LOG(ERR, \"(%s) Shadow control queue expected but missing\",\n+\t\t\t\t\tdev->path);\n+\t\t\tgoto err;\n+\t\t}\n+\n+\t\t/* Use shadow control queue information */\n+\t\tvring = &dev->scvq->vq_split.ring;\n+\t\tpq_vring = &dev->scvq->vq_packed.ring;\n+\t}\n+\n \tif (dev->features & (1ULL << VIRTIO_F_RING_PACKED)) {\n \t\taddr.desc_user_addr =\n \t\t\t(uint64_t)(uintptr_t)pq_vring->desc;\n@@ -118,9 +130,13 @@ static int\n virtio_user_queue_setup(struct virtio_user_dev *dev,\n \t\t\tint (*fn)(struct virtio_user_dev *, uint32_t))\n {\n-\tuint32_t i;\n+\tuint32_t i, nr_vq;\n \n-\tfor (i = 0; i < dev->max_queue_pairs * 2; ++i) {\n+\tnr_vq = dev->max_queue_pairs * 2;\n+\tif (dev->hw_cvq)\n+\t\tnr_vq++;\n+\n+\tfor (i = 0; i < nr_vq; i++) {\n \t\tif (fn(dev, i) < 0) {\n \t\t\tPMD_DRV_LOG(ERR, \"(%s) setup VQ %u failed\", dev->path, i);\n \t\t\treturn -1;\n@@ -381,11 +397,15 @@ virtio_user_dev_init_mac(struct virtio_user_dev *dev, const char *mac)\n static int\n virtio_user_dev_init_notify(struct virtio_user_dev *dev)\n {\n-\tuint32_t i, j;\n+\tuint32_t i, j, nr_vq;\n \tint callfd;\n \tint kickfd;\n \n-\tfor (i = 0; i < dev->max_queue_pairs * 2; i++) {\n+\tnr_vq = dev->max_queue_pairs * 2;\n+\tif (dev->hw_cvq)\n+\t\tnr_vq++;\n+\n+\tfor (i = 0; i < nr_vq; i++) {\n \t\t/* May use invalid flag, but some backend uses kickfd and\n \t\t * callfd as criteria to judge if dev is alive. so finally we\n \t\t * use real event_fd.\n", "prefixes": [ "v2", "17/21" ] }{ "id": 123277, "url": "