get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2391,
    "url": "https://patches.dpdk.org/api/patches/2391/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1421747640-20978-2-git-send-email-danny.zhou@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": "<1421747640-20978-2-git-send-email-danny.zhou@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1421747640-20978-2-git-send-email-danny.zhou@intel.com",
    "date": "2015-01-20T09:53:56",
    "name": "[dpdk-dev,RFC,1/5] ethdev: add rx interrupt enable/disable functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b4847be1b15e82190cc15f62b9f7179282b6e6af",
    "submitter": {
        "id": 29,
        "url": "https://patches.dpdk.org/api/people/29/?format=api",
        "name": "Zhou, Danny",
        "email": "danny.zhou@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1421747640-20978-2-git-send-email-danny.zhou@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/2391/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/2391/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 1BE885A76;\n\tTue, 20 Jan 2015 10:54:14 +0100 (CET)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 8B6415A70\n\tfor <dev@dpdk.org>; Tue, 20 Jan 2015 10:54:11 +0100 (CET)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby orsmga101.jf.intel.com with ESMTP; 20 Jan 2015 01:54:10 -0800",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby orsmga001.jf.intel.com with ESMTP; 20 Jan 2015 01:54:09 -0800",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id t0K9s8Zo031936;\n\tTue, 20 Jan 2015 17:54:08 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid t0K9s4XW021021; Tue, 20 Jan 2015 17:54:06 +0800",
            "(from dyzhou@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t0K9s4xQ021017; \n\tTue, 20 Jan 2015 17:54:04 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.09,433,1418112000\"; d=\"scan'208\";a=\"639763958\"",
        "From": "Danny Zhou <danny.zhou@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue, 20 Jan 2015 17:53:56 +0800",
        "Message-Id": "<1421747640-20978-2-git-send-email-danny.zhou@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1421747640-20978-1-git-send-email-danny.zhou@intel.com>",
        "References": "<1421747640-20978-1-git-send-email-danny.zhou@intel.com>",
        "Subject": "[dpdk-dev] [RFC PATCH 1/5] ethdev: add rx interrupt enable/disable\n\tfunctions",
        "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": "Signed-off-by: Danny Zhou <danny.zhou@intel.com>\n---\n lib/librte_ether/rte_ethdev.c | 45 ++++++++++++++++++++++++++++++++++\n lib/librte_ether/rte_ethdev.h | 57 +++++++++++++++++++++++++++++++++++++++++++\n 2 files changed, 102 insertions(+)",
    "diff": "diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c\nindex 077d430..65ddd01 100644\n--- a/lib/librte_ether/rte_ethdev.c\n+++ b/lib/librte_ether/rte_ethdev.c\n@@ -2825,6 +2825,51 @@ _rte_eth_dev_callback_process(struct rte_eth_dev *dev,\n \t}\n \trte_spinlock_unlock(&rte_eth_dev_cb_lock);\n }\n+\n+int\n+rte_eth_dev_rx_queue_intr_enable(uint8_t port_id,\n+\t\t\t\tuint16_t queue_id)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tif (port_id >= nb_ports) {\n+\t\tPMD_DEBUG_TRACE(\"Invalid port_id=%d\\n\", port_id);\n+\t\treturn (-ENODEV);\n+\t}\n+\n+\tdev = &rte_eth_devices[port_id];\n+\tif (dev == NULL) {\n+\t\tPMD_DEBUG_TRACE(\"Invalid port device\\n\");\n+\t\treturn (-ENODEV);\n+\t}\n+\n+\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_intr_enable, -ENOTSUP);\n+\t(*dev->dev_ops->rx_queue_intr_enable)(dev, queue_id);\n+\treturn 0;\n+}\n+\n+int\n+rte_eth_dev_rx_queue_intr_disable(uint8_t port_id,\n+\t\t\t\tuint16_t queue_id)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tif (port_id >= nb_ports) {\n+\t\tPMD_DEBUG_TRACE(\"Invalid port_id=%d\\n\", port_id);\n+\t\treturn (-ENODEV);\n+\t}\n+\n+\tdev = &rte_eth_devices[port_id];\n+\tif (dev == NULL) {\n+\t\tPMD_DEBUG_TRACE(\"Invalid port device\\n\");\n+\t\treturn (-ENODEV);\n+\t}\n+\n+\tFUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_intr_disable, -ENOTSUP);\n+\t(*dev->dev_ops->rx_queue_intr_disable)(dev, queue_id);\n+\treturn 0;\n+}\n+\n #ifdef RTE_NIC_BYPASS\n int rte_eth_dev_bypass_init(uint8_t port_id)\n {\ndiff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h\nindex ce0528f..9e02a0c 100644\n--- a/lib/librte_ether/rte_ethdev.h\n+++ b/lib/librte_ether/rte_ethdev.h\n@@ -848,6 +848,8 @@ struct rte_eth_fdir {\n struct rte_intr_conf {\n \t/** enable/disable lsc interrupt. 0 (default) - disable, 1 enable */\n \tuint16_t lsc;\n+\t/** enable/disable rxq interrupt. 0 (default) - disable, 1 enable */\n+\tuint16_t rxq;\n };\n \n /**\n@@ -1117,6 +1119,14 @@ typedef int (*eth_tx_queue_setup_t)(struct rte_eth_dev *dev,\n \t\t\t\t    const struct rte_eth_txconf *tx_conf);\n /**< @internal Setup a transmit queue of an Ethernet device. */\n \n+typedef int (*eth_rx_enable_intr_t)(struct rte_eth_dev *dev,\n+\t\t\t\t    uint16_t rx_queue_id);\n+/**< @internal Enable interrupt of a receive queue of an Ethernet device. */\n+\n+typedef int (*eth_rx_disable_intr_t)(struct rte_eth_dev *dev,\n+\t\t\t\t    uint16_t rx_queue_id);\n+/**< @internal Disable interrupt of a receive queue of an Ethernet device. */\n+\n typedef void (*eth_queue_release_t)(void *queue);\n /**< @internal Release memory resources allocated by given RX/TX queue. */\n \n@@ -1467,6 +1477,8 @@ struct eth_dev_ops {\n \teth_queue_start_t          tx_queue_start;/**< Start TX for a queue.*/\n \teth_queue_stop_t           tx_queue_stop;/**< Stop TX for a queue.*/\n \teth_rx_queue_setup_t       rx_queue_setup;/**< Set up device RX queue.*/\n+\teth_rx_enable_intr_t       rx_queue_intr_enable; /**< Enable Rx queue interrupt. */\n+\teth_rx_disable_intr_t      rx_queue_intr_disable; /**< Disable Rx queue interrupt.*/\n \teth_queue_release_t        rx_queue_release;/**< Release RX queue.*/\n \teth_rx_queue_count_t       rx_queue_count; /**< Get Rx queue count. */\n \teth_rx_descriptor_done_t   rx_descriptor_done;  /**< Check rxd DD bit */\n@@ -2836,6 +2848,51 @@ void _rte_eth_dev_callback_process(struct rte_eth_dev *dev,\n \t\t\t\tenum rte_eth_event_type event);\n \n /**\n+ * When there is no rx packet coming in Rx Queue for a long time, we can\n+ * sleep lcore related to RX Queue for power saving, and enable rx interrupt\n+ * to be triggered when rx packect arrives.\n+ *\n+ * The rte_eth_dev_rx_queue_intr_enable() function enables rx queue\n+ * interrupt on specific rx queue of a port.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param queue_id\n+ *   The index of the receive queue from which to retrieve input packets.\n+ *   The value must be in the range [0, nb_rx_queue - 1] previously supplied\n+ *   to rte_eth_dev_configure().\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if underlying hardware OR driver doesn't support\n+ *     that operation.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ */\n+int rte_eth_dev_rx_queue_intr_enable(uint8_t port_id,\n+\t\t\t\tuint16_t queue_id);\n+\n+/**\n+ * When lcore wakes up from rx interrupt indicating packet coming, disable rx\n+ * interrupt and returns to polling mode.\n+ *\n+ * The rte_eth_dev_rx_queue_intr_disable() function disables rx queue\n+ * interrupt on specific rx queue of a port.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param queue_id\n+ *   The index of the receive queue from which to retrieve input packets.\n+ *   The value must be in the range [0, nb_rx_queue - 1] previously supplied\n+ *   to rte_eth_dev_configure().\n+ * @return\n+ *   - (0) if successful.\n+ *   - (-ENOTSUP) if underlying hardware OR driver doesn't support\n+ *     that operation.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ */\n+int rte_eth_dev_rx_queue_intr_disable(uint8_t port_id,\n+\t\t\t\tuint16_t queue_id);\n+\n+/**\n  * Turn on the LED on the Ethernet device.\n  * This function turns on the LED on the Ethernet device.\n  *\n",
    "prefixes": [
        "dpdk-dev",
        "RFC",
        "1/5"
    ]
}