get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 118518,
    "url": "http://patches.dpdk.org/api/patches/118518/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1666168884-104665-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": "<1666168884-104665-6-git-send-email-andy.pei@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1666168884-104665-6-git-send-email-andy.pei@intel.com",
    "date": "2022-10-19T08:41:17",
    "name": "[v9,05/12] vdpa/ifc: only configure enabled queue",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "63fbf8ebca131393e4dd2478c11e7ac08fe730c1",
    "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/1666168884-104665-6-git-send-email-andy.pei@intel.com/mbox/",
    "series": [
        {
            "id": 25297,
            "url": "http://patches.dpdk.org/api/series/25297/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=25297",
            "date": "2022-10-19T08:41:12",
            "name": "vdpa/ifc: add multi queue support",
            "version": 9,
            "mbox": "http://patches.dpdk.org/series/25297/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/118518/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/118518/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 AC34AA0581;\n\tWed, 19 Oct 2022 11:32:19 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 936E64284D;\n\tWed, 19 Oct 2022 11:31:57 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by mails.dpdk.org (Postfix) with ESMTP id AAD0942829\n for <dev@dpdk.org>; Wed, 19 Oct 2022 11:31:53 +0200 (CEST)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 19 Oct 2022 02:31:49 -0700",
            "from dpdk-dipei.sh.intel.com ([10.67.110.251])\n by fmsmga001.fm.intel.com with ESMTP; 19 Oct 2022 02:31:47 -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=1666171913; x=1697707913;\n h=from:to:cc:subject:date:message-id:in-reply-to: references;\n bh=u6gMBbApdXSB3Ld3Jjg3QEGS4spcCcxNroeYHYyn54Q=;\n b=d2vz9v7HZgrazralYI2bI0sxvXPOboE7LXP8lc0CZU1EWnKT9SmJwbC9\n dFUbrvrOOeA1TTxfcOcHLEMNkTaRnZ5hKnLXfmcPJAHcstFcDkq5oURwj\n H/w/R065hWBWxOY8aVsxUllVqGW34rRHe/24V5OwixAehwq5mheAfLi7X\n n2zK+ZZ1NQdn184uaqR2kSqQdzBLlTWSEWzpsAY0Z6UgxyFRzi8baTsrr\n GWfebF3tKOPS7MR+uUBKOZ6XnR8Be3e0sip7VJ6k32LP8qO2Spf4r96OI\n w5L28cVdeaAq3KH4AfQinTromJOGhZn35gG8Ai0AZs2ldwm1ABlQlcff9 g==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10504\"; a=\"303976930\"",
            "E=Sophos;i=\"5.95,195,1661842800\"; d=\"scan'208\";a=\"303976930\"",
            "E=McAfee;i=\"6500,9779,10504\"; a=\"771690918\"",
            "E=Sophos;i=\"5.95,195,1661842800\"; d=\"scan'208\";a=\"771690918\""
        ],
        "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 v9 05/12] vdpa/ifc: only configure enabled queue",
        "Date": "Wed, 19 Oct 2022 16:41:17 +0800",
        "Message-Id": "<1666168884-104665-6-git-send-email-andy.pei@intel.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1666168884-104665-1-git-send-email-andy.pei@intel.com>",
        "References": "<1661229305-240952-2-git-send-email-andy.pei@intel.com>\n <1666168884-104665-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 configuring the hardware queue, we only configure queues which\nhave been enabled by vhost.\n\nSigned-off-by: Andy Pei <andy.pei@intel.com>\nSigned-off-by: Huang Wei <wei.huang@intel.com>\nReviewed-by: Chenbo Xia <chenbo.xia@intel.com>\n---\n drivers/vdpa/ifc/base/ifcvf.c |  3 +++\n drivers/vdpa/ifc/ifcvf_vdpa.c | 16 ++++++++++++++--\n 2 files changed, 17 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/vdpa/ifc/base/ifcvf.c b/drivers/vdpa/ifc/base/ifcvf.c\nindex b377126..30bb8cb 100644\n--- a/drivers/vdpa/ifc/base/ifcvf.c\n+++ b/drivers/vdpa/ifc/base/ifcvf.c\n@@ -252,6 +252,9 @@\n \n \tifcvf_enable_mq(hw);\n \tfor (i = 0; i < hw->nr_vring; i++) {\n+\t\tif (!hw->vring[i].enable)\n+\t\t\tcontinue;\n+\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);\ndiff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c\nindex 5a24204..0c3407a 100644\n--- a/drivers/vdpa/ifc/ifcvf_vdpa.c\n+++ b/drivers/vdpa/ifc/ifcvf_vdpa.c\n@@ -284,6 +284,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@@ -499,6 +501,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@@ -1058,6 +1062,8 @@ struct rte_vdpa_dev_info {\n \tstruct rte_vdpa_device *vdev;\n \tstruct internal_list *list;\n \tstruct ifcvf_internal *internal;\n+\tstruct ifcvf_hw *hw;\n+\tuint16_t i;\n \n \tvdev = rte_vhost_get_vdpa_device(vid);\n \tlist = find_internal_resource_by_vdev(vdev);\n@@ -1071,11 +1077,17 @@ struct rte_vdpa_dev_info {\n \trte_atomic32_set(&internal->dev_attached, 1);\n \tupdate_datapath(internal);\n \n-\tif (rte_vhost_host_notifier_ctrl(vid, RTE_VHOST_QUEUE_ALL, true) != 0)\n-\t\tDRV_LOG(NOTICE, \"vDPA (%s): software relay is used.\",\n+\thw = &internal->hw;\n+\tfor (i = 0; i < hw->nr_vring; i++) {\n+\t\tif (!hw->vring[i].enable)\n+\t\t\tcontinue;\n+\t\tif (rte_vhost_host_notifier_ctrl(vid, i, true) != 0)\n+\t\t\tDRV_LOG(NOTICE, \"vDPA (%s): software relay is used.\",\n \t\t\t\tvdev->device->name);\n+\t}\n \n \tinternal->configured = 1;\n+\tDRV_LOG(INFO, \"vDPA device %s is configured\", vdev->device->name);\n \treturn 0;\n }\n \n",
    "prefixes": [
        "v9",
        "05/12"
    ]
}