get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 87304,
    "url": "https://patches.dpdk.org/api/patches/87304/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210126101639.250481-17-maxime.coquelin@redhat.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": "<20210126101639.250481-17-maxime.coquelin@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210126101639.250481-17-maxime.coquelin@redhat.com",
    "date": "2021-01-26T10:16:11",
    "name": "[v4,16/44] net/virtio: pack virtio HW struct",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "266c7b36bccbfcd38cb1017994b383ace6a36b4b",
    "submitter": {
        "id": 512,
        "url": "https://patches.dpdk.org/api/people/512/?format=api",
        "name": "Maxime Coquelin",
        "email": "maxime.coquelin@redhat.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/20210126101639.250481-17-maxime.coquelin@redhat.com/mbox/",
    "series": [
        {
            "id": 14950,
            "url": "https://patches.dpdk.org/api/series/14950/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=14950",
            "date": "2021-01-26T10:15:55",
            "name": "net/virtio: Virtio PMD rework",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/14950/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/87304/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/87304/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 593BDA052A;\n\tTue, 26 Jan 2021 11:19:34 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id B00FF141378;\n\tTue, 26 Jan 2021 11:17:41 +0100 (CET)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [63.128.21.124])\n by mails.dpdk.org (Postfix) with ESMTP id C7B12141373\n for <dev@dpdk.org>; Tue, 26 Jan 2021 11:17:37 +0100 (CET)",
            "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-580-fob_8ov4NUukf_2Yty8pZg-1; Tue, 26 Jan 2021 05:17:35 -0500",
            "from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com\n [10.5.11.11])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3E11A1005504;\n Tue, 26 Jan 2021 10:17:34 +0000 (UTC)",
            "from max-t490s.redhat.com (unknown [10.36.110.31])\n by smtp.corp.redhat.com (Postfix) with ESMTP id C4C4D710DC;\n Tue, 26 Jan 2021 10:17:32 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1611656257;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=G9QYHRxM9DCSojXGYSNWjVprQtg7C5HuZ2qiGPgAAT8=;\n b=C7pqkO0tjp5h0WiqP9GHdbvvgUg1nI6dwFewnZqVxjjb8WQIZgJpCbO40x9oIUWPkq54f0\n WWQ8KfQ6SIfGeCfhw09Q/xUx58MZWkvPPnqYCUWbbYgFWxmdjXejb/2oWx69Pa//L5/Ptb\n kLGc8BGsfX6xhgjRT1puIZ+G3vQc8WI=",
        "X-MC-Unique": "fob_8ov4NUukf_2Yty8pZg-1",
        "From": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "To": "dev@dpdk.org, chenbo.xia@intel.com, olivier.matz@6wind.com,\n amorenoz@redhat.com, david.marchand@redhat.com",
        "Cc": "Maxime Coquelin <maxime.coquelin@redhat.com>",
        "Date": "Tue, 26 Jan 2021 11:16:11 +0100",
        "Message-Id": "<20210126101639.250481-17-maxime.coquelin@redhat.com>",
        "In-Reply-To": "<20210126101639.250481-1-maxime.coquelin@redhat.com>",
        "References": "<20210126101639.250481-1-maxime.coquelin@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.11",
        "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain; charset=\"US-ASCII\"",
        "Subject": "[dpdk-dev] [PATCH v4 16/44] net/virtio: pack virtio HW struct",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "This patch improves the virtio_hw struct packing,\ngoing from 88 down to 80 bytes with a 6 bytes hole in\nthe end of the first cacheline. Fields only used in the\nslow path are placed in the end, so that hot path only\nuses the first cacheline.\n\nThe patch also changes booleans fields to uint8_t type, and\nfix inconsistencies in their assignments.\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\nReviewed-by: Chenbo Xia <chenbo.xia@intel.com>\n---\n drivers/net/virtio/virtio_ethdev.c | 12 ++++----\n drivers/net/virtio/virtio_pci.h    | 45 +++++++++++++++---------------\n drivers/net/virtio/virtqueue.h     |  2 +-\n 3 files changed, 29 insertions(+), 30 deletions(-)",
    "diff": "diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c\nindex c46fe4adf6..c1d7b14dda 100644\n--- a/drivers/net/virtio/virtio_ethdev.c\n+++ b/drivers/net/virtio/virtio_ethdev.c\n@@ -699,7 +699,7 @@ virtio_dev_close(struct rte_eth_dev *dev)\n \n \tif (!hw->opened)\n \t\treturn 0;\n-\thw->opened = false;\n+\thw->opened = 0;\n \n \t/* reset the NIC */\n \tif (dev->data->dev_flags & RTE_ETH_DEV_INTR_LSC)\n@@ -1864,7 +1864,7 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)\n \t\t}\n \t}\n \n-\thw->opened = true;\n+\thw->opened = 1;\n \n \treturn 0;\n \n@@ -1973,7 +1973,7 @@ virtio_dev_devargs_parse(struct rte_devargs *devargs, uint32_t *speed, int *vect\n \treturn ret;\n }\n \n-static bool\n+static uint8_t\n rx_offload_enabled(struct virtio_hw *hw)\n {\n \treturn vtpci_with_feature(hw, VIRTIO_NET_F_GUEST_CSUM) ||\n@@ -1981,7 +1981,7 @@ rx_offload_enabled(struct virtio_hw *hw)\n \t\tvtpci_with_feature(hw, VIRTIO_NET_F_GUEST_TSO6);\n }\n \n-static bool\n+static uint8_t\n tx_offload_enabled(struct virtio_hw *hw)\n {\n \treturn vtpci_with_feature(hw, VIRTIO_NET_F_CSUM) ||\n@@ -2267,7 +2267,7 @@ virtio_dev_start(struct rte_eth_dev *dev)\n \t}\n \n \tset_rxtx_funcs(dev);\n-\thw->started = true;\n+\thw->started = 1;\n \n \t/* Initialize Link state */\n \tvirtio_dev_link_update(dev, 0);\n@@ -2336,7 +2336,7 @@ virtio_dev_stop(struct rte_eth_dev *dev)\n \trte_spinlock_lock(&hw->state_lock);\n \tif (!hw->started)\n \t\tgoto out_unlock;\n-\thw->started = false;\n+\thw->started = 0;\n \n \tif (intr_conf->lsc || intr_conf->rxq) {\n \t\tvirtio_intr_disable(dev);\ndiff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h\nindex 4f3690032b..15f8144fc6 100644\n--- a/drivers/net/virtio/virtio_pci.h\n+++ b/drivers/net/virtio/virtio_pci.h\n@@ -247,26 +247,25 @@ struct virtio_pci_ops {\n struct virtio_net_config;\n \n struct virtio_hw {\n-\tstruct virtnet_ctl *cvq;\n-\tuint64_t    req_guest_features;\n-\tuint64_t    guest_features;\n-\tuint32_t    max_queue_pairs;\n-\tbool        started;\n-\tuint16_t\tmax_mtu;\n-\tuint16_t    vtnet_hdr_size;\n-\tuint8_t\t    vlan_strip;\n-\tuint8_t\t    use_msix;\n-\tuint8_t     use_vec_rx;\n-\tuint8_t     use_vec_tx;\n-\tuint8_t     use_inorder_rx;\n-\tuint8_t     use_inorder_tx;\n-\tuint8_t     weak_barriers;\n-\tbool        has_tx_offload;\n-\tbool        has_rx_offload;\n-\tuint16_t    port_id;\n-\tuint8_t     mac_addr[RTE_ETHER_ADDR_LEN];\n-\tuint32_t    speed;  /* link speed in MB */\n-\tuint8_t     duplex;\n+\tstruct virtqueue **vqs;\n+\tuint64_t guest_features;\n+\tuint16_t vtnet_hdr_size;\n+\tuint8_t started;\n+\tuint8_t weak_barriers;\n+\tuint8_t vlan_strip;\n+\tuint8_t has_tx_offload;\n+\tuint8_t has_rx_offload;\n+\tuint8_t use_vec_rx;\n+\tuint8_t use_vec_tx;\n+\tuint8_t use_inorder_rx;\n+\tuint8_t use_inorder_tx;\n+\tuint8_t opened;\n+\tuint16_t port_id;\n+\tuint8_t mac_addr[RTE_ETHER_ADDR_LEN];\n+\tuint32_t speed;  /* link speed in MB */\n+\tuint8_t duplex;\n+\tuint8_t use_msix;\n+\tuint16_t max_mtu;\n \t/*\n \t * App management thread and virtio interrupt handler thread\n \t * both can change device state, this lock is meant to avoid\n@@ -274,9 +273,9 @@ struct virtio_hw {\n \t */\n \trte_spinlock_t state_lock;\n \tstruct rte_mbuf **inject_pkts;\n-\tbool        opened;\n-\n-\tstruct virtqueue **vqs;\n+\tuint16_t max_queue_pairs;\n+\tuint64_t req_guest_features;\n+\tstruct virtnet_ctl *cvq;\n };\n \n struct virtio_pci_dev {\ndiff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h\nindex 7611317581..3a9ce29069 100644\n--- a/drivers/net/virtio/virtqueue.h\n+++ b/drivers/net/virtio/virtqueue.h\n@@ -615,7 +615,7 @@ virtqueue_notify(struct virtqueue *vq)\n static inline void\n virtqueue_xmit_offload(struct virtio_net_hdr *hdr,\n \t\t\tstruct rte_mbuf *cookie,\n-\t\t\tbool offload)\n+\t\t\tuint8_t offload)\n {\n \tif (offload) {\n \t\tif (cookie->ol_flags & PKT_TX_TCP_SEG)\n",
    "prefixes": [
        "v4",
        "16/44"
    ]
}