get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/115345/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 115345,
    "url": "http://patches.dpdk.org/api/patches/115345/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1661229305-240952-6-git-send-email-andy.pei@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": "<1661229305-240952-6-git-send-email-andy.pei@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1661229305-240952-6-git-send-email-andy.pei@intel.com",
    "date": "2022-08-23T04:35:02",
    "name": "[5/8] vdpa/ifc: only configure enabled queue",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "073e112690cba13780ec81fb5918d721b64ee1e4",
    "submitter": {
        "id": 1185,
        "url": "http://patches.dpdk.org/api/people/1185/?format=api",
        "name": "Pei, Andy",
        "email": "andy.pei@intel.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/1661229305-240952-6-git-send-email-andy.pei@intel.com/mbox/",
    "series": [
        {
            "id": 24387,
            "url": "http://patches.dpdk.org/api/series/24387/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=24387",
            "date": "2022-08-23T04:34:57",
            "name": "add multi queue support to vDPA ifc driver",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/24387/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/115345/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/115345/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 1C265A0093;\n\tTue, 23 Aug 2022 07:25:13 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 1186B427F5;\n\tTue, 23 Aug 2022 07:24:57 +0200 (CEST)",
            "from mga06.intel.com (mga06b.intel.com [134.134.136.31])\n by mails.dpdk.org (Postfix) with ESMTP id 4084442829\n for <dev@dpdk.org>; Tue, 23 Aug 2022 07:24:55 +0200 (CEST)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 22 Aug 2022 22:24:54 -0700",
            "from dpdk-dipei.sh.intel.com ([10.67.110.251])\n by fmsmga008.fm.intel.com with ESMTP; 22 Aug 2022 22:24:53 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1661232295; x=1692768295;\n h=from:to:cc:subject:date:message-id:in-reply-to: references;\n bh=Sc/sPWJi9OSN3YevCIG004RgnfnYrh6TbhSvcoAVYVI=;\n b=SetI3LK+6kfIckSmBTag4vg33/f1z+M7HA7kQ0pbLklyI/R6UjnID2MF\n jjkbAwC4RDfvksaWAjoSJf0DCDH14MlCbl8nSYE447h8e87oRM6gKACkv\n EBlyNU+SoOwyr8UvwebqMUWAgtZXoCzXMNLiBMsERa+/DCK6aKhAA68ll\n Clztl6rUPBvN3OrCKNAptnoxGB0Cx1wYyQwpUic+FcTPPrPv+5xN6RWeL\n WWPa2niCrIWVqrwrOKLNzXVtVYJlgWuBjCr5A4rM0zFqqxDnP5Iq7kUEF\n lIgTsb27N543ZVtQ3rYJ5ITwZqndOA5ULa9nNwyiRzqftdFWfbCnQug19 Q==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10447\"; a=\"355325316\"",
            "E=Sophos;i=\"5.93,256,1654585200\"; d=\"scan'208\";a=\"355325316\"",
            "E=Sophos;i=\"5.93,256,1654585200\"; d=\"scan'208\";a=\"669864760\""
        ],
        "X-ExtLoop1": "1",
        "From": "Andy Pei <andy.pei@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "chenbo.xia@intel.com, rosen.xu@intel.com, wei.huang@intel.com,\n gang.cao@intel.com, maxime.coquelin@redhat.com",
        "Subject": "[PATCH 5/8] vdpa/ifc: only configure enabled queue",
        "Date": "Tue, 23 Aug 2022 12:35:02 +0800",
        "Message-Id": "<1661229305-240952-6-git-send-email-andy.pei@intel.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1661229305-240952-1-git-send-email-andy.pei@intel.com>",
        "References": "<1661229305-240952-1-git-send-email-andy.pei@intel.com>",
        "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": "when configure the hardware queue, we only configure queues which\nhave been enabled by vhost.\n\nSigned-off-by: Andy Pei <andy.pei@intel.com>\n---\n drivers/vdpa/ifc/base/ifcvf.c | 5 ++++-\n drivers/vdpa/ifc/ifcvf_vdpa.c | 4 ++++\n 2 files changed, 8 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/drivers/vdpa/ifc/base/ifcvf.c b/drivers/vdpa/ifc/base/ifcvf.c\nindex 1b50df6..ca5f677 100644\n--- a/drivers/vdpa/ifc/base/ifcvf.c\n+++ b/drivers/vdpa/ifc/base/ifcvf.c\n@@ -230,6 +230,8 @@\n \n \tifcvf_enable_multiqueue(hw, hw->nr_vring);\n \tfor (i = 0; i < hw->nr_vring; i++) {\n+\t\tif (!hw->vring[i].enable)\n+\t\t\tcontinue;\n \t\tIFCVF_WRITE_REG16(i, &cfg->queue_select);\n \t\tio_write64_twopart(hw->vring[i].desc, &cfg->queue_desc_lo,\n \t\t\t\t&cfg->queue_desc_hi);\n@@ -264,7 +266,8 @@\n \t\tnotify_off = IFCVF_READ_REG16(&cfg->queue_notify_off);\n \t\thw->notify_addr[i] = (void *)((u8 *)hw->notify_base +\n \t\t\t\tnotify_off * hw->notify_off_multiplier);\n-\t\tIFCVF_WRITE_REG16(1, &cfg->queue_enable);\n+\t\tif (hw->vring[i].enable)\n+\t\t\tIFCVF_WRITE_REG16(1, &cfg->queue_enable);\n \t}\n \n \treturn 0;\ndiff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c\nindex 34aea6c..a62bcec 100644\n--- a/drivers/vdpa/ifc/ifcvf_vdpa.c\n+++ b/drivers/vdpa/ifc/ifcvf_vdpa.c\n@@ -290,6 +290,8 @@ struct rte_vdpa_dev_info {\n \trte_vhost_get_negotiated_features(vid, &hw->req_features);\n \n \tfor (i = 0; i < nr_vring; i++) {\n+\t\tif (!hw->vring[i].enable)\n+\t\t\tcontinue;\n \t\trte_vhost_get_vhost_vring(vid, i, &vq);\n \t\tgpa = hva_to_gpa(vid, (uint64_t)(uintptr_t)vq.desc);\n \t\tif (gpa == 0) {\n@@ -505,6 +507,8 @@ struct rte_vdpa_dev_info {\n \n \tvring.kickfd = -1;\n \tfor (qid = 0; qid < q_num; qid++) {\n+\t\tif (!hw->vring[qid].enable)\n+\t\t\tcontinue;\n \t\tev.events = EPOLLIN | EPOLLPRI;\n \t\trte_vhost_get_vhost_vring(internal->vid, qid, &vring);\n \t\tev.data.u64 = qid | (uint64_t)vring.kickfd << 32;\n",
    "prefixes": [
        "5/8"
    ]
}