get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 64044,
    "url": "http://patches.dpdk.org/api/patches/64044/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20191220031535.19274-4-chenxux.di@intel.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": "<20191220031535.19274-4-chenxux.di@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191220031535.19274-4-chenxux.di@intel.com",
    "date": "2019-12-20T03:15:33",
    "name": "[v3,3/5] net/ice: cleanup Tx buffers",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "7ae24a24e4d940d5dbfe6c234e46c9de6b8f1a93",
    "submitter": {
        "id": 1409,
        "url": "http://patches.dpdk.org/api/people/1409/?format=api",
        "name": "Chenxu Di",
        "email": "chenxux.di@intel.com"
    },
    "delegate": {
        "id": 31221,
        "url": "http://patches.dpdk.org/api/users/31221/?format=api",
        "username": "yexl",
        "first_name": "xiaolong",
        "last_name": "ye",
        "email": "xiaolong.ye@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20191220031535.19274-4-chenxux.di@intel.com/mbox/",
    "series": [
        {
            "id": 7902,
            "url": "http://patches.dpdk.org/api/series/7902/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=7902",
            "date": "2019-12-20T03:15:30",
            "name": "drivers/net: cleanup Tx buffers",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/7902/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/64044/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/64044/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id C88C3A04F3;\n\tFri, 20 Dec 2019 04:20:29 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 1BA651BF90;\n\tFri, 20 Dec 2019 04:20:18 +0100 (CET)",
            "from mga17.intel.com (mga17.intel.com [192.55.52.151])\n by dpdk.org (Postfix) with ESMTP id 76C541BF78\n for <dev@dpdk.org>; Fri, 20 Dec 2019 04:20:14 +0100 (CET)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 19 Dec 2019 19:20:14 -0800",
            "from intel.sh.intel.com ([10.239.255.149])\n by orsmga001.jf.intel.com with ESMTP; 19 Dec 2019 19:20:12 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.69,334,1571727600\"; d=\"scan'208\";a=\"298908326\"",
        "From": "Chenxu Di <chenxux.di@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Yang Qiming <qiming.yang@intel.com>,\n\tChenxu Di <chenxux.di@intel.com>",
        "Date": "Fri, 20 Dec 2019 03:15:33 +0000",
        "Message-Id": "<20191220031535.19274-4-chenxux.di@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20191220031535.19274-1-chenxux.di@intel.com>",
        "References": "<20191203055134.72874-1-chenxux.di@intel.com>\n <20191220031535.19274-1-chenxux.di@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v3 3/5] net/ice: cleanup Tx buffers",
        "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 <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": "Add support to the ice driver for the API rte_eth_tx_done_cleanup\n to force free consumed buffers on Tx ring.\n\nSigned-off-by: Chenxu Di <chenxux.di@intel.com>\n---\n drivers/net/ice/ice_ethdev.c |  1 +\n drivers/net/ice/ice_rxtx.c   | 41 ++++++++++++++++++++++++++++++++++++\n drivers/net/ice/ice_rxtx.h   |  1 +\n 3 files changed, 43 insertions(+)",
    "diff": "diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c\nindex de189daba..b55cdbf74 100644\n--- a/drivers/net/ice/ice_ethdev.c\n+++ b/drivers/net/ice/ice_ethdev.c\n@@ -220,6 +220,7 @@ static const struct eth_dev_ops ice_eth_dev_ops = {\n \t.filter_ctrl                  = ice_dev_filter_ctrl,\n \t.udp_tunnel_port_add          = ice_dev_udp_tunnel_port_add,\n \t.udp_tunnel_port_del          = ice_dev_udp_tunnel_port_del,\n+\t.tx_done_cleanup              = ice_tx_done_cleanup,\n };\n \n /* store statistics names and its offset in stats structure */\ndiff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c\nindex 2db174456..154cc5e5f 100644\n--- a/drivers/net/ice/ice_rxtx.c\n+++ b/drivers/net/ice/ice_rxtx.c\n@@ -863,6 +863,47 @@ ice_fdir_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)\n \treturn 0;\n }\n \n+\n+int ice_tx_done_cleanup(void *txq, uint32_t free_cnt)\n+{\n+\tstruct ice_tx_queue *q = (struct ice_tx_queue *)txq;\n+\tstruct ice_tx_entry *sw_ring;\n+\tuint16_t tx_id;    /* Current segment being processed. */\n+\tuint16_t tx_cleaned;\n+\n+\tint count = 0;\n+\n+\tif (q == NULL)\n+\t\treturn -ENODEV;\n+\n+\tsw_ring = q->sw_ring;\n+\ttx_cleaned = q->last_desc_cleaned;\n+\ttx_id = sw_ring[q->last_desc_cleaned].next_id;\n+\tif ((q->tx_ring[tx_id].cmd_type_offset_bsz &\n+\t\t\trte_cpu_to_le_64(ICE_TXD_QW1_DTYPE_M)) !=\n+\t\t\trte_cpu_to_le_64(ICE_TX_DESC_DTYPE_DESC_DONE))\n+\t\treturn 0;\n+\n+\tdo {\n+\t\tif (sw_ring[tx_id].mbuf == NULL)\n+\t\t\tbreak;\n+\n+\t\trte_pktmbuf_free_seg(sw_ring[tx_id].mbuf);\n+\t\tsw_ring[tx_id].mbuf = NULL;\n+\t\tsw_ring[tx_id].last_id = tx_id;\n+\n+\t\t/* Move to next segemnt. */\n+\t\ttx_cleaned = tx_id;\n+\t\ttx_id = sw_ring[tx_id].next_id;\n+\t\tcount++;\n+\t} while (count != (int)free_cnt);\n+\n+\tq->nb_tx_free += (uint16_t)count;\n+\tq->last_desc_cleaned = tx_cleaned;\n+\n+\treturn count;\n+}\n+\n int\n ice_rx_queue_setup(struct rte_eth_dev *dev,\n \t\t   uint16_t queue_idx,\ndiff --git a/drivers/net/ice/ice_rxtx.h b/drivers/net/ice/ice_rxtx.h\nindex 9e3d2cd07..8d4232a61 100644\n--- a/drivers/net/ice/ice_rxtx.h\n+++ b/drivers/net/ice/ice_rxtx.h\n@@ -183,6 +183,7 @@ int ice_rx_descriptor_status(void *rx_queue, uint16_t offset);\n int ice_tx_descriptor_status(void *tx_queue, uint16_t offset);\n void ice_set_default_ptype_table(struct rte_eth_dev *dev);\n const uint32_t *ice_dev_supported_ptypes_get(struct rte_eth_dev *dev);\n+int ice_tx_done_cleanup(void *txq, uint32_t free_cnt);\n \n int ice_rx_vec_dev_check(struct rte_eth_dev *dev);\n int ice_tx_vec_dev_check(struct rte_eth_dev *dev);\n",
    "prefixes": [
        "v3",
        "3/5"
    ]
}