get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 63500,
    "url": "https://patches.dpdk.org/api/patches/63500/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20191202145735.9763-1-fengli@smartx.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": "<20191202145735.9763-1-fengli@smartx.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191202145735.9763-1-fengli@smartx.com",
    "date": "2019-12-02T14:57:35",
    "name": "vhost: add config change slave msg support",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "2ab969320f3b4fba5551531593456f2062718fbf",
    "submitter": {
        "id": 1528,
        "url": "https://patches.dpdk.org/api/people/1528/?format=api",
        "name": "Li Feng",
        "email": "fengli@smartx.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/20191202145735.9763-1-fengli@smartx.com/mbox/",
    "series": [
        {
            "id": 7704,
            "url": "https://patches.dpdk.org/api/series/7704/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=7704",
            "date": "2019-12-02T14:57:35",
            "name": "vhost: add config change slave msg support",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/7704/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/63500/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/63500/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id D7CBFA04B5;\n\tMon,  2 Dec 2019 15:57:18 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 216511BE84;\n\tMon,  2 Dec 2019 15:57:18 +0100 (CET)",
            "from mail-pf1-f194.google.com (mail-pf1-f194.google.com\n [209.85.210.194]) by dpdk.org (Postfix) with ESMTP id CA84A2BD8\n for <dev@dpdk.org>; Mon,  2 Dec 2019 15:57:16 +0100 (CET)",
            "by mail-pf1-f194.google.com with SMTP id s18so4420752pfm.4\n for <dev@dpdk.org>; Mon, 02 Dec 2019 06:57:16 -0800 (PST)",
            "from 31_216.localdomain ([23.98.38.159])\n by smtp.gmail.com with ESMTPSA id b11sm34040688pfd.83.2019.12.02.06.57.12\n (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n Mon, 02 Dec 2019 06:57:14 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=smartx-com.20150623.gappssmtp.com; s=20150623;\n h=mime-version:from:to:cc:subject:date:message-id\n :content-transfer-encoding;\n bh=+1w6lzS3KUR6dutT1k18uWxJ0u9OOwt/0s4YzZIvoJU=;\n b=BxFNATug54d6olAkNTe5wa28a9403ckt02ja/PpI9EsNYBpZJ19uImg2CdZ/itoKjd\n /0AoF/ptCEacwjn8X8tcxZtrkAVfBWza/up386Oy0tF+5nNLJ2HuhHUaeisXvPselvem\n JVUCpeycMHgexySGVWI2b1fH9AlVAsG7tvjQgqQkSF9KxDpPuTS6HEczgvuaA+j22ynN\n alfw7bT4Jd0TLsC91CLWKPtzhFvmmX3NHKF/XTDbVEG89CtTEN07rfDg1Gz/wq76Os/z\n JS2rbMWlnhz+lylrJO7Qo2DO5UytoxyjbkNjXKpKx3+Y6wscZWcIrk3kSCaymVKGT0hA\n G0hw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n :content-transfer-encoding;\n bh=+1w6lzS3KUR6dutT1k18uWxJ0u9OOwt/0s4YzZIvoJU=;\n b=lmmSE1InKYLmY+myZYvTGSBx8yPOisPY7R/88X2DyhfEBFD1cerJqe4EE886O0MXvN\n mbDf9+B+4WU69d3YhgyNfGCNU+LwHp6YDfvp12Gm2nP/JnqAAa9juhd/GI7JE4ocCQF3\n YvJKvHVWB3zGvBIs5Ff3+B+DhIn3uXDOMsf1CSDNlXd/xG0x82EQea0Blp7+5m9/AbMo\n Pw6ODlIwqtk8J7VqBOKBqDqBgiZb+glXRp85biU+JF59CJMB0EPYRMbqf/trbHHHKm7/\n /kmJFfU83u9PE5ouo6w5SOpyNzBL6IBPbBK6yTnmx85yjuem4TwBeSsW6aFsqA/26bCP\n ubaA==",
        "MIME-Version": "1.0",
        "X-Gm-Message-State": "APjAAAX8jwVYO81ujgce9PZsIB+sqIZ8VvDbNkZd2cwBHvtEy2qL3aA1\n XnKzPwX2/Qp2xcLL3LzoLg613DGH1M8V3i+XEwlJpChVV2rTWtEN4QIvJZMfe6v6MwTZz/KZ",
        "X-Google-Smtp-Source": "\n APXvYqxxrDtdL0H5bBe3Dc99hp+S7m5mE12WVIuKDvA1/SVMKlB6Xeo8SdaCHP31l/kSqg1PeC9TPg==",
        "X-Received": "by 2002:aa7:9839:: with SMTP id\n q25mr11853057pfl.161.1575298635727;\n Mon, 02 Dec 2019 06:57:15 -0800 (PST)",
        "From": "Li Feng <fengli@smartx.com>",
        "To": "Maxime Coquelin <maxime.coquelin@redhat.com>,\n Tiwei Bie <tiwei.bie@intel.com>, Zhihong Wang <zhihong.wang@intel.com>",
        "Cc": "dev@dpdk.org,\n\tLi Feng <fengli@smartx.com>",
        "Date": "Mon,  2 Dec 2019 22:57:35 +0800",
        "Message-Id": "<20191202145735.9763-1-fengli@smartx.com>",
        "X-Mailer": "git-send-email 2.11.0",
        "Content-Type": "text/plain; charset=\"UTF-8\"",
        "Content-Transfer-Encoding": "quoted-printable",
        "Subject": "[dpdk-dev] [PATCH] vhost: add config change slave msg support",
        "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 <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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "This msg is used to notify qemu that should get the config of backend.\n\nFor example, vhost-user-blk uses this msg to notify guest os the\ncompacity of backend has changed.\n\nSigned-off-by: Li Feng <fengli@smartx.com>\n---\n lib/librte_vhost/vhost_user.c | 31 +++++++++++++++++++++++++++++++\n lib/librte_vhost/vhost_user.h |  2 ++\n 2 files changed, 33 insertions(+)",
    "diff": "diff --git a/lib/librte_vhost/vhost_user.c b/lib/librte_vhost/vhost_user.c\nindex 0cfb8b792..4126fa32d 100644\n--- a/lib/librte_vhost/vhost_user.c\n+++ b/lib/librte_vhost/vhost_user.c\n@@ -2840,6 +2840,37 @@ vhost_user_iotlb_miss(struct virtio_net *dev, uint64_t iova, uint8_t perm)\n \treturn 0;\n }\n \n+static int\n+vhost_user_slave_config_change(struct virtio_net *dev)\n+{\n+\tint ret;\n+\tstruct VhostUserMsg msg = {\n+\t\t.request.slave = VHOST_USER_SLAVE_CONFIG_CHANGE_MSG,\n+\t\t.flags = VHOST_USER_VERSION,\n+\t\t.size = 0,\n+\t};\n+\n+\tret = send_vhost_message(dev->slave_req_fd, &msg);\n+\tif (ret < 0) {\n+\t\tRTE_LOG(ERR, VHOST_CONFIG,\n+\t\t\t\t\"Failed to send config change  (%d)\\n\",\n+\t\t\t\tret);\n+\t\treturn ret;\n+\t}\n+\n+\treturn 0;\n+}\n+\n+int\n+rte_vhost_user_slave_config_change(int vid)\n+{\n+\tstruct virtio_net *dev;\n+\tdev = get_device(vid);\n+\tif (!dev)\n+\t\treturn -ENODEV;\n+\treturn vhost_user_slave_config_change(dev);\n+}\n+\n static int vhost_user_slave_set_vring_host_notifier(struct virtio_net *dev,\n \t\t\t\t\t\t    int index, int fd,\n \t\t\t\t\t\t    uint64_t offset,\ndiff --git a/lib/librte_vhost/vhost_user.h b/lib/librte_vhost/vhost_user.h\nindex 6563f7315..5c1bb2138 100644\n--- a/lib/librte_vhost/vhost_user.h\n+++ b/lib/librte_vhost/vhost_user.h\n@@ -62,6 +62,7 @@ typedef enum VhostUserRequest {\n typedef enum VhostUserSlaveRequest {\n \tVHOST_USER_SLAVE_NONE = 0,\n \tVHOST_USER_SLAVE_IOTLB_MSG = 1,\n+\tVHOST_USER_SLAVE_CONFIG_CHANGE_MSG = 2,\n \tVHOST_USER_SLAVE_VRING_HOST_NOTIFIER_MSG = 3,\n \tVHOST_USER_SLAVE_MAX\n } VhostUserSlaveRequest;\n@@ -158,6 +159,7 @@ typedef struct VhostUserMsg {\n /* vhost_user.c */\n int vhost_user_msg_handler(int vid, int fd);\n int vhost_user_iotlb_miss(struct virtio_net *dev, uint64_t iova, uint8_t perm);\n+int rte_vhost_user_slave_config_change(int vid);\n \n /* socket.c */\n int read_fd_message(int sockfd, char *buf, int buflen, int *fds, int max_fds,\n",
    "prefixes": []
}