get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 45077,
    "url": "http://patches.dpdk.org/api/patches/45077/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180921103308.16357-11-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": "<20180921103308.16357-11-jfreimann@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180921103308.16357-11-jfreimann@redhat.com",
    "date": "2018-09-21T10:33:07",
    "name": "[v6,10/11] net/virtio-user: add option to use packed queues",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "0fcef140779781e3cd0687dfce75842d92296a9c",
    "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/20180921103308.16357-11-jfreimann@redhat.com/mbox/",
    "series": [
        {
            "id": 1435,
            "url": "http://patches.dpdk.org/api/series/1435/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=1435",
            "date": "2018-09-21T10:32:57",
            "name": "implement packed virtqueues",
            "version": 6,
            "mbox": "http://patches.dpdk.org/series/1435/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/45077/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/45077/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 79A555B36;\n\tFri, 21 Sep 2018 12:34:37 +0200 (CEST)",
            "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby dpdk.org (Postfix) with ESMTP id E24A65B2E\n\tfor <dev@dpdk.org>; Fri, 21 Sep 2018 12:34:35 +0200 (CEST)",
            "from smtp.corp.redhat.com\n\t(int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27])\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 57D3A3002061;\n\tFri, 21 Sep 2018 10:34:35 +0000 (UTC)",
            "from localhost (dhcp-192-209.str.redhat.com [10.33.192.209])\n\tby smtp.corp.redhat.com (Postfix) with ESMTPS id A9C5589B19;\n\tFri, 21 Sep 2018 10:34:29 +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": "Fri, 21 Sep 2018 12:33:07 +0200",
        "Message-Id": "<20180921103308.16357-11-jfreimann@redhat.com>",
        "In-Reply-To": "<20180921103308.16357-1-jfreimann@redhat.com>",
        "References": "<20180921103308.16357-1-jfreimann@redhat.com>",
        "X-Scanned-By": "MIMEDefang 2.84 on 10.5.11.27",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.47]); Fri, 21 Sep 2018 10:34:35 +0000 (UTC)",
        "Subject": "[dpdk-dev] [PATCH v6 10/11] 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 drivers/net/virtio/virtio_user/virtio_user_dev.c | 10 ++++++++--\n drivers/net/virtio/virtio_user/virtio_user_dev.h |  2 +-\n drivers/net/virtio/virtio_user_ethdev.c          | 14 +++++++++++++-\n 3 files changed, 22 insertions(+), 4 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 869e96f87..0556bf7af 100644\n--- a/drivers/net/virtio/virtio_user/virtio_user_dev.c\n+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c\n@@ -391,12 +391,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@@ -451,6 +452,11 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,\n \t\tdev->unsupported_features |= (1ull << VIRTIO_F_IN_ORDER);\n \t}\n \n+\tif (!packed_vq) {\n+\t\tdev->device_features &= ~(1ull << VIRTIO_F_RING_PACKED);\n+\t\tdev->unsupported_features |= (1ull << VIRTIO_F_RING_PACKED);\n+\t}\n+\n \tif (dev->mac_specified) {\n \t\tdev->device_features |= (1ull << VIRTIO_NET_F_MAC);\n \t} else {\ndiff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.h b/drivers/net/virtio/virtio_user/virtio_user_dev.h\nindex d6e0e137b..7f46ba1d9 100644\n--- a/drivers/net/virtio/virtio_user/virtio_user_dev.h\n+++ b/drivers/net/virtio/virtio_user/virtio_user_dev.h\n@@ -49,7 +49,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 525d16cab..72ac86186 100644\n--- a/drivers/net/virtio/virtio_user_ethdev.c\n+++ b/drivers/net/virtio/virtio_user_ethdev.c\n@@ -364,6 +364,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@@ -473,6 +475,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@@ -556,6 +559,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@@ -603,7 +615,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": [
        "v6",
        "10/11"
    ]
}