get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 41921,
    "url": "http://patches.dpdk.org/api/patches/41921/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180629092944.15576-9-johndale@cisco.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": "<20180629092944.15576-9-johndale@cisco.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180629092944.15576-9-johndale@cisco.com",
    "date": "2018-06-29T09:29:37",
    "name": "[v2,08/15] net/enic: use mbuf pointer array for inflight Tx packets",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "609c3d56cf174378e559b98849fcb1444f4474cd",
    "submitter": {
        "id": 359,
        "url": "http://patches.dpdk.org/api/people/359/?format=api",
        "name": "John Daley (johndale)",
        "email": "johndale@cisco.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180629092944.15576-9-johndale@cisco.com/mbox/",
    "series": [
        {
            "id": 308,
            "url": "http://patches.dpdk.org/api/series/308/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=308",
            "date": "2018-06-29T09:29:29",
            "name": "enic PMD fixes and performance improvements",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/308/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/41921/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/41921/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 BA22A1B445;\n\tFri, 29 Jun 2018 11:32:45 +0200 (CEST)",
            "from alln-iport-5.cisco.com (alln-iport-5.cisco.com\n\t[173.37.142.92]) by dpdk.org (Postfix) with ESMTP id 8BACC1B3A8\n\tfor <dev@dpdk.org>; Fri, 29 Jun 2018 11:32:43 +0200 (CEST)",
            "from rcdn-core-8.cisco.com ([173.37.93.144])\n\tby alln-iport-5.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t29 Jun 2018 09:32:42 +0000",
            "from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48])\n\tby rcdn-core-8.cisco.com (8.14.5/8.14.5) with ESMTP id w5T9WguZ002276;\n\tFri, 29 Jun 2018 09:32:42 GMT",
            "by cisco.com (Postfix, from userid 392789)\n\tid 6FDE520F2001; Fri, 29 Jun 2018 02:32:42 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n\td=cisco.com; i=@cisco.com; l=5369; q=dns/txt; s=iport;\n\tt=1530264763; x=1531474363;\n\th=from:to:cc:subject:date:message-id:in-reply-to: references;\n\tbh=QHbgNIWd75I/GbA8+MEab5/aPnDguym19LuocyGQPIM=;\n\tb=C+i+5Y9lZEAlfIGNMKtz/ruyzUL51i19+VBiOSVsEHid26KYjSlqgdku\n\ty/smLFjBTcDYYT/zrj7D+OUzhiIe3l8ZL0xcrbUtYYJb0VYK6uh9e8+FH\n\tGSbjwXAVgI9ktrTuzPDHXshaGxjYmnDrRuA2HMI8Lb4+66L1OkEAIarK0 8=;",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,285,1526342400\"; d=\"scan'208\";a=\"135790924\"",
        "From": "John Daley <johndale@cisco.com>",
        "To": "ferruh.yigit@intel.com",
        "Cc": "dev@dpdk.org, Hyong Youb Kim <hyonkim@cisco.com>",
        "Date": "Fri, 29 Jun 2018 02:29:37 -0700",
        "Message-Id": "<20180629092944.15576-9-johndale@cisco.com>",
        "X-Mailer": "git-send-email 2.16.2",
        "In-Reply-To": "<20180629092944.15576-1-johndale@cisco.com>",
        "References": "<20180628031940.17397-1-johndale@cisco.com>\n\t<20180629092944.15576-1-johndale@cisco.com>",
        "Subject": "[dpdk-dev] [PATCH v2 08/15] net/enic: use mbuf pointer array for\n\tinflight Tx packets",
        "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: Hyong Youb Kim <hyonkim@cisco.com>\n\nWQ is currently using vnic_wq_buf to store mbuf pointers for Tx\npackets. But, it contains an unused mempool pointer and mbuf is\nunnecessarily cast to void pointer. Remove vnic_wq_buf entirely and\nuse an mbuf pointer array instead.\n\nSigned-off-by: Hyong Youb Kim <hyonkim@cisco.com>\nReviewed-by: John Daley <johndale@cisco.com>\n---\n drivers/net/enic/base/vnic_wq.c |  8 ++++----\n drivers/net/enic/base/vnic_wq.h | 10 ++--------\n drivers/net/enic/enic_main.c    |  6 +++---\n drivers/net/enic/enic_rxtx.c    | 18 ++++++------------\n 4 files changed, 15 insertions(+), 27 deletions(-)",
    "diff": "diff --git a/drivers/net/enic/base/vnic_wq.c b/drivers/net/enic/base/vnic_wq.c\nindex d61c4c6e2..a4c08a769 100644\n--- a/drivers/net/enic/base/vnic_wq.c\n+++ b/drivers/net/enic/base/vnic_wq.c\n@@ -32,8 +32,8 @@ static int vnic_wq_alloc_bufs(struct vnic_wq *wq)\n {\n \tunsigned int count = wq->ring.desc_count;\n        /* Allocate the mbuf ring */\n-\twq->bufs = (struct vnic_wq_buf *)rte_zmalloc_socket(\"wq->bufs\",\n-\t\t    sizeof(struct vnic_wq_buf) * count,\n+\twq->bufs = (struct rte_mbuf **)rte_zmalloc_socket(\"wq->bufs\",\n+\t\t    sizeof(struct rte_mbuf *) * count,\n \t\t    RTE_CACHE_LINE_SIZE, wq->socket_id);\n \twq->head_idx = 0;\n \twq->tail_idx = 0;\n@@ -145,9 +145,9 @@ int vnic_wq_disable(struct vnic_wq *wq)\n }\n \n void vnic_wq_clean(struct vnic_wq *wq,\n-\t\t   void (*buf_clean)(struct vnic_wq_buf *buf))\n+\t\t   void (*buf_clean)(struct rte_mbuf **buf))\n {\n-\tstruct vnic_wq_buf *buf;\n+\tstruct rte_mbuf **buf;\n \tunsigned int  to_clean = wq->tail_idx;\n \n \tbuf = &wq->bufs[to_clean];\ndiff --git a/drivers/net/enic/base/vnic_wq.h b/drivers/net/enic/base/vnic_wq.h\nindex 0135bffc5..86ac10e28 100644\n--- a/drivers/net/enic/base/vnic_wq.h\n+++ b/drivers/net/enic/base/vnic_wq.h\n@@ -36,19 +36,13 @@ struct vnic_wq_ctrl {\n \tu32 pad9;\n };\n \n-/* 16 bytes */\n-struct vnic_wq_buf {\n-\tstruct rte_mempool *pool;\n-\tvoid *mb;\n-};\n-\n struct vnic_wq {\n \tunsigned int index;\n \tuint64_t tx_offload_notsup_mask;\n \tstruct vnic_dev *vdev;\n \tstruct vnic_wq_ctrl __iomem *ctrl;              /* memory-mapped */\n \tstruct vnic_dev_ring ring;\n-\tstruct vnic_wq_buf *bufs;\n+\tstruct rte_mbuf **bufs;\n \tunsigned int head_idx;\n \tunsigned int tail_idx;\n \tunsigned int socket_id;\n@@ -164,5 +158,5 @@ unsigned int vnic_wq_error_status(struct vnic_wq *wq);\n void vnic_wq_enable(struct vnic_wq *wq);\n int vnic_wq_disable(struct vnic_wq *wq);\n void vnic_wq_clean(struct vnic_wq *wq,\n-\t\t   void (*buf_clean)(struct vnic_wq_buf *buf));\n+\t\t   void (*buf_clean)(struct rte_mbuf **buf));\n #endif /* _VNIC_WQ_H_ */\ndiff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c\nindex e20256986..c03ec247a 100644\n--- a/drivers/net/enic/enic_main.c\n+++ b/drivers/net/enic/enic_main.c\n@@ -69,12 +69,12 @@ enic_rxmbuf_queue_release(__rte_unused struct enic *enic, struct vnic_rq *rq)\n \t}\n }\n \n-static void enic_free_wq_buf(struct vnic_wq_buf *buf)\n+static void enic_free_wq_buf(struct rte_mbuf **buf)\n {\n-\tstruct rte_mbuf *mbuf = (struct rte_mbuf *)buf->mb;\n+\tstruct rte_mbuf *mbuf = *buf;\n \n \trte_pktmbuf_free_seg(mbuf);\n-\tbuf->mb = NULL;\n+\t*buf = NULL;\n }\n \n static void enic_log_q_error(struct enic *enic)\ndiff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c\nindex bbb0444ad..549288c20 100644\n--- a/drivers/net/enic/enic_rxtx.c\n+++ b/drivers/net/enic/enic_rxtx.c\n@@ -473,7 +473,7 @@ enic_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,\n \n static inline void enic_free_wq_bufs(struct vnic_wq *wq, u16 completed_index)\n {\n-\tstruct vnic_wq_buf *buf;\n+\tstruct rte_mbuf *buf;\n \tstruct rte_mbuf *m, *free[ENIC_MAX_WQ_DESCS];\n \tunsigned int nb_to_free, nb_free = 0, i;\n \tstruct rte_mempool *pool;\n@@ -483,13 +483,10 @@ static inline void enic_free_wq_bufs(struct vnic_wq *wq, u16 completed_index)\n \tnb_to_free = enic_ring_sub(desc_count, wq->tail_idx, completed_index)\n \t\t\t\t   + 1;\n \ttail_idx = wq->tail_idx;\n-\tbuf = &wq->bufs[tail_idx];\n-\tpool = ((struct rte_mbuf *)buf->mb)->pool;\n+\tpool = wq->bufs[tail_idx]->pool;\n \tfor (i = 0; i < nb_to_free; i++) {\n-\t\tbuf = &wq->bufs[tail_idx];\n-\t\tm = rte_pktmbuf_prefree_seg((struct rte_mbuf *)(buf->mb));\n-\t\tbuf->mb = NULL;\n-\n+\t\tbuf = wq->bufs[tail_idx];\n+\t\tm = rte_pktmbuf_prefree_seg(buf);\n \t\tif (unlikely(m == NULL)) {\n \t\t\ttail_idx = enic_ring_incr(desc_count, tail_idx);\n \t\t\tcontinue;\n@@ -574,7 +571,6 @@ uint16_t enic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \tuint64_t ol_flags_mask;\n \tunsigned int wq_desc_avail;\n \tint head_idx;\n-\tstruct vnic_wq_buf *buf;\n \tunsigned int desc_count;\n \tstruct wq_enet_desc *descs, *desc_p, desc_tmp;\n \tuint16_t mss;\n@@ -669,8 +665,7 @@ uint16_t enic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \t\t\t\t vlan_id, 0);\n \n \t\t*desc_p = desc_tmp;\n-\t\tbuf = &wq->bufs[head_idx];\n-\t\tbuf->mb = (void *)tx_pkt;\n+\t\twq->bufs[head_idx] = tx_pkt;\n \t\thead_idx = enic_ring_incr(desc_count, head_idx);\n \t\twq_desc_avail--;\n \n@@ -691,8 +686,7 @@ uint16_t enic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \t\t\t\t\t\t 0);\n \n \t\t\t\t*desc_p = desc_tmp;\n-\t\t\t\tbuf = &wq->bufs[head_idx];\n-\t\t\t\tbuf->mb = (void *)tx_pkt;\n+\t\t\t\twq->bufs[head_idx] = tx_pkt;\n \t\t\t\thead_idx = enic_ring_incr(desc_count, head_idx);\n \t\t\t\twq_desc_avail--;\n \t\t\t}\n",
    "prefixes": [
        "v2",
        "08/15"
    ]
}