get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 52790,
    "url": "http://patches.dpdk.org/api/patches/52790/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190415075625.109948-4-xiao.w.wang@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": "<20190415075625.109948-4-xiao.w.wang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190415075625.109948-4-xiao.w.wang@intel.com",
    "date": "2019-04-15T07:56:25",
    "name": "[3/3] net/ifc: fix used ring update",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "ba17aa1365c6566a4e7ac436dc394fa8594db7e0",
    "submitter": {
        "id": 281,
        "url": "http://patches.dpdk.org/api/people/281/?format=api",
        "name": "Xiao Wang",
        "email": "xiao.w.wang@intel.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190415075625.109948-4-xiao.w.wang@intel.com/mbox/",
    "series": [
        {
            "id": 4311,
            "url": "http://patches.dpdk.org/api/series/4311/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4311",
            "date": "2019-04-15T07:56:22",
            "name": "net/ifc: SW relay improvement and fix",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/4311/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/52790/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/52790/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 341121B128;\n\tMon, 15 Apr 2019 10:12:12 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 84BEF1B11A\n\tfor <dev@dpdk.org>; Mon, 15 Apr 2019 10:12:10 +0200 (CEST)",
            "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t15 Apr 2019 01:12:10 -0700",
            "from dpdk-xiao-1.sh.intel.com ([10.67.111.145])\n\tby fmsmga004.fm.intel.com with ESMTP; 15 Apr 2019 01:12:09 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.60,352,1549958400\"; d=\"scan'208\";a=\"161962082\"",
        "From": "Xiao Wang <xiao.w.wang@intel.com>",
        "To": "maxime.coquelin@redhat.com",
        "Cc": "dev@dpdk.org, tiwei.bie@intel.com, zhihong.wang@intel.com,\n\tzhe.wan@intel.com, Xiao Wang <xiao.w.wang@intel.com>",
        "Date": "Mon, 15 Apr 2019 15:56:25 +0800",
        "Message-Id": "<20190415075625.109948-4-xiao.w.wang@intel.com>",
        "X-Mailer": "git-send-email 2.15.1",
        "In-Reply-To": "<20190415075625.109948-1-xiao.w.wang@intel.com>",
        "References": "<20190415075625.109948-1-xiao.w.wang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 3/3] net/ifc: fix used ring update",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "The vring relay thread is created after HW datapath start and is\ncanceled before HW datapath stop, so we need to take care of the\nring update when the relay thread is not on duty.\n\nFixes: 4bb531e152d3 (\"net/ifc: support SW assisted VDPA live migration\")\n\nSigned-off-by: Xiao Wang <xiao.w.wang@intel.com>\n---\n drivers/net/ifc/ifcvf_vdpa.c | 7 +++++++\n 1 file changed, 7 insertions(+)",
    "diff": "diff --git a/drivers/net/ifc/ifcvf_vdpa.c b/drivers/net/ifc/ifcvf_vdpa.c\nindex 9e729ff72..e59084034 100644\n--- a/drivers/net/ifc/ifcvf_vdpa.c\n+++ b/drivers/net/ifc/ifcvf_vdpa.c\n@@ -81,6 +81,8 @@ static struct internal_list_head internal_list =\n \n static pthread_mutex_t internal_list_lock = PTHREAD_MUTEX_INITIALIZER;\n \n+static void update_used_ring(struct ifcvf_internal *internal, uint16_t qid);\n+\n static struct internal_list *\n find_internal_resource_by_did(int did)\n {\n@@ -666,6 +668,10 @@ m_ifcvf_stop(struct ifcvf_internal *internal)\n \tifcvf_stop_hw(hw);\n \n \tfor (i = 0; i < hw->nr_vring; i++) {\n+\t\t/* synchronize remaining new used entries if any */\n+\t\tif ((i & 1) == 0)\n+\t\t\tupdate_used_ring(internal, i);\n+\n \t\trte_vhost_get_vhost_vring(vid, i, &vq);\n \t\tlen = IFCVF_USED_RING_LEN(vq.size);\n \t\trte_vhost_log_used_vring(vid, i, 0, len);\n@@ -735,6 +741,7 @@ vring_relay(void *arg)\n \t\t\tDRV_LOG(ERR, \"epoll add error: %s\", strerror(errno));\n \t\t\treturn NULL;\n \t\t}\n+\t\tupdate_used_ring(internal, qid);\n \t}\n \n \t/* start relay with a first kick */\n",
    "prefixes": [
        "3/3"
    ]
}