get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 8082,
    "url": "https://patches.dpdk.org/api/patches/8082/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1445957897-26909-5-git-send-email-yong.liu@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": "<1445957897-26909-5-git-send-email-yong.liu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1445957897-26909-5-git-send-email-yong.liu@intel.com",
    "date": "2015-10-27T14:58:14",
    "name": "[dpdk-dev,v2,4/7] e1000: add rxq interrupt handler",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "a5ed145e4a7541b24bbf8927f970876cc850aff4",
    "submitter": {
        "id": 17,
        "url": "https://patches.dpdk.org/api/people/17/?format=api",
        "name": "Marvin Liu",
        "email": "yong.liu@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1445957897-26909-5-git-send-email-yong.liu@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/8082/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/8082/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 12DD08E67;\n\tTue, 27 Oct 2015 15:58:44 +0100 (CET)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id E9EA48E65\n\tfor <dev@dpdk.org>; Tue, 27 Oct 2015 15:58:41 +0100 (CET)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga101.jf.intel.com with ESMTP; 27 Oct 2015 07:58:33 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga001.fm.intel.com with ESMTP; 27 Oct 2015 07:58:33 -0700",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id t9REwUmp020156;\n\tTue, 27 Oct 2015 22:58:30 +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 t9REwRod026973; Tue, 27 Oct 2015 22:58:29 +0800",
            "(from yliu84x@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t9REwRMp026969; \n\tTue, 27 Oct 2015 22:58:27 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.20,205,1444719600\"; d=\"scan'208\";a=\"820560822\"",
        "From": "Yong Liu <yong.liu@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Tue, 27 Oct 2015 22:58:14 +0800",
        "Message-Id": "<1445957897-26909-5-git-send-email-yong.liu@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1445957897-26909-1-git-send-email-yong.liu@intel.com>",
        "References": "<1445957897-26909-1-git-send-email-yong.liu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2 4/7] e1000: add rxq interrupt handler",
        "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": "When datapath rxq interupt is enabled, enable related device rxq.\nRemove the interrupt handler after device stopped.\n\nSigned-off-by: Marvin Liu <yong.liu@intel.com>",
    "diff": "diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c\nindex 6dc2534..fc3cc1e 100644\n--- a/drivers/net/e1000/em_ethdev.c\n+++ b/drivers/net/e1000/em_ethdev.c\n@@ -501,7 +501,9 @@ eth_em_start(struct rte_eth_dev *dev)\n \t\tE1000_DEV_PRIVATE(dev->data->dev_private);\n \tstruct e1000_hw *hw =\n \t\tE1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tstruct rte_intr_handle *intr_handle = &dev->pci_dev->intr_handle;\n \tint ret, mask;\n+\tuint32_t intr_vector = 0;\n \n \tPMD_INIT_FUNC_TRACE();\n \n@@ -537,6 +539,26 @@ eth_em_start(struct rte_eth_dev *dev)\n \t/* Configure for OS presence */\n \tem_init_manageability(hw);\n \n+\tif (dev->data->dev_conf.intr_conf.rxq != 0) {\n+\t\tintr_vector = dev->data->nb_rx_queues;\n+\t\tif (rte_intr_efd_enable(intr_handle, intr_vector))\n+\t\t\treturn -1;\n+\t}\n+\n+\tif (rte_intr_dp_is_en(intr_handle)) {\n+\t\tintr_handle->intr_vec =\n+\t\t\trte_zmalloc(\"intr_vec\",\n+\t\t\t\t\tdev->data->nb_rx_queues * sizeof(int), 0);\n+\t\tif (intr_handle->intr_vec == NULL) {\n+\t\t\tPMD_INIT_LOG(ERR, \"Failed to allocate %d rx_queues\"\n+\t\t\t\t\t\t\" intr_vec\\n\", dev->data->nb_rx_queues);\n+\t\t\treturn -ENOMEM;\n+\t\t}\n+\n+\t\t/* enable rx interrupt */\n+\t\tem_rxq_intr_enable(hw);\n+\t}\n+\n \teth_em_tx_init(dev);\n \n \tret = eth_em_rx_init(dev);\n@@ -621,6 +643,8 @@ eth_em_start(struct rte_eth_dev *dev)\n \tif (dev->data->dev_conf.intr_conf.rxq != 0)\n \t\teth_em_rxq_interrupt_setup(dev);\n \n+\trte_intr_enable(intr_handle);\n+\n \tadapter->stopped = 0;\n \n \tPMD_INIT_LOG(DEBUG, \"<<\");\n@@ -646,6 +670,7 @@ eth_em_stop(struct rte_eth_dev *dev)\n {\n \tstruct rte_eth_link link;\n \tstruct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tstruct rte_intr_handle *intr_handle = &dev->pci_dev->intr_handle;\n \n \tem_rxq_intr_disable(hw);\n \tem_lsc_intr_disable(hw);\n@@ -662,6 +687,13 @@ eth_em_stop(struct rte_eth_dev *dev)\n \t/* clear the recorded link status */\n \tmemset(&link, 0, sizeof(link));\n \trte_em_dev_atomic_write_link_status(dev, &link);\n+\n+\t/* Clean datapath event and queue/vec mapping */\n+\trte_intr_efd_disable(intr_handle);\n+\tif (intr_handle->intr_vec != NULL) {\n+\t\trte_free(intr_handle->intr_vec);\n+\t\tintr_handle->intr_vec = NULL;\n+\t}\n }\n \n static void\n",
    "prefixes": [
        "dpdk-dev",
        "v2",
        "4/7"
    ]
}