Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/326/?format=api
https://patches.dpdk.org/api/patches/326/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1410247299-4365-14-git-send-email-helin.zhang@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": "<1410247299-4365-14-git-send-email-helin.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1410247299-4365-14-git-send-email-helin.zhang@intel.com", "date": "2014-09-09T07:21:37", "name": "[dpdk-dev,13/15] i40e: Use get_link_status to report FC settings", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "c19c4f52393877c7c3dc732e8a1cb943b067d044", "submitter": { "id": 14, "url": "https://patches.dpdk.org/api/people/14/?format=api", "name": "Zhang, Helin", "email": "helin.zhang@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1410247299-4365-14-git-send-email-helin.zhang@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/326/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/326/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 ED9C8B3D3;\n\tTue, 9 Sep 2014 09:17:25 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 8B8AAB3C4\n\tfor <dev@dpdk.org>; Tue, 9 Sep 2014 09:17:24 +0200 (CEST)", "from azsmga001.ch.intel.com ([10.2.17.19])\n\tby orsmga101.jf.intel.com with ESMTP; 09 Sep 2014 00:22:20 -0700", "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby azsmga001.ch.intel.com with ESMTP; 09 Sep 2014 00:22:19 -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 s897MI0r008892;\n\tTue, 9 Sep 2014 15:22:18 +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 s897MFHR004518; Tue, 9 Sep 2014 15:22:18 +0800", "(from hzhan75@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s897MFKU004513; \n\tTue, 9 Sep 2014 15:22:15 +0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.04,491,1406617200\"; d=\"scan'208\";a=\"476258569\"", "From": "Helin Zhang <helin.zhang@intel.com>", "To": "dev@dpdk.org", "Date": "Tue, 9 Sep 2014 15:21:37 +0800", "Message-Id": "<1410247299-4365-14-git-send-email-helin.zhang@intel.com>", "X-Mailer": "git-send-email 1.7.4.1", "In-Reply-To": "<1410247299-4365-1-git-send-email-helin.zhang@intel.com>", "References": "<1410247299-4365-1-git-send-email-helin.zhang@intel.com>", "Subject": "[dpdk-dev] [PATCH 13/15] i40e: Use get_link_status to report FC\n\tsettings", "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": "The fix is to use get_link_status but not get_phy_capabilities\nfor reporting FC settings.\n\nSigned-off-by: Helin Zhang <helin.zhang@intel.com>\nReviewed-by: Chen Jing <jing.d.chen@intel.com>\n---\n lib/librte_pmd_i40e/i40e/i40e_common.c | 38 ++++++++++++----------------------\n lib/librte_pmd_i40e/i40e/i40e_type.h | 8 ++++---\n 2 files changed, 18 insertions(+), 28 deletions(-)", "diff": "diff --git a/lib/librte_pmd_i40e/i40e/i40e_common.c b/lib/librte_pmd_i40e/i40e/i40e_common.c\nindex 60ca943..ffd68a5 100644\n--- a/lib/librte_pmd_i40e/i40e/i40e_common.c\n+++ b/lib/librte_pmd_i40e/i40e/i40e_common.c\n@@ -1203,7 +1203,7 @@ enum i40e_status_code i40e_set_fc(struct i40e_hw *hw, u8 *aq_failures,\n \tstatus = i40e_aq_get_phy_capabilities(hw, false, false, &abilities,\n \t\t\t\t\t NULL);\n \tif (status) {\n-\t\t*aq_failures |= I40E_SET_FC_AQ_FAIL_GET1;\n+\t\t*aq_failures |= I40E_SET_FC_AQ_FAIL_GET;\n \t\treturn status;\n \t}\n \n@@ -1228,31 +1228,19 @@ enum i40e_status_code i40e_set_fc(struct i40e_hw *hw, u8 *aq_failures,\n \n \t\tif (status)\n \t\t\t*aq_failures |= I40E_SET_FC_AQ_FAIL_SET;\n-\n-\t\t/* Get the abilities to set hw->fc.current_mode correctly */\n-\t\tstatus = i40e_aq_get_phy_capabilities(hw, false, false,\n-\t\t\t\t\t\t &abilities, NULL);\n-\t\tif (status) {\n-\t\t\t/* Wait a little bit and try once more */\n-\t\t\ti40e_msec_delay(1000);\n-\t\t\tstatus = i40e_aq_get_phy_capabilities(hw, false, false,\n-\t\t\t\t\t\t\t &abilities, NULL);\n-\t\t}\n-\t\tif (status) {\n-\t\t\t*aq_failures |= I40E_SET_FC_AQ_FAIL_GET2;\n-\t\t\treturn status;\n-\t\t}\n \t}\n-\t/* Copy the what was returned from get capabilities into fc */\n-\tif ((abilities.abilities & I40E_AQ_PHY_FLAG_PAUSE_TX) &&\n-\t (abilities.abilities & I40E_AQ_PHY_FLAG_PAUSE_RX))\n-\t\thw->fc.current_mode = I40E_FC_FULL;\n-\telse if (abilities.abilities & I40E_AQ_PHY_FLAG_PAUSE_TX)\n-\t\thw->fc.current_mode = I40E_FC_TX_PAUSE;\n-\telse if (abilities.abilities & I40E_AQ_PHY_FLAG_PAUSE_RX)\n-\t\thw->fc.current_mode = I40E_FC_RX_PAUSE;\n-\telse\n-\t\thw->fc.current_mode = I40E_FC_NONE;\n+\t/* Update the link info */\n+\tstatus = i40e_update_link_info(hw, true);\n+\tif (status) {\n+\t\t/* Wait a little bit (on 40G cards it sometimes takes a really\n+\t\t * long time for link to come back from the atomic reset)\n+\t\t * and try once more\n+\t\t */\n+\t\ti40e_msec_delay(1000);\n+\t\tstatus = i40e_update_link_info(hw, true);\n+\t}\n+\tif (status)\n+\t\t*aq_failures |= I40E_SET_FC_AQ_FAIL_UPDATE;\n \n \treturn status;\n }\ndiff --git a/lib/librte_pmd_i40e/i40e/i40e_type.h b/lib/librte_pmd_i40e/i40e/i40e_type.h\nindex 737a4c1..bb87640 100644\n--- a/lib/librte_pmd_i40e/i40e/i40e_type.h\n+++ b/lib/librte_pmd_i40e/i40e/i40e_type.h\n@@ -68,8 +68,10 @@ POSSIBILITY OF SUCH DAMAGE.\n \t\t\t\t\t (d) == I40E_DEV_ID_QSFP_B || \\\n \t\t\t\t\t (d) == I40E_DEV_ID_QSFP_C)\n \n+#ifndef I40E_MASK\n /* I40E_MASK is a macro used on 32 bit registers */\n #define I40E_MASK(mask, shift) (mask << shift)\n+#endif\n \n #define I40E_MAX_PF\t\t\t16\n #define I40E_MAX_PF_VSI\t\t\t64\n@@ -216,10 +218,10 @@ enum i40e_fc_mode {\n \n enum i40e_set_fc_aq_failures {\n \tI40E_SET_FC_AQ_FAIL_NONE = 0,\n-\tI40E_SET_FC_AQ_FAIL_GET1 = 1,\n+\tI40E_SET_FC_AQ_FAIL_GET = 1,\n \tI40E_SET_FC_AQ_FAIL_SET = 2,\n-\tI40E_SET_FC_AQ_FAIL_GET2 = 4,\n-\tI40E_SET_FC_AQ_FAIL_SET_GET = 6\n+\tI40E_SET_FC_AQ_FAIL_UPDATE = 4,\n+\tI40E_SET_FC_AQ_FAIL_SET_UPDATE = 6\n };\n \n enum i40e_vsi_type {\n", "prefixes": [ "dpdk-dev", "13/15" ] }{ "id": 326, "url": "