get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 13632,
    "url": "https://patches.dpdk.org/api/patches/13632/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1465897108-26548-3-git-send-email-reshma.pattan@intel.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": "<1465897108-26548-3-git-send-email-reshma.pattan@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1465897108-26548-3-git-send-email-reshma.pattan@intel.com",
    "date": "2016-06-14T09:38:22",
    "name": "[dpdk-dev,v9,2/8] ethdev: add new api to add Rx callback as head of the list",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "043be635cd72e19ef6ed2a10795eebaff8ee564f",
    "submitter": {
        "id": 70,
        "url": "https://patches.dpdk.org/api/people/70/?format=api",
        "name": "Pattan, Reshma",
        "email": "reshma.pattan@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1465897108-26548-3-git-send-email-reshma.pattan@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/13632/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/13632/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 DA0146CC7;\n\tTue, 14 Jun 2016 11:38:37 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id C3F536CC4\n\tfor <dev@dpdk.org>; Tue, 14 Jun 2016 11:38:35 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga103.jf.intel.com with ESMTP; 14 Jun 2016 02:38:34 -0700",
            "from irvmail001.ir.intel.com ([163.33.26.43])\n\tby orsmga001.jf.intel.com with ESMTP; 14 Jun 2016 02:38:33 -0700",
            "from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com\n\t[10.237.217.46])\n\tby irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id\n\tu5E9cX85020243; Tue, 14 Jun 2016 10:38:33 +0100",
            "from sivswdev02.ir.intel.com (localhost [127.0.0.1])\n\tby sivswdev02.ir.intel.com with ESMTP id u5E9cX4F026610;\n\tTue, 14 Jun 2016 10:38:33 +0100",
            "(from reshmapa@localhost)\n\tby sivswdev02.ir.intel.com with  id u5E9cXrH026606;\n\tTue, 14 Jun 2016 10:38:33 +0100"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.26,470,1459839600\"; d=\"scan'208\";a=\"975243878\"",
        "From": "Reshma Pattan <reshma.pattan@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Reshma Pattan <reshma.pattan@intel.com>",
        "Date": "Tue, 14 Jun 2016 10:38:22 +0100",
        "Message-Id": "<1465897108-26548-3-git-send-email-reshma.pattan@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1465897108-26548-1-git-send-email-reshma.pattan@intel.com>",
        "References": "<1465575534-23605-1-git-send-email-reshma.pattan@intel.com>\n\t<1465897108-26548-1-git-send-email-reshma.pattan@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v9 2/8] ethdev: add new api to add Rx callback as\n\thead of the list",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <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": "Added new public api rte_eth_add_first_rx_callback to add given\ncallback as head of the list.\n\nSigned-off-by: Reshma Pattan <reshma.pattan@intel.com>\n---\n lib/librte_ether/rte_ethdev.c          | 35 ++++++++++++++++++++++++++++++++++\n lib/librte_ether/rte_ethdev.h          | 28 +++++++++++++++++++++++++++\n lib/librte_ether/rte_ether_version.map |  6 ++++++\n 3 files changed, 69 insertions(+)",
    "diff": "diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c\nindex ce70d58..97d167e 100644\n--- a/lib/librte_ether/rte_ethdev.c\n+++ b/lib/librte_ether/rte_ethdev.c\n@@ -2939,6 +2939,41 @@ rte_eth_add_rx_callback(uint8_t port_id, uint16_t queue_id,\n }\n \n void *\n+rte_eth_add_first_rx_callback(uint8_t port_id, uint16_t queue_id,\n+\t\trte_rx_callback_fn fn, void *user_param)\n+{\n+#ifndef RTE_ETHDEV_RXTX_CALLBACKS\n+\trte_errno = ENOTSUP;\n+\treturn NULL;\n+#endif\n+\t/* check input parameters */\n+\tif (!rte_eth_dev_is_valid_port(port_id) || fn == NULL ||\n+\t\tqueue_id >= rte_eth_devices[port_id].data->nb_rx_queues) {\n+\t\trte_errno = EINVAL;\n+\t\treturn NULL;\n+\t}\n+\n+\tstruct rte_eth_rxtx_callback *cb = rte_zmalloc(NULL, sizeof(*cb), 0);\n+\n+\tif (cb == NULL) {\n+\t\trte_errno = ENOMEM;\n+\t\treturn NULL;\n+\t}\n+\n+\tcb->fn.rx = fn;\n+\tcb->param = user_param;\n+\n+\trte_spinlock_lock(&rte_eth_rx_cb_lock);\n+\t/* Add the callbacks at fisrt position*/\n+\tcb->next = rte_eth_devices[port_id].post_rx_burst_cbs[queue_id];\n+\trte_smp_wmb();\n+\trte_eth_devices[port_id].post_rx_burst_cbs[queue_id] = cb;\n+\trte_spinlock_unlock(&rte_eth_rx_cb_lock);\n+\n+\treturn cb;\n+}\n+\n+void *\n rte_eth_add_tx_callback(uint8_t port_id, uint16_t queue_id,\n \t\trte_tx_callback_fn fn, void *user_param)\n {\ndiff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h\nindex 2757510..237e6ef 100644\n--- a/lib/librte_ether/rte_ethdev.h\n+++ b/lib/librte_ether/rte_ethdev.h\n@@ -3825,6 +3825,34 @@ int rte_eth_dev_get_dcb_info(uint8_t port_id,\n void *rte_eth_add_rx_callback(uint8_t port_id, uint16_t queue_id,\n \t\trte_rx_callback_fn fn, void *user_param);\n \n+/*\n+* Add a callback that must be called first on packet RX on a given port\n+* and queue.\n+*\n+* This API configures a first function to be called for each burst of\n+* packets received on a given NIC port queue. The return value is a pointer\n+* that can be used to later remove the callback using\n+* rte_eth_remove_rx_callback().\n+*\n+* Multiple functions are called in the order that they are added.\n+*\n+* @param port_id\n+*   The port identifier of the Ethernet device.\n+* @param queue_id\n+*   The queue on the Ethernet device on which the callback is to be added.\n+* @param fn\n+*   The callback function\n+* @param user_param\n+*   A generic pointer parameter which will be passed to each invocation of the\n+*   callback function on this port and queue.\n+*\n+* @return\n+*   NULL on error.\n+*   On success, a pointer value which can later be used to remove the callback.\n+*/\n+void *rte_eth_add_first_rx_callback(uint8_t port_id, uint16_t queue_id,\n+\t\trte_rx_callback_fn fn, void *user_param);\n+\n /**\n  * Add a callback to be called on packet TX on a given port and queue.\n  *\ndiff --git a/lib/librte_ether/rte_ether_version.map b/lib/librte_ether/rte_ether_version.map\nindex 214ecc7..c990b04 100644\n--- a/lib/librte_ether/rte_ether_version.map\n+++ b/lib/librte_ether/rte_ether_version.map\n@@ -132,3 +132,9 @@ DPDK_16.04 {\n \trte_eth_tx_buffer_set_err_callback;\n \n } DPDK_2.2;\n+\n+DPDK_16.07 {\n+\tglobal:\n+\n+\trte_eth_add_first_rx_callback;\n+} DPDK_16.04;\n",
    "prefixes": [
        "dpdk-dev",
        "v9",
        "2/8"
    ]
}