Show a patch.

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

{
    "id": 41923,
    "url": "http://patches.dpdk.org/api/patches/41923/?format=api",
    "web_url": "http://patches.dpdk.org/patch/41923/",
    "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"
    },
    "msgid": "<20180629092944.15576-11-johndale@cisco.com>",
    "date": "2018-06-29T09:29:39",
    "name": "[v2,10/15] net/enic: reduce Tx completion updates",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "0797f3075c00704d8c976928a02a1d3dcca2ab1b",
    "submitter": {
        "id": 359,
        "url": "http://patches.dpdk.org/api/people/359/?format=api",
        "name": "John Daley",
        "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@intel.com"
    },
    "mbox": "http://patches.dpdk.org/patch/41923/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/41923/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/41923/checks/",
    "tags": {},
    "headers": {
        "X-Mailer": "git-send-email 2.16.2",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "From": "John Daley <johndale@cisco.com>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n\td=cisco.com; i=@cisco.com; l=3523; q=dns/txt; s=iport;\n\tt=1530264833; x=1531474433;\n\th=from:to:cc:subject:date:message-id:in-reply-to: references;\n\tbh=XLcASu8I4ktZf+E87DXX+AU6zxcN7ZrzWRMNlU//GfE=;\n\tb=aHILGaFpVKiBmIbr08ormSk5lpbcR1L4tWJ+gPl6QO57/zA4pKzc+1Mq\n\tWoiaOiPfdyHpaYRFX7JTfYyU/KqlK9tiR/NWkGY0pIS0Dz6AZ6PgYjM/o\n\tVrIGr57Sdp0q4gqSk0yzoStod5TI/nU2NBofEZObXY2XywuntZLH21nhd g=;",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Delivered-To": "patchwork@dpdk.org",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Cc": "dev@dpdk.org, Hyong Youb Kim <hyonkim@cisco.com>",
        "To": "ferruh.yigit@intel.com",
        "Errors-To": "dev-bounces@dpdk.org",
        "References": "<20180628031940.17397-1-johndale@cisco.com>\n\t<20180629092944.15576-1-johndale@cisco.com>",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-IronPort-AV": "E=Sophos;i=\"5.51,285,1526342400\"; d=\"scan'208\";a=\"414986588\"",
        "List-Post": "<mailto:dev@dpdk.org>",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 006991B45F;\n\tFri, 29 Jun 2018 11:33:54 +0200 (CEST)",
            "from rcdn-iport-8.cisco.com (rcdn-iport-8.cisco.com [173.37.86.79])\n\tby dpdk.org (Postfix) with ESMTP id 4AB5D1B14C\n\tfor <dev@dpdk.org>; Fri, 29 Jun 2018 11:33:53 +0200 (CEST)",
            "from rcdn-core-9.cisco.com ([173.37.93.145])\n\tby rcdn-iport-8.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t29 Jun 2018 09:33:52 +0000",
            "from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48])\n\tby rcdn-core-9.cisco.com (8.14.5/8.14.5) with ESMTP id w5T9Xqck027769;\n\tFri, 29 Jun 2018 09:33:52 GMT",
            "by cisco.com (Postfix, from userid 392789)\n\tid 576C220F2001; Fri, 29 Jun 2018 02:33:52 -0700 (PDT)"
        ],
        "Date": "Fri, 29 Jun 2018 02:29:39 -0700",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Subject": "[dpdk-dev] [PATCH v2 10/15] net/enic: reduce Tx completion updates",
        "In-Reply-To": "<20180629092944.15576-1-johndale@cisco.com>",
        "Message-Id": "<20180629092944.15576-11-johndale@cisco.com>",
        "Precedence": "list",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "X-Original-To": "patchwork@dpdk.org"
    },
    "content": "From: Hyong Youb Kim <hyonkim@cisco.com>\n\nRequest one completion update per roughly 32 buffers. It saves DMA\nresources on the NIC, PCIe utilization, and cache miss rates.\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 |  1 +\n drivers/net/enic/base/vnic_wq.h |  1 +\n drivers/net/enic/enic_res.h     |  3 +++\n drivers/net/enic/enic_rxtx.c    | 23 +++++++++++++++++------\n 4 files changed, 22 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/drivers/net/enic/base/vnic_wq.c b/drivers/net/enic/base/vnic_wq.c\nindex a4c08a769..c9bf3572c 100644\n--- a/drivers/net/enic/base/vnic_wq.c\n+++ b/drivers/net/enic/base/vnic_wq.c\n@@ -113,6 +113,7 @@ void vnic_wq_init(struct vnic_wq *wq, unsigned int cq_index,\n \tvnic_wq_init_start(wq, cq_index, 0, 0,\n \t\terror_interrupt_enable,\n \t\terror_interrupt_offset);\n+\twq->cq_pend = 0;\n \twq->last_completed_index = 0;\n }\n \ndiff --git a/drivers/net/enic/base/vnic_wq.h b/drivers/net/enic/base/vnic_wq.h\nindex 6622a8a2d..236cf6962 100644\n--- a/drivers/net/enic/base/vnic_wq.h\n+++ b/drivers/net/enic/base/vnic_wq.h\n@@ -44,6 +44,7 @@ struct vnic_wq {\n \tstruct vnic_dev_ring ring;\n \tstruct rte_mbuf **bufs;\n \tunsigned int head_idx;\n+\tunsigned int cq_pend;\n \tunsigned int tail_idx;\n \tunsigned int socket_id;\n \tconst struct rte_memzone *cqmsg_rz;\ndiff --git a/drivers/net/enic/enic_res.h b/drivers/net/enic/enic_res.h\nindex 6a3a0c5cc..6b1f6acad 100644\n--- a/drivers/net/enic/enic_res.h\n+++ b/drivers/net/enic/enic_res.h\n@@ -20,6 +20,9 @@\n #define ENIC_ALIGN_DESCS\t\t32\n #define ENIC_ALIGN_DESCS_MASK\t\t~(ENIC_ALIGN_DESCS - 1)\n \n+/* Request a completion index every 32 buffers (roughly packets) */\n+#define ENIC_WQ_CQ_THRESH\t\t32\n+\n #define ENIC_MIN_MTU\t\t\t68\n \n /* Does not include (possible) inserted VLAN tag and FCS */\ndiff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c\nindex 89a1e66fe..7cddb53d9 100644\n--- a/drivers/net/enic/enic_rxtx.c\n+++ b/drivers/net/enic/enic_rxtx.c\n@@ -603,7 +603,7 @@ uint16_t enic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \tstruct wq_enet_desc *descs, *desc_p, desc_tmp;\n \tuint16_t mss;\n \tuint8_t vlan_tag_insert;\n-\tuint8_t eop;\n+\tuint8_t eop, cq;\n \tuint64_t bus_addr;\n \tuint8_t offload_mode;\n \tuint16_t header_len;\n@@ -686,10 +686,14 @@ uint16_t enic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n-\n-\n+\t\twq->cq_pend++;\n+\t\tcq = 0;\n+\t\tif (eop && wq->cq_pend >= ENIC_WQ_CQ_THRESH) {\n+\t\t\tcq = 1;\n+\t\t\twq->cq_pend = 0;\n+\t\t}\n \t\twq_enet_desc_enc(&desc_tmp, bus_addr, data_len, mss, header_len,\n-\t\t\t\t offload_mode, eop, eop, 0, vlan_tag_insert,\n+\t\t\t\t offload_mode, eop, cq, 0, vlan_tag_insert,\n \t\t\t\t vlan_id, 0);\n \n \t\t*desc_p = desc_tmp;\n@@ -702,14 +706,21 @@ uint16_t enic_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n \t\t\t    tx_pkt->next) {\n \t\t\t\tdata_len = tx_pkt->data_len;\n \n-\t\t\t\tif (tx_pkt->next == NULL)\n+\t\t\t\twq->cq_pend++;\n+\t\t\t\tcq = 0;\n+\t\t\t\tif (tx_pkt->next == NULL) {\n \t\t\t\t\teop = 1;\n+\t\t\t\t\tif (wq->cq_pend >= ENIC_WQ_CQ_THRESH) {\n+\t\t\t\t\t\tcq = 1;\n+\t\t\t\t\t\twq->cq_pend = 0;\n+\t\t\t\t\t}\n+\t\t\t\t}\n \t\t\t\tdesc_p = descs + head_idx;\n \t\t\t\tbus_addr = (dma_addr_t)(tx_pkt->buf_iova\n \t\t\t\t\t   + tx_pkt->data_off);\n \t\t\t\twq_enet_desc_enc((struct wq_enet_desc *)\n \t\t\t\t\t\t &desc_tmp, bus_addr, data_len,\n-\t\t\t\t\t\t mss, 0, offload_mode, eop, eop,\n+\t\t\t\t\t\t mss, 0, offload_mode, eop, cq,\n \t\t\t\t\t\t 0, vlan_tag_insert, vlan_id,\n \t\t\t\t\t\t 0);\n \n",
    "prefixes": [
        "v2",
        "10/15"
    ]
}