get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 113225,
    "url": "https://patches.dpdk.org/api/patches/113225/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1655884028-193120-1-git-send-email-andy.pei@intel.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": "<1655884028-193120-1-git-send-email-andy.pei@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1655884028-193120-1-git-send-email-andy.pei@intel.com",
    "date": "2022-06-22T07:47:08",
    "name": "vhost: fix virtio blk vDPA live migration IO drop",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "f37614a602289835053bf84839496f97cf36ffee",
    "submitter": {
        "id": 1185,
        "url": "https://patches.dpdk.org/api/people/1185/?format=api",
        "name": "Pei, Andy",
        "email": "andy.pei@intel.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/1655884028-193120-1-git-send-email-andy.pei@intel.com/mbox/",
    "series": [
        {
            "id": 23682,
            "url": "https://patches.dpdk.org/api/series/23682/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=23682",
            "date": "2022-06-22T07:47:08",
            "name": "vhost: fix virtio blk vDPA live migration IO drop",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/23682/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/113225/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/113225/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 79B5BA04FD;\n\tWed, 22 Jun 2022 10:37:52 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6A4784069C;\n\tWed, 22 Jun 2022 10:37:52 +0200 (CEST)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by mails.dpdk.org (Postfix) with ESMTP id 5C13040689\n for <dev@dpdk.org>; Wed, 22 Jun 2022 10:37:50 +0200 (CEST)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 22 Jun 2022 01:37:49 -0700",
            "from dpdk-dipei.sh.intel.com ([10.67.110.238])\n by fmsmga008.fm.intel.com with ESMTP; 22 Jun 2022 01:37: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=1655887070; x=1687423070;\n h=from:to:cc:subject:date:message-id;\n bh=4oGz6pL28sjG81y25LSevwuIlrmYU2BYzSpG8eHrsq8=;\n b=FfJZhh5c/LKg13lvviimTetIbiyBq+SO0zosM0kaCk6uMY87HhxL3Y86\n PX4w9HaX11TddROJBgHKRoKlRUQQXWDh7xoiOtOVPdKHOV2p8DEnb4VI1\n +te9oLoqD54mBgEGaUSqnoUwqTXH6RDRdy/QmnDFUXxtU0AiXz0WkcWht\n QiFlTl99dFHokLHATbsZGLUCc9d7F0WIRZYKO9NiDWEqsHgSOAyrEiCgN\n NvQzxajjO+QCDQlTvAKLNTRk07PwD5nf3dx5yMhn2fmaA1TjdzlDZXO1f\n fqQxwSvQqBcoWSPY0S3E6bVgtLn5LpZZ6hMNCtWY+urY2/bjB8jf1DkVY w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6400,9594,10385\"; a=\"260177248\"",
            "E=Sophos;i=\"5.92,212,1650956400\"; d=\"scan'208\";a=\"260177248\"",
            "E=Sophos;i=\"5.92,212,1650956400\"; d=\"scan'208\";a=\"644078042\""
        ],
        "X-ExtLoop1": "1",
        "From": "Andy Pei <andy.pei@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "chenbo.xia@intel.com, maxime.coquelin@redhat.com, rosen.xu@intel.com,\n qimaix.xiao@intel.com",
        "Subject": "[PATCH] vhost: fix virtio blk vDPA live migration IO drop",
        "Date": "Wed, 22 Jun 2022 15:47:08 +0800",
        "Message-Id": "<1655884028-193120-1-git-send-email-andy.pei@intel.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "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": "In the virtio blk vDPA live migration use case, before the live\nmigration process, QEMU will set call fd to vDPA back-end. QEMU\nand vDPA back-end stand by until live migration starts.\nDuring live migration process, QEMU sets kick fd and a new call\nfd. However, after the kick fd is set to the vDPA back-end, the\nvDPA back-end configures device and data path starts. The new\ncall fd will cause some kind of \"re-configuration\", this kind\nof \"re-configuration\" cause IO drop.\nAfter this patch, vDPA back-end configures device after kick fd\nand call fd are well set and make sure no IO drops.\nThis patch only impact virtio blk vDPA device and does not impact\nnet device.\n\nFixes: 7015b6577178 (\"vdpa/ifc: add block device SW live-migration\")\n\nSigned-off-by: Andy Pei <andy.pei@intel.com>\n---\n lib/vhost/vhost_user.c | 15 +++++++++++++++\n 1 file changed, 15 insertions(+)",
    "diff": "diff --git a/lib/vhost/vhost_user.c b/lib/vhost/vhost_user.c\nindex 2b9a3b6..cc03f67 100644\n--- a/lib/vhost/vhost_user.c\n+++ b/lib/vhost/vhost_user.c\n@@ -2946,6 +2946,7 @@ static int is_vring_iotlb(struct virtio_net *dev,\n \tint ret;\n \tint unlock_required = 0;\n \tbool handled;\n+\tuint32_t vdpa_type = 0;\n \tuint32_t request;\n \tuint32_t i;\n \n@@ -3152,6 +3153,20 @@ static int is_vring_iotlb(struct virtio_net *dev,\n \tif (!vdpa_dev)\n \t\tgoto out;\n \n+\tif (vdpa_dev->ops->get_dev_type) {\n+\t\tret = vdpa_dev->ops->get_dev_type(vdpa_dev, &vdpa_type);\n+\t\tif (ret) {\n+\t\t\tVHOST_LOG_CONFIG(ERR, \"failed to get vdpa dev type.\\n\");\n+\t\t\tret = -1;\n+\t\t\tgoto out;\n+\t\t}\n+\t} else {\n+\t\tvdpa_type = RTE_VHOST_VDPA_DEVICE_TYPE_NET;\n+\t}\n+\tif (vdpa_type == RTE_VHOST_VDPA_DEVICE_TYPE_BLK\n+\t\t&& request != VHOST_USER_SET_VRING_CALL)\n+\t\tgoto out;\n+\n \tif (!(dev->flags & VIRTIO_DEV_VDPA_CONFIGURED)) {\n \t\tif (vdpa_dev->ops->dev_conf(dev->vid))\n \t\t\tVHOST_LOG_CONFIG(ERR, \"(%s) failed to configure vDPA device\\n\",\n",
    "prefixes": []
}