get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 40511,
    "url": "http://patches.dpdk.org/api/patches/40511/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20180530083009.33942-1-roy.fan.zhang@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": "<20180530083009.33942-1-roy.fan.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180530083009.33942-1-roy.fan.zhang@intel.com",
    "date": "2018-05-30T08:30:09",
    "name": "[dpdk-dev,v2] net/i40e: fix link status update",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "7a5055c5e3545b3112ef534086ea72adf77481d9",
    "submitter": {
        "id": 304,
        "url": "http://patches.dpdk.org/api/people/304/?format=api",
        "name": "Fan Zhang",
        "email": "roy.fan.zhang@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20180530083009.33942-1-roy.fan.zhang@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/40511/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/40511/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 [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 3B0CB397D;\n\tWed, 30 May 2018 10:39:47 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n\tby dpdk.org (Postfix) with ESMTP id BCB843977;\n\tWed, 30 May 2018 10:39:45 +0200 (CEST)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t30 May 2018 01:39:44 -0700",
            "from silpixa00398673.ir.intel.com (HELO\n\tsilpixa00398673.ger.corp.intel.com) ([10.237.223.54])\n\tby fmsmga005.fm.intel.com with ESMTP; 30 May 2018 01:39:42 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.49,459,1520924400\"; d=\"scan'208\";a=\"232879595\"",
        "From": "Fan Zhang <roy.fan.zhang@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "helin.zhang@intel.com, roy.fan.zhang@intel.com, qi.z.zhang@intel.com,\n\tstable@dpdk.org",
        "Date": "Wed, 30 May 2018 09:30:09 +0100",
        "Message-Id": "<20180530083009.33942-1-roy.fan.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.13.6",
        "In-Reply-To": "<20180530082634.33843-1-roy.fan.zhang@intel.com>",
        "References": "<20180530082634.33843-1-roy.fan.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v2] net/i40e: fix link status update",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://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": "<https://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": "This patch fixes link status update problem in interrupt mode.\nPreviously, directly reading link status register instead of\naccessing via admin queue command may cause the link status\nchange interrupt callback inactive. This patch fixes the\nproblem by making the driver only read the register in\n\"no wait\" and polling mode.\n\nBugzilla ID 54, link https://dpdk.org/tracker/show_bug.cgi?id=54\n\nFixes: eef2daf2e199 (\"net/i40e: fix link update no wait\")\nCc: stable@dpdk.org\n\nSigned-off-by: Fan Zhang <roy.fan.zhang@intel.com>\n---\n drivers/net/i40e/i40e_ethdev.c | 14 +++++++-------\n 1 file changed, 7 insertions(+), 7 deletions(-)",
    "diff": "diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c\nindex 7d4f1c9da..13c5d3296 100644\n--- a/drivers/net/i40e/i40e_ethdev.c\n+++ b/drivers/net/i40e/i40e_ethdev.c\n@@ -2522,7 +2522,7 @@ i40e_dev_set_link_down(struct rte_eth_dev *dev)\n }\n \n static __rte_always_inline void\n-update_link_no_wait(struct i40e_hw *hw, struct rte_eth_link *link)\n+update_link_reg(struct i40e_hw *hw, struct rte_eth_link *link)\n {\n /* Link status registers and values*/\n #define I40E_PRTMAC_LINKSTA\t\t0x001E2420\n@@ -2576,8 +2576,8 @@ update_link_no_wait(struct i40e_hw *hw, struct rte_eth_link *link)\n }\n \n static __rte_always_inline void\n-update_link_wait(struct i40e_hw *hw, struct rte_eth_link *link,\n-\tbool enable_lse)\n+update_link_aq(struct i40e_hw *hw, struct rte_eth_link *link,\n+\tbool enable_lse, int wait_to_complete)\n {\n #define CHECK_INTERVAL             100  /* 100ms */\n #define MAX_REPEAT_TIME            10  /* 1s (10 * 100ms) in total */\n@@ -2601,7 +2601,7 @@ update_link_wait(struct i40e_hw *hw, struct rte_eth_link *link,\n \t\t}\n \n \t\tlink->link_status = link_status.link_info & I40E_AQ_LINK_UP;\n-\t\tif (unlikely(link->link_status != 0))\n+\t\tif (!wait_to_complete || link->link_status)\n \t\t\tbreak;\n \n \t\trte_delay_ms(CHECK_INTERVAL);\n@@ -2649,10 +2649,10 @@ i40e_dev_link_update(struct rte_eth_dev *dev,\n \tlink.link_autoneg = !(dev->data->dev_conf.link_speeds &\n \t\t\tETH_LINK_SPEED_FIXED);\n \n-\tif (!wait_to_complete)\n-\t\tupdate_link_no_wait(hw, &link);\n+\tif (!wait_to_complete && !enable_lse)\n+\t\tupdate_link_reg(hw, &link);\n \telse\n-\t\tupdate_link_wait(hw, &link, enable_lse);\n+\t\tupdate_link_aq(hw, &link, enable_lse, wait_to_complete);\n \n \tret = rte_eth_linkstatus_set(dev, &link);\n \ti40e_notify_all_vfs_link_status(dev);\n",
    "prefixes": [
        "dpdk-dev",
        "v2"
    ]
}