Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/672490/?format=api
{ "id": 672490, "url": "http://patchwork.ozlabs.org/api/patches/672490/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1474380650-8771-1-git-send-email-david.m.ertman@intel.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<1474380650-8771-1-git-send-email-david.m.ertman@intel.com>", "list_archive_url": null, "date": "2016-09-20T14:10:50", "name": "i40e: Fix configure TCs after initial DCB disable", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "2d9efdf2ddee0f1a5d95f8386768c041ab215930", "submitter": { "id": 64529, "url": "http://patchwork.ozlabs.org/api/people/64529/?format=api", "name": "Dave Ertman", "email": "david.m.ertman@intel.com" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1474380650-8771-1-git-send-email-david.m.ertman@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/672490/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/672490/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@lists.osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Received": [ "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3sdxtF1SCLz9sCZ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 21 Sep 2016 08:16:20 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 5C4298A453;\n\tTue, 20 Sep 2016 22:16:19 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id zGzZY48cRJJp; Tue, 20 Sep 2016 22:16:18 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id CEFB08A389;\n\tTue, 20 Sep 2016 22:16:18 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 0C8B11CEABE\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 20 Sep 2016 22:16:18 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 070578A389\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 20 Sep 2016 22:16:18 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id bK0PBDNAplkp for <intel-wired-lan@lists.osuosl.org>;\n\tTue, 20 Sep 2016 22:16:17 +0000 (UTC)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 30524881C4\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tTue, 20 Sep 2016 22:16:17 +0000 (UTC)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga105.jf.intel.com with ESMTP; 20 Sep 2016 15:16:16 -0700", "from dmertma-esx6.jf.intel.com (HELO dmertma-l2033.jf.intel.com)\n\t([10.166.37.46])\n\tby FMSMGA003.fm.intel.com with ESMTP; 20 Sep 2016 15:16:16 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.30,370,1470726000\"; d=\"scan'208\";a=\"763870255\"", "From": "Dave Ertman <david.m.ertman@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Tue, 20 Sep 2016 07:10:50 -0700", "Message-Id": "<1474380650-8771-1-git-send-email-david.m.ertman@intel.com>", "X-Mailer": "git-send-email 2.7.4", "Subject": "[Intel-wired-lan] [PATCH] i40e: Fix configure TCs after initial DCB\n\tdisable", "X-BeenThere": "intel-wired-lan@lists.osuosl.org", "X-Mailman-Version": "2.1.18-1", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.lists.osuosl.org>", "List-Unsubscribe": "<http://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@lists.osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@lists.osuosl.org?subject=help>", "List-Subscribe": "<http://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@lists.osuosl.org?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@lists.osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@lists.osuosl.org>" }, "content": "in commit a036244c068612a43fa8c0f33a0eb4daa4d8dba0 a fix\nwas put into place to avoid a kernel panic when a non-\nsupported traffic class configuration was put into place\nand then lldp was enabled/disabled on the link partner\nswitch. This fix caused it to be necessary to\nunload/reload the driver to reenable DCB once a supported\nTC config was in place.\n\nThe root cause of the original panic was that the function\ni40e_pf_get_default_tc was allowing for a default TC other\nthan TC 0, and only TC 0 is supported as a default.\n\nThis patch removes the get_default_tc function and replaces\nit with a #define since there is only one TC supported as\na default.\n\nChange-Id: I448371974e946386d0a7718d73668b450b7c72ef\nSigned-off-by: Dave Ertman <david.m.ertman@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e.h | 1 +\n drivers/net/ethernet/intel/i40e/i40e_main.c | 31 ++++-------------------------\n 2 files changed, 5 insertions(+), 27 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h\nindex 19103a6..b37956e 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e.h\n@@ -92,6 +92,7 @@\n #define I40E_AQ_LEN\t\t\t256\n #define I40E_AQ_WORK_LIMIT\t\t66 /* max number of VFs + a little */\n #define I40E_MAX_USER_PRIORITY\t\t8\n+#define I40E_DEFAULT_TRAFFIC_CLASS\tBIT(0)\n #define I40E_DEFAULT_MSG_ENABLE\t\t4\n #define I40E_QUEUE_WAIT_RETRY_LIMIT\t10\n #define I40E_INT_NAME_STR_LEN\t\t(IFNAMSIZ + 16)\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 61b0fc4..4c9d6b9 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -4643,29 +4643,6 @@ static u8 i40e_pf_get_num_tc(struct i40e_pf *pf)\n }\n \n /**\n- * i40e_pf_get_default_tc - Get bitmap for first enabled TC\n- * @pf: PF being queried\n- *\n- * Return a bitmap for first enabled traffic class for this PF.\n- **/\n-static u8 i40e_pf_get_default_tc(struct i40e_pf *pf)\n-{\n-\tu8 enabled_tc = pf->hw.func_caps.enabled_tcmap;\n-\tu8 i = 0;\n-\n-\tif (!enabled_tc)\n-\t\treturn 0x1; /* TC0 */\n-\n-\t/* Find the first enabled TC */\n-\tfor (i = 0; i < I40E_MAX_TRAFFIC_CLASS; i++) {\n-\t\tif (enabled_tc & BIT(i))\n-\t\t\tbreak;\n-\t}\n-\n-\treturn BIT(i);\n-}\n-\n-/**\n * i40e_pf_get_pf_tc_map - Get bitmap for enabled traffic classes\n * @pf: PF being queried\n *\n@@ -4675,7 +4652,7 @@ static u8 i40e_pf_get_tc_map(struct i40e_pf *pf)\n {\n \t/* If DCB is not enabled for this PF then just return default TC */\n \tif (!(pf->flags & I40E_FLAG_DCB_ENABLED))\n-\t\treturn i40e_pf_get_default_tc(pf);\n+\t\treturn I40E_DEFAULT_TRAFFIC_CLASS;\n \n \t/* SFP mode we want PF to be enabled for all TCs */\n \tif (!(pf->flags & I40E_FLAG_MFP_ENABLED))\n@@ -4685,7 +4662,7 @@ static u8 i40e_pf_get_tc_map(struct i40e_pf *pf)\n \tif (pf->hw.func_caps.iscsi)\n \t\treturn i40e_get_iscsi_tc_map(pf);\n \telse\n-\t\treturn i40e_pf_get_default_tc(pf);\n+\t\treturn I40E_DEFAULT_TRAFFIC_CLASS;\n }\n \n /**\n@@ -5031,7 +5008,7 @@ static void i40e_dcb_reconfigure(struct i40e_pf *pf)\n \t\tif (v == pf->lan_vsi)\n \t\t\ttc_map = i40e_pf_get_tc_map(pf);\n \t\telse\n-\t\t\ttc_map = i40e_pf_get_default_tc(pf);\n+\t\t\ttc_map = I40E_DEFAULT_TRAFFIC_CLASS;\n #ifdef I40E_FCOE\n \t\tif (pf->vsi[v]->type == I40E_VSI_FCOE)\n \t\t\ttc_map = i40e_get_fcoe_tc_map(pf);\n@@ -5719,7 +5696,7 @@ static int i40e_handle_lldp_event(struct i40e_pf *pf,\n \tu8 type;\n \n \t/* Not DCB capable or capability disabled */\n-\tif (!(pf->flags & I40E_FLAG_DCB_ENABLED))\n+\tif (!(pf->flags & I40E_FLAG_DCB_CAPABLE))\n \t\treturn ret;\n \n \t/* Ignore if event is not for Nearest Bridge */\n", "prefixes": [] }