get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 87311,
    "url": "https://patches.dpdk.org/api/patches/87311/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210126101639.250481-24-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-24-maxime.coquelin@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210126101639.250481-24-maxime.coquelin@redhat.com",
    "date": "2021-01-26T10:16:18",
    "name": "[v4,23/44] net/virtio: move vring alignment to generic header",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "2f9672c6e6af84d82d7744ffd1eda21bbe995945",
    "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-24-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/87311/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/87311/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 A1D5DA052A;\n\tTue, 26 Jan 2021 11:20:46 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id C6ADC1413AB;\n\tTue, 26 Jan 2021 11:17:59 +0100 (CET)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [216.205.24.124])\n by mails.dpdk.org (Postfix) with ESMTP id 2120F141399\n for <dev@dpdk.org>; Tue, 26 Jan 2021 11:17:56 +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-419-6EFTpvqRMYu6ZkU4jPjMAQ-1; Tue, 26 Jan 2021 05:17:54 -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 3E3E218C8C02;\n Tue, 26 Jan 2021 10:17:53 +0000 (UTC)",
            "from max-t490s.redhat.com (unknown [10.36.110.31])\n by smtp.corp.redhat.com (Postfix) with ESMTP id BB36E6F45C;\n Tue, 26 Jan 2021 10:17:51 +0000 (UTC)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1611656276;\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=yQinrJBKfSBTWBX7CZ12GSUl1z9Ldgs6Z8fBLnWUtac=;\n b=h9IY/jsX4l5MXNvDjH10nhNmI8Cv3vMvG6R2MLQzdmWYwl0waoRZnoo7iIiNLxJ7gf0vqN\n xLL8MCzjTwoNWRhzahvGA8iQhnO2SYTX2q+h+ChXKY3pMP0wc0pP9SAT8FHi1cREFjE3BS\n 1Y3NMWrLXCmvvjne5OaMUjQIzr7emRI=",
        "X-MC-Unique": "6EFTpvqRMYu6ZkU4jPjMAQ-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:18 +0100",
        "Message-Id": "<20210126101639.250481-24-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 23/44] net/virtio: move vring alignment to\n generic header",
        "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 moves vring alignment define to the generic\nVirtio header.\n\nSigned-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>\nReviewed-by: Chenbo Xia <chenbo.xia@intel.com>\nReviewed-by: David Marchand <david.marchand@redhat.com>\n---\n drivers/net/virtio/virtio.h             |  3 +++\n drivers/net/virtio/virtio_ethdev.c      | 10 +++++-----\n drivers/net/virtio/virtio_pci.c         |  2 +-\n drivers/net/virtio/virtio_pci.h         |  3 ---\n drivers/net/virtio/virtio_user_ethdev.c |  4 ++--\n 5 files changed, 11 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/drivers/net/virtio/virtio.h b/drivers/net/virtio/virtio.h\nindex a7629ad16b..21d54904e7 100644\n--- a/drivers/net/virtio/virtio.h\n+++ b/drivers/net/virtio/virtio.h\n@@ -131,6 +131,9 @@\n /* Vector value used to disable MSI for queue. */\n #define VIRTIO_MSI_NO_VECTOR 0xFFFF\n \n+/* The alignment to use between consumer and producer parts of vring. */\n+#define VIRTIO_VRING_ALIGN 4096\n+\n /*\n  * This structure is just a reference to read net device specific\n  * config space; it is just a shadow structure.\ndiff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c\nindex 51eb5aebf3..a2195bdda8 100644\n--- a/drivers/net/virtio/virtio_ethdev.c\n+++ b/drivers/net/virtio/virtio_ethdev.c\n@@ -407,12 +407,12 @@ virtio_init_vring(struct virtqueue *vq)\n \tmemset(vq->vq_descx, 0, sizeof(struct vq_desc_extra) * vq->vq_nentries);\n \tif (virtio_with_packed_queue(vq->hw)) {\n \t\tvring_init_packed(&vq->vq_packed.ring, ring_mem,\n-\t\t\t\t  VIRTIO_PCI_VRING_ALIGN, size);\n+\t\t\t\t  VIRTIO_VRING_ALIGN, size);\n \t\tvring_desc_init_packed(vq, size);\n \t} else {\n \t\tstruct vring *vr = &vq->vq_split.ring;\n \n-\t\tvring_init_split(vr, ring_mem, VIRTIO_PCI_VRING_ALIGN, size);\n+\t\tvring_init_split(vr, ring_mem, VIRTIO_VRING_ALIGN, size);\n \t\tvring_desc_init_split(vr->desc, size);\n \t}\n \t/*\n@@ -497,14 +497,14 @@ virtio_init_queue(struct rte_eth_dev *dev, uint16_t vtpci_queue_idx)\n \t/*\n \t * Reserve a memzone for vring elements\n \t */\n-\tsize = vring_size(hw, vq_size, VIRTIO_PCI_VRING_ALIGN);\n-\tvq->vq_ring_size = RTE_ALIGN_CEIL(size, VIRTIO_PCI_VRING_ALIGN);\n+\tsize = vring_size(hw, vq_size, VIRTIO_VRING_ALIGN);\n+\tvq->vq_ring_size = RTE_ALIGN_CEIL(size, VIRTIO_VRING_ALIGN);\n \tPMD_INIT_LOG(DEBUG, \"vring_size: %d, rounded_vring_size: %d\",\n \t\t     size, vq->vq_ring_size);\n \n \tmz = rte_memzone_reserve_aligned(vq_name, vq->vq_ring_size,\n \t\t\tnuma_node, RTE_MEMZONE_IOVA_CONTIG,\n-\t\t\tVIRTIO_PCI_VRING_ALIGN);\n+\t\t\tVIRTIO_VRING_ALIGN);\n \tif (mz == NULL) {\n \t\tif (rte_errno == EEXIST)\n \t\t\tmz = rte_memzone_lookup(vq_name);\ndiff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c\nindex 905534ac72..d27e9eb515 100644\n--- a/drivers/net/virtio/virtio_pci.c\n+++ b/drivers/net/virtio/virtio_pci.c\n@@ -492,7 +492,7 @@ modern_setup_queue(struct virtio_hw *hw, struct virtqueue *vq)\n \tavail_addr = desc_addr + vq->vq_nentries * sizeof(struct vring_desc);\n \tused_addr = RTE_ALIGN_CEIL(avail_addr + offsetof(struct vring_avail,\n \t\t\t\t\t\t\t ring[vq->vq_nentries]),\n-\t\t\t\t   VIRTIO_PCI_VRING_ALIGN);\n+\t\t\t\t   VIRTIO_VRING_ALIGN);\n \n \trte_write16(vq->vq_queue_index, &dev->common_cfg->queue_select);\n \ndiff --git a/drivers/net/virtio/virtio_pci.h b/drivers/net/virtio/virtio_pci.h\nindex 68f36dc0dd..6cdf2c55dd 100644\n--- a/drivers/net/virtio/virtio_pci.h\n+++ b/drivers/net/virtio/virtio_pci.h\n@@ -122,9 +122,6 @@ struct virtio_pci_dev {\n  */\n #define VIRTIO_PCI_QUEUE_ADDR_SHIFT 12\n \n-/* The alignment to use between consumer and producer parts of vring. */\n-#define VIRTIO_PCI_VRING_ALIGN 4096\n-\n /*\n  * Function declaration from virtio_pci.c\n  */\ndiff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c\nindex c3dc3908d6..91794b8645 100644\n--- a/drivers/net/virtio/virtio_user_ethdev.c\n+++ b/drivers/net/virtio/virtio_user_ethdev.c\n@@ -388,7 +388,7 @@ virtio_user_setup_queue_packed(struct virtqueue *vq,\n \t\tsizeof(struct vring_packed_desc);\n \tused_addr = RTE_ALIGN_CEIL(avail_addr +\n \t\t\t   sizeof(struct vring_packed_desc_event),\n-\t\t\t   VIRTIO_PCI_VRING_ALIGN);\n+\t\t\t   VIRTIO_VRING_ALIGN);\n \tvring->num = vq->vq_nentries;\n \tvring->desc = (void *)(uintptr_t)desc_addr;\n \tvring->driver = (void *)(uintptr_t)avail_addr;\n@@ -410,7 +410,7 @@ virtio_user_setup_queue_split(struct virtqueue *vq, struct virtio_user_dev *dev)\n \tavail_addr = desc_addr + vq->vq_nentries * sizeof(struct vring_desc);\n \tused_addr = RTE_ALIGN_CEIL(avail_addr + offsetof(struct vring_avail,\n \t\t\t\t\t\t\t ring[vq->vq_nentries]),\n-\t\t\t\t   VIRTIO_PCI_VRING_ALIGN);\n+\t\t\t\t   VIRTIO_VRING_ALIGN);\n \n \tdev->vrings[queue_idx].num = vq->vq_nentries;\n \tdev->vrings[queue_idx].desc = (void *)(uintptr_t)desc_addr;\n",
    "prefixes": [
        "v4",
        "23/44"
    ]
}