get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 14011,
    "url": "http://patches.dpdk.org/api/patches/14011/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1466403870-6840-4-git-send-email-wenzhuo.lu@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": "<1466403870-6840-4-git-send-email-wenzhuo.lu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1466403870-6840-4-git-send-email-wenzhuo.lu@intel.com",
    "date": "2016-06-20T06:24:29",
    "name": "[dpdk-dev,v6,3/4] igb: implement device reset on VF",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "6e908a6febc67f4071fc4f87acaf9da1c92c4065",
    "submitter": {
        "id": 258,
        "url": "http://patches.dpdk.org/api/people/258/?format=api",
        "name": "Wenzhuo Lu",
        "email": "wenzhuo.lu@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1466403870-6840-4-git-send-email-wenzhuo.lu@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/14011/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/14011/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 979959AE7;\n\tMon, 20 Jun 2016 08:24:56 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 193F69AE0\n\tfor <dev@dpdk.org>; Mon, 20 Jun 2016 08:24:48 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby fmsmga101.fm.intel.com with ESMTP; 19 Jun 2016 23:24:48 -0700",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby FMSMGA003.fm.intel.com with ESMTP; 19 Jun 2016 23:24:45 -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 u5K6OgF4002678;\n\tMon, 20 Jun 2016 14:24:42 +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 u5K6OcvK006895; Mon, 20 Jun 2016 14:24:40 +0800",
            "(from wenzhuol@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id u5K6Oc3w006891; \n\tMon, 20 Jun 2016 14:24:38 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.26,496,1459839600\"; d=\"scan'208\";a=\"722072657\"",
        "From": "Wenzhuo Lu <wenzhuo.lu@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "konstantin.ananyev@intel.com, bruce.richardson@intel.com,\n\tjing.d.chen@intel.com, cunming.liang@intel.com, jingjing.wu@intel.com,\n\thelin.zhang@intel.com, thomas.monjalon@6wind.com,\n\tWenzhuo Lu <wenzhuo.lu@intel.com>",
        "Date": "Mon, 20 Jun 2016 14:24:29 +0800",
        "Message-Id": "<1466403870-6840-4-git-send-email-wenzhuo.lu@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1466403870-6840-1-git-send-email-wenzhuo.lu@intel.com>",
        "References": "<1465191653-28408-1-git-send-email-wenzhuo.lu@intel.com>\n\t<1466403870-6840-1-git-send-email-wenzhuo.lu@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v6 3/4] igb: implement device reset on VF",
        "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": "Implement the device reset function.\n\nSigned-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>\n---\n doc/guides/rel_notes/release_16_07.rst |  2 +-\n drivers/net/e1000/igb_ethdev.c         | 59 ++++++++++++++++++++++++++++++++++\n 2 files changed, 60 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/doc/guides/rel_notes/release_16_07.rst b/doc/guides/rel_notes/release_16_07.rst\nindex d36c4b1..a4c0cc3 100644\n--- a/doc/guides/rel_notes/release_16_07.rst\n+++ b/doc/guides/rel_notes/release_16_07.rst\n@@ -53,7 +53,7 @@ New Features\n   VF. To handle this link up/down event, add the mailbox interruption\n   support to receive the message.\n \n-* **Added device reset support for ixgbe VF.**\n+* **Added device reset support for ixgbe/igb VF.**\n \n   Added the device reset API. APP can call this API to reset the VF port\n   when it's not working.\ndiff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c\nindex b0e5e6a..f1ac4b5 100644\n--- a/drivers/net/e1000/igb_ethdev.c\n+++ b/drivers/net/e1000/igb_ethdev.c\n@@ -268,6 +268,7 @@ static void eth_igb_configure_msix_intr(struct rte_eth_dev *dev);\n static void eth_igbvf_interrupt_handler(struct rte_intr_handle *handle,\n \t\t\t\t\tvoid *param);\n static void igbvf_mbx_process(struct rte_eth_dev *dev);\n+static int igbvf_dev_reset(struct rte_eth_dev *dev);\n \n /*\n  * Define VF Stats MACRO for Non \"cleared on read\" register\n@@ -409,6 +410,7 @@ static const struct eth_dev_ops igbvf_eth_dev_ops = {\n \t.mac_addr_set         = igbvf_default_mac_addr_set,\n \t.get_reg_length       = igbvf_get_reg_length,\n \t.get_reg              = igbvf_get_regs,\n+\t.dev_reset            = igbvf_dev_reset,\n };\n \n /* store statistics names and its offset in stats structure */\n@@ -2655,6 +2657,63 @@ void igbvf_mbx_process(struct rte_eth_dev *dev)\n }\n \n static int\n+igbvf_dev_reset(struct rte_eth_dev *dev)\n+{\n+\tstruct e1000_hw *hw =\n+\t\tE1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\tint diag = 0;\n+\tuint32_t eiam;\n+\t/* Reference igbvf_intr_enable */\n+\tuint32_t eiam_mbx = 1 << E1000_VTIVAR_MISC_MAILBOX;\n+\n+\t/* Nothing needs to be done if the device is not started. */\n+\tif (!dev->data->dev_started)\n+\t\treturn 0;\n+\n+\tPMD_DRV_LOG(DEBUG, \"Link up/down event detected.\");\n+\n+\t/* Performance VF reset. */\n+\tdo {\n+\t\tdev->data->dev_started = 0;\n+\t\tigbvf_dev_stop(dev);\n+\t\tif (dev->data->dev_conf.intr_conf.lsc == 0)\n+\t\t\tdiag = eth_igb_link_update(dev, 0);\n+\t\tif (diag) {\n+\t\t\tPMD_INIT_LOG(INFO, \"Igb VF reset: \"\n+\t\t\t\t     \"Failed to update link.\");\n+\t\t}\n+\t\trte_delay_ms(1000);\n+\n+\t\tdiag = igbvf_dev_start(dev);\n+\t\tif (diag) {\n+\t\t\tPMD_INIT_LOG(ERR, \"Igb VF reset: \"\n+\t\t\t\t     \"Failed to start device.\");\n+\t\t\treturn diag;\n+\t\t}\n+\t\tdev->data->dev_started = 1;\n+\t\teth_igbvf_stats_reset(dev);\n+\t\tif (dev->data->dev_conf.intr_conf.lsc == 0)\n+\t\t\tdiag = eth_igb_link_update(dev, 0);\n+\t\tif (diag) {\n+\t\t\tPMD_INIT_LOG(INFO, \"Igb VF reset: \"\n+\t\t\t\t     \"Failed to update link.\");\n+\t\t}\n+\n+\t\t/**\n+\t\t * When the PF link is down, there has chance\n+\t\t * that VF cannot operate its registers. Will\n+\t\t * check if the registers is written\n+\t\t * successfully. If not, repeat stop/start until\n+\t\t * the PF link is up, in other words, until the\n+\t\t * registers can be written.\n+\t\t */\n+\t\teiam = E1000_READ_REG(hw, E1000_EIAM);\n+\t} while (!(eiam & eiam_mbx));\n+\n+\treturn 0;\n+}\n+\n+static int\n eth_igbvf_interrupt_action(struct rte_eth_dev *dev)\n {\n \tstruct e1000_interrupt *intr =\n",
    "prefixes": [
        "dpdk-dev",
        "v6",
        "3/4"
    ]
}