get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 19845,
    "url": "https://patches.dpdk.org/api/patches/19845/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20170120160109.1088-2-bmcfall@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": "<20170120160109.1088-2-bmcfall@redhat.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20170120160109.1088-2-bmcfall@redhat.com",
    "date": "2017-01-20T16:01:07",
    "name": "[dpdk-dev,v3,1/3] ethdev: new API to free consumed buffers in Tx ring",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5dc023bbd1f7bde914eddf629a76317f7c6c302c",
    "submitter": {
        "id": 629,
        "url": "https://patches.dpdk.org/api/people/629/?format=api",
        "name": "Billy McFall",
        "email": "bmcfall@redhat.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20170120160109.1088-2-bmcfall@redhat.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/19845/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/19845/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id D566CF928;\n\tFri, 20 Jan 2017 17:01:26 +0100 (CET)",
            "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\tby dpdk.org (Postfix) with ESMTP id 8909ED59A\n\tfor <dev@dpdk.org>; Fri, 20 Jan 2017 17:01:16 +0100 (CET)",
            "from int-mx13.intmail.prod.int.phx2.redhat.com\n\t(int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 0152F3B470;\n\tFri, 20 Jan 2017 16:01:17 +0000 (UTC)",
            "from localhost.localdomain.com (ovpn-116-38.rdu2.redhat.com\n\t[10.10.116.38])\n\tby int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with\n\tESMTP id v0KG1C0L018757; Fri, 20 Jan 2017 11:01:16 -0500"
        ],
        "From": "Billy McFall <bmcfall@redhat.com>",
        "To": "thomas.monjalon@6wind.com, wenzhuo.lu@intel.com",
        "Cc": "dev@dpdk.org, Billy McFall <bmcfall@redhat.com>",
        "Date": "Fri, 20 Jan 2017 11:01:07 -0500",
        "Message-Id": "<20170120160109.1088-2-bmcfall@redhat.com>",
        "In-Reply-To": "<20170120160109.1088-1-bmcfall@redhat.com>",
        "References": "<20170120160109.1088-1-bmcfall@redhat.com>",
        "X-Scanned-By": "MIMEDefang 2.68 on 10.5.11.26",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.30]); Fri, 20 Jan 2017 16:01:17 +0000 (UTC)",
        "Subject": "[dpdk-dev] [PATCH v3 1/3] ethdev: new API to free consumed buffers\n\tin Tx ring",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Add a new API to force free consumed buffers on Tx ring. API will return\nthe number of packets freed (0-n) or error code if feature not supported\n(-ENOTSUP) or input invalid (-ENODEV).\n\nSigned-off-by: Billy McFall <bmcfall@redhat.com>\n---\n lib/librte_ether/rte_ethdev.c | 14 ++++++++++++++\n lib/librte_ether/rte_ethdev.h | 31 +++++++++++++++++++++++++++++++\n 2 files changed, 45 insertions(+)",
    "diff": "diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c\nindex 4790faf..10b907e 100644\n--- a/lib/librte_ether/rte_ethdev.c\n+++ b/lib/librte_ether/rte_ethdev.c\n@@ -1253,6 +1253,20 @@ rte_eth_tx_buffer_set_err_callback(struct rte_eth_dev_tx_buffer *buffer,\n }\n \n int\n+rte_eth_tx_done_cleanup(uint8_t port_id, uint16_t queue_id,  uint32_t free_cnt)\n+{\n+\tstruct rte_eth_dev *dev = &rte_eth_devices[port_id];\n+\n+\t/* Validate Input Data. Bail if not valid or not supported. */\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_done_cleanup, -ENOTSUP);\n+\n+\t/* Call driver to free pending mbufs. */\n+\treturn (*dev->dev_ops->tx_done_cleanup)(dev->data->tx_queues[queue_id],\n+\t\t\tfree_cnt);\n+}\n+\n+int\n rte_eth_tx_buffer_init(struct rte_eth_dev_tx_buffer *buffer, uint16_t size)\n {\n \tint ret = 0;\ndiff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h\nindex c17bbda..b23886c 100644\n--- a/lib/librte_ether/rte_ethdev.h\n+++ b/lib/librte_ether/rte_ethdev.h\n@@ -1183,6 +1183,9 @@ typedef int (*eth_fw_version_get_t)(struct rte_eth_dev *dev,\n \t\t\t\t     char *fw_version, size_t fw_size);\n /**< @internal Get firmware information of an Ethernet device. */\n \n+typedef int (*eth_tx_done_cleanup_t)(void *txq, uint32_t free_cnt);\n+/**< @internal Force mbufs to be from TX ring. */\n+\n typedef void (*eth_rxq_info_get_t)(struct rte_eth_dev *dev,\n \tuint16_t rx_queue_id, struct rte_eth_rxq_info *qinfo);\n \n@@ -1487,6 +1490,7 @@ struct eth_dev_ops {\n \teth_rx_disable_intr_t      rx_queue_intr_disable; /**< Disable Rx queue interrupt. */\n \teth_tx_queue_setup_t       tx_queue_setup;/**< Set up device TX queue. */\n \teth_queue_release_t        tx_queue_release; /**< Release TX queue. */\n+\teth_tx_done_cleanup_t      tx_done_cleanup;/**< Free tx ring mbufs */\n \n \teth_dev_led_on_t           dev_led_on;    /**< Turn on LED. */\n \teth_dev_led_off_t          dev_led_off;   /**< Turn off LED. */\n@@ -3091,6 +3095,33 @@ rte_eth_tx_buffer(uint8_t port_id, uint16_t queue_id,\n }\n \n /**\n+ * Request the driver to free mbufs currently cached by the driver. The\n+ * driver will only free the mbuf if it is no longer in use. It is the\n+ * application's responsibity to ensure rte_eth_tx_buffer_flush(..) is\n+ * called if needed.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param queue_id\n+ *   The index of the transmit queue through which output packets must be\n+ *   sent.\n+ *   The value must be in the range [0, nb_tx_queue - 1] previously supplied\n+ *   to rte_eth_dev_configure().\n+ * @param free_cnt\n+ *   Maximum number of packets to free. Use 0 to indicate all possible packets\n+ *   should be freed. Note that a packet may be using multiple mbufs.\n+ * @return\n+ *   Failure: < 0\n+ *     -ENODEV: Invalid interface\n+ *     -ENOTSUP: Driver does not support function\n+ *   Success: >= 0\n+ *     0-n: Number of packets freed. More packets may still remain in ring that\n+ *     are in use.\n+ */\n+int\n+rte_eth_tx_done_cleanup(uint8_t port_id, uint16_t queue_id,  uint32_t free_cnt);\n+\n+/**\n  * Configure a callback for buffered packets which cannot be sent\n  *\n  * Register a specific callback to be called when an attempt is made to send\n",
    "prefixes": [
        "dpdk-dev",
        "v3",
        "1/3"
    ]
}