get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 48504,
    "url": "http://patches.dpdk.org/api/patches/48504/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20181203141515.28368-9-jfreimann@redhat.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": "<20181203141515.28368-9-jfreimann@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20181203141515.28368-9-jfreimann@redhat.com",
    "date": "2018-12-03T14:15:14",
    "name": "[v11,8/9] net/virtio-user: add option to use packed queues",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1188daa2aca73452eec641e1bf278fc69d85b8f7",
    "submitter": {
        "id": 745,
        "url": "http://patches.dpdk.org/api/people/745/?format=api",
        "name": "Jens Freimann",
        "email": "jfreimann@redhat.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/20181203141515.28368-9-jfreimann@redhat.com/mbox/",
    "series": [
        {
            "id": 2645,
            "url": "http://patches.dpdk.org/api/series/2645/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=2645",
            "date": "2018-12-03T14:15:06",
            "name": "implement packed virtqueues",
            "version": 11,
            "mbox": "http://patches.dpdk.org/series/2645/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/48504/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/48504/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 0A52D1B479;\n\tMon,  3 Dec 2018 15:16:51 +0100 (CET)",
            "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby dpdk.org (Postfix) with ESMTP id 5EDDA1B471\n\tfor <dev@dpdk.org>; Mon,  3 Dec 2018 15:16:49 +0100 (CET)",
            "from smtp.corp.redhat.com\n\t(int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id B8CA94E93F;\n\tMon,  3 Dec 2018 14:16:48 +0000 (UTC)",
            "from localhost (dhcp-192-205.str.redhat.com [10.33.192.205])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id 58516100195E;\n\tMon,  3 Dec 2018 14:16:48 +0000 (UTC)"
        ],
        "From": "Jens Freimann <jfreimann@redhat.com>",
        "To": "dev@dpdk.org",
        "Cc": "tiwei.bie@intel.com,\n\tmaxime.coquelin@redhat.com,\n\tGavin.Hu@arm.com",
        "Date": "Mon,  3 Dec 2018 15:15:14 +0100",
        "Message-Id": "<20181203141515.28368-9-jfreimann@redhat.com>",
        "In-Reply-To": "<20181203141515.28368-1-jfreimann@redhat.com>",
        "References": "<20181203141515.28368-1-jfreimann@redhat.com>",
        "X-Scanned-By": "MIMEDefang 2.84 on 10.5.11.22",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.38]); Mon, 03 Dec 2018 14:16:48 +0000 (UTC)",
        "Subject": "[dpdk-dev] [PATCH v11 8/9] net/virtio-user: add option to use\n\tpacked queues",
        "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": "From: Yuanhan Liu <yuanhan.liu@linux.intel.com>\n\nAdd option to enable packed queue support for virtio-user\ndevices.\n\nSigned-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>\n---\n .../net/virtio/virtio_user/virtio_user_dev.c   | 18 ++++++++++++++----\n .../net/virtio/virtio_user/virtio_user_dev.h   |  2 +-\n drivers/net/virtio/virtio_user_ethdev.c        | 14 +++++++++++++-\n 3 files changed, 28 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c\nindex 20816c936..697ba4ae8 100644\n--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c\n+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c\n@@ -58,6 +58,8 @@ virtio_user_kick_queue(struct virtio_user_dev *dev, uint32_t queue_sel)\n \n \tstate.index = queue_sel;\n \tstate.num = 0; /* no reservation */\n+\tif (dev->features & (1ULL << VIRTIO_F_RING_PACKED))\n+\t\tstate.num |= (1 << 15);\n \tdev->ops->send_request(dev, VHOST_USER_SET_VRING_BASE, &state);\n \n \tdev->ops->send_request(dev, VHOST_USER_SET_VRING_ADDR, &addr);\n@@ -407,12 +409,13 @@ virtio_user_dev_setup(struct virtio_user_dev *dev)\n \t 1ULL << VIRTIO_NET_F_GUEST_TSO4\t|\t\\\n \t 1ULL << VIRTIO_NET_F_GUEST_TSO6\t|\t\\\n \t 1ULL << VIRTIO_F_IN_ORDER\t\t|\t\\\n-\t 1ULL << VIRTIO_F_VERSION_1)\n+\t 1ULL << VIRTIO_F_VERSION_1\t\t|\t\\\n+\t 1ULL << VIRTIO_F_RING_PACKED)\n \n int\n virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,\n \t\t     int cq, int queue_size, const char *mac, char **ifname,\n-\t\t     int mrg_rxbuf, int in_order)\n+\t\t     int mrg_rxbuf, int in_order, int packed_vq)\n {\n \tpthread_mutex_init(&dev->mutex, NULL);\n \tsnprintf(dev->path, PATH_MAX, \"%s\", path);\n@@ -464,10 +467,17 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,\n \tif (!in_order)\n \t\tdev->unsupported_features |= (1ull << VIRTIO_F_IN_ORDER);\n \n-\tif (dev->mac_specified)\n-\t\tdev->frontend_features |= (1ull << VIRTIO_NET_F_MAC);\n+\tif (packed_vq)\n+\t\tdev->device_features |= (1ull << VIRTIO_F_RING_PACKED);\n \telse\n+\t\tdev->device_features &= ~(1ull << VIRTIO_F_RING_PACKED);\n+\n+\tif (dev->mac_specified) {\n+\t\tdev->device_features |= (1ull << VIRTIO_NET_F_MAC);\n+\t} else {\n+\t\tdev->device_features &= ~(1ull << VIRTIO_NET_F_MAC);\n \t\tdev->unsupported_features |= (1ull << VIRTIO_NET_F_MAC);\n+\t}\n \n \tif (cq) {\n \t\t/* device does not really need to know anything about CQ,\ndiff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.h b/drivers/net/virtio/virtio_user/virtio_user_dev.h\nindex c42ce5d4b..672a8161a 100644\n--- a/drivers/net/virtio/virtio_user/virtio_user_dev.h\n+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.h\n@@ -50,7 +50,7 @@ int virtio_user_start_device(struct virtio_user_dev *dev);\n int virtio_user_stop_device(struct virtio_user_dev *dev);\n int virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,\n \t\t\t int cq, int queue_size, const char *mac, char **ifname,\n-\t\t\t int mrg_rxbuf, int in_order);\n+\t\t\t int mrg_rxbuf, int in_order, int packed_vq);\n void virtio_user_dev_uninit(struct virtio_user_dev *dev);\n void virtio_user_handle_cq(struct virtio_user_dev *dev, uint16_t queue_idx);\n uint8_t virtio_user_handle_mq(struct virtio_user_dev *dev, uint16_t q_pairs);\ndiff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c\nindex f8791391a..af2800605 100644\n--- a/drivers/net/virtio/virtio_user_ethdev.c\n+++ b/drivers/net/virtio/virtio_user_ethdev.c\n@@ -361,6 +361,8 @@ static const char *valid_args[] = {\n \tVIRTIO_USER_ARG_MRG_RXBUF,\n #define VIRTIO_USER_ARG_IN_ORDER       \"in_order\"\n \tVIRTIO_USER_ARG_IN_ORDER,\n+#define VIRTIO_USER_ARG_PACKED_VQ \"packed_vq\"\n+\tVIRTIO_USER_ARG_PACKED_VQ,\n \tNULL\n };\n \n@@ -468,6 +470,7 @@ virtio_user_pmd_probe(struct rte_vdev_device *dev)\n \tchar *ifname = NULL;\n \tchar *mac_addr = NULL;\n \tint ret = -1;\n+\tuint64_t packed_vq = 0;\n \n \tkvlist = rte_kvargs_parse(rte_vdev_device_args(dev), valid_args);\n \tif (!kvlist) {\n@@ -551,6 +554,15 @@ virtio_user_pmd_probe(struct rte_vdev_device *dev)\n \t\tcq = 1;\n \t}\n \n+\tif (rte_kvargs_count(kvlist, VIRTIO_USER_ARG_PACKED_VQ) == 1) {\n+\t\tif (rte_kvargs_process(kvlist, VIRTIO_USER_ARG_PACKED_VQ,\n+\t\t\t\t       &get_integer_arg, &packed_vq) < 0) {\n+\t\t\tPMD_INIT_LOG(ERR, \"error to parse %s\",\n+\t\t\t\t     VIRTIO_USER_ARG_PACKED_VQ);\n+\t\t\tgoto end;\n+\t\t}\n+\t}\n+\n \tif (queues > 1 && cq == 0) {\n \t\tPMD_INIT_LOG(ERR, \"multi-q requires ctrl-q\");\n \t\tgoto end;\n@@ -598,7 +610,7 @@ virtio_user_pmd_probe(struct rte_vdev_device *dev)\n \t\t\tvu_dev->is_server = false;\n \t\tif (virtio_user_dev_init(hw->virtio_user_dev, path, queues, cq,\n \t\t\t\t queue_size, mac_addr, &ifname, mrg_rxbuf,\n-\t\t\t\t in_order) < 0) {\n+\t\t\t\t in_order, packed_vq) < 0) {\n \t\t\tPMD_INIT_LOG(ERR, \"virtio_user_dev_init fails\");\n \t\t\tvirtio_user_eth_dev_free(eth_dev);\n \t\t\tgoto end;\n",
    "prefixes": [
        "v11",
        "8/9"
    ]
}