Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/63126/?format=api
https://patches.dpdk.org/api/patches/63126/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20191120092203.81886-1-lunyuanx.cui@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": "<20191120092203.81886-1-lunyuanx.cui@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20191120092203.81886-1-lunyuanx.cui@intel.com", "date": "2019-11-20T09:22:03", "name": "[v4] net/e1000: fix link status update", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "a1546dc5c4bbb2e14ac08d7af5f31eda76f540e5", "submitter": { "id": 1420, "url": "https://patches.dpdk.org/api/people/1420/?format=api", "name": "Cui, LunyuanX", "email": "lunyuanx.cui@intel.com" }, "delegate": { "id": 31221, "url": "https://patches.dpdk.org/api/users/31221/?format=api", "username": "yexl", "first_name": "xiaolong", "last_name": "ye", "email": "xiaolong.ye@intel.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20191120092203.81886-1-lunyuanx.cui@intel.com/mbox/", "series": [ { "id": 7531, "url": "https://patches.dpdk.org/api/series/7531/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=7531", "date": "2019-11-20T09:22:03", "name": "[v4] net/e1000: fix link status update", "version": 4, "mbox": "https://patches.dpdk.org/series/7531/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/63126/comments/", "check": "fail", "checks": "https://patches.dpdk.org/api/patches/63126/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 11719A04C1;\n\tWed, 20 Nov 2019 02:21:42 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E61803195;\n\tWed, 20 Nov 2019 02:21:40 +0100 (CET)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by dpdk.org (Postfix) with ESMTP id 406B0237;\n Wed, 20 Nov 2019 02:21:38 +0100 (CET)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 19 Nov 2019 17:21:36 -0800", "from intel.sh.intel.com ([10.239.255.129])\n by fmsmga002.fm.intel.com with ESMTP; 19 Nov 2019 17:21:35 -0800" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.69,220,1571727600\"; d=\"scan'208\";a=\"237546346\"", "From": "Lunyuan Cui <lunyuanx.cui@intel.com>", "To": "dev@dpdk.org", "Cc": "Wenzhuo Lu <wenzhuo.lu@intel.com>, Lunyuan Cui <lunyuanx.cui@intel.com>,\n stable@dpdk.org", "Date": "Wed, 20 Nov 2019 09:22:03 +0000", "Message-Id": "<20191120092203.81886-1-lunyuanx.cui@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20191118145801.78186-1-lunyuanx.cui@intel.com>", "References": "<20191118145801.78186-1-lunyuanx.cui@intel.com>", "Subject": "[dpdk-dev] [PATCH v4] net/e1000: 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://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "There is no need to judge the original link state,\nonly update the data according to the current link state.\nIt can maintain better robustness.\n\nIn addition, this patch change the variable\nfrom link_check to link_up.\n\nFixes: 80ba61115e77 (\"net/e1000: use link status helper functions\")\nCc: stable@dpdk.org\n\nSigned-off-by: Lunyuan Cui <lunyuanx.cui@intel.com>\n---\nv4:\n* modifier commit log\n\nv3:\n* Change the variable from link_check to link_up.\n\nv2\n* Delete incorrect judgment\n---\n drivers/net/e1000/em_ethdev.c | 16 ++++++++--------\n 1 file changed, 8 insertions(+), 8 deletions(-)", "diff": "diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c\nindex 9a88b50b2..080cbe2df 100644\n--- a/drivers/net/e1000/em_ethdev.c\n+++ b/drivers/net/e1000/em_ethdev.c\n@@ -1121,9 +1121,9 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)\n \tstruct e1000_hw *hw =\n \t\tE1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n \tstruct rte_eth_link link;\n-\tint link_check, count;\n+\tint link_up, count;\n \n-\tlink_check = 0;\n+\tlink_up = 0;\n \thw->mac.get_link_status = 1;\n \n \t/* possible wait-to-complete in up to 9 seconds */\n@@ -1133,31 +1133,31 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)\n \t\tcase e1000_media_type_copper:\n \t\t\t/* Do the work to read phy */\n \t\t\te1000_check_for_link(hw);\n-\t\t\tlink_check = !hw->mac.get_link_status;\n+\t\t\tlink_up = !hw->mac.get_link_status;\n \t\t\tbreak;\n \n \t\tcase e1000_media_type_fiber:\n \t\t\te1000_check_for_link(hw);\n-\t\t\tlink_check = (E1000_READ_REG(hw, E1000_STATUS) &\n+\t\t\tlink_up = (E1000_READ_REG(hw, E1000_STATUS) &\n \t\t\t\t\tE1000_STATUS_LU);\n \t\t\tbreak;\n \n \t\tcase e1000_media_type_internal_serdes:\n \t\t\te1000_check_for_link(hw);\n-\t\t\tlink_check = hw->mac.serdes_has_link;\n+\t\t\tlink_up = hw->mac.serdes_has_link;\n \t\t\tbreak;\n \n \t\tdefault:\n \t\t\tbreak;\n \t\t}\n-\t\tif (link_check || wait_to_complete == 0)\n+\t\tif (link_up || wait_to_complete == 0)\n \t\t\tbreak;\n \t\trte_delay_ms(EM_LINK_UPDATE_CHECK_INTERVAL);\n \t}\n \tmemset(&link, 0, sizeof(link));\n \n \t/* Now we check if a transition has happened */\n-\tif (link_check && (link.link_status == ETH_LINK_DOWN)) {\n+\tif (link_up) {\n \t\tuint16_t duplex, speed;\n \t\thw->mac.ops.get_link_up_info(hw, &speed, &duplex);\n \t\tlink.link_duplex = (duplex == FULL_DUPLEX) ?\n@@ -1167,7 +1167,7 @@ eth_em_link_update(struct rte_eth_dev *dev, int wait_to_complete)\n \t\tlink.link_status = ETH_LINK_UP;\n \t\tlink.link_autoneg = !(dev->data->dev_conf.link_speeds &\n \t\t\t\tETH_LINK_SPEED_FIXED);\n-\t} else if (!link_check && (link.link_status == ETH_LINK_UP)) {\n+\t} else {\n \t\tlink.link_speed = ETH_SPEED_NUM_NONE;\n \t\tlink.link_duplex = ETH_LINK_HALF_DUPLEX;\n \t\tlink.link_status = ETH_LINK_DOWN;\n", "prefixes": [ "v4" ] }{ "id": 63126, "url": "