Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/662886/?format=api
{ "id": 662886, "url": "http://patchwork.ozlabs.org/api/patches/662886/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1472116559-93975-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": "<1472116559-93975-1-git-send-email-david.m.ertman@intel.com>", "list_archive_url": null, "date": "2016-08-25T09:15:59", "name": "[net] i40e: Fix kernel panic on enable/disable lldp", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "625a68d2cac6bf07674795ea748a84f05be02236", "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/1472116559-93975-1-git-send-email-david.m.ertman@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/662886/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/662886/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 silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\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 3sKrZ71D8pz9sD5\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 26 Aug 2016 03:21:34 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id 1C13C3167D;\n\tThu, 25 Aug 2016 17:21:33 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id udxEidHUIYK7; Thu, 25 Aug 2016 17:21:31 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby silver.osuosl.org (Postfix) with ESMTP id B773C316BF;\n\tThu, 25 Aug 2016 17:21:31 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id D83691C1F48\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 25 Aug 2016 17:21:29 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id D23F78651A\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 25 Aug 2016 17:21:29 +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 H1fQ7EFDDQxE for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 25 Aug 2016 17:21:28 +0000 (UTC)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id D19B3864F1\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 25 Aug 2016 17:21:28 +0000 (UTC)", "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby fmsmga105.fm.intel.com with ESMTP; 25 Aug 2016 10:21:27 -0700", "from dmertma-esx6.jf.intel.com (HELO dmertma-l2033.jf.intel.com)\n\t([10.166.37.46])\n\tby fmsmga004.fm.intel.com with ESMTP; 25 Aug 2016 10:21:27 -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.28,576,1464678000\"; d=\"scan'208\";a=\"160927350\"", "From": "Dave Ertman <david.m.ertman@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Thu, 25 Aug 2016 02:15:59 -0700", "Message-Id": "<1472116559-93975-1-git-send-email-david.m.ertman@intel.com>", "X-Mailer": "git-send-email 2.7.4", "Subject": "[Intel-wired-lan] [net PATCH] i40e: Fix kernel panic on\n\tenable/disable lldp", "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": "If DCB is configured on the link partner switch with an\nunsupported traffic class configuration (e.g. non-contiguous TCs),\nthe driver is flagging DCB as disabled. But, for future DCB\nLLDPDUs, the driver was checking if the interface was DCB capable\ninstead of enabled. This was causing a kernel panic when lldp\nwas enabled/disabled on the link partner switch.\n\nThis patch corrects the situation by having the lldp event handler\ncheck the correct flag in the pf structure. It also cleans up the\nsetting and clearing of the enabled flag for other checks.\n\nSigned-off-by: Dave Ertman <david.m.ertman@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_main.c | 15 +++++++++++----\n 1 file changed, 11 insertions(+), 4 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex c6ac7a6..3c21e41 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -5113,9 +5113,13 @@ static int i40e_init_pf_dcb(struct i40e_pf *pf)\n \t\t\t\t DCB_CAP_DCBX_VER_IEEE;\n \n \t\t\tpf->flags |= I40E_FLAG_DCB_CAPABLE;\n-\t\t\t/* Enable DCB tagging only when more than one TC */\n+\t\t\t/* Enable DCB tagging only when more than one TC\n+\t\t\t * or explicitly disable if only one TC\n+\t\t\t */\n \t\t\tif (i40e_dcb_get_num_tc(&hw->local_dcbx_config) > 1)\n \t\t\t\tpf->flags |= I40E_FLAG_DCB_ENABLED;\n+\t\t\telse\n+\t\t\t\tpf->flags &= ~I40E_FLAG_DCB_ENABLED;\n \t\t\tdev_dbg(&pf->pdev->dev,\n \t\t\t\t\"DCBX offload is supported for this PF.\\n\");\n \t\t}\n@@ -5717,7 +5721,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_CAPABLE))\n+\tif (!(pf->flags & I40E_FLAG_DCB_ENABLED))\n \t\treturn ret;\n \n \t/* Ignore if event is not for Nearest Bridge */\n@@ -7897,6 +7901,7 @@ static int i40e_init_interrupt_scheme(struct i40e_pf *pf)\n #endif\n \t\t\t\t I40E_FLAG_RSS_ENABLED\t|\n \t\t\t\t I40E_FLAG_DCB_CAPABLE\t|\n+\t\t\t\t I40E_FLAG_DCB_ENABLED\t|\n \t\t\t\t I40E_FLAG_SRIOV_ENABLED\t|\n \t\t\t\t I40E_FLAG_FD_SB_ENABLED\t|\n \t\t\t\t I40E_FLAG_FD_ATR_ENABLED\t|\n@@ -10503,6 +10508,7 @@ static void i40e_determine_queue_usage(struct i40e_pf *pf)\n \t\t\t I40E_FLAG_FD_SB_ENABLED\t|\n \t\t\t I40E_FLAG_FD_ATR_ENABLED\t|\n \t\t\t I40E_FLAG_DCB_CAPABLE\t|\n+\t\t\t I40E_FLAG_DCB_ENABLED\t|\n \t\t\t I40E_FLAG_SRIOV_ENABLED\t|\n \t\t\t I40E_FLAG_VMDQ_ENABLED);\n \t} else if (!(pf->flags & (I40E_FLAG_RSS_ENABLED |\n@@ -10526,7 +10532,8 @@ static void i40e_determine_queue_usage(struct i40e_pf *pf)\n \t\t/* Not enough queues for all TCs */\n \t\tif ((pf->flags & I40E_FLAG_DCB_CAPABLE) &&\n \t\t (queues_left < I40E_MAX_TRAFFIC_CLASS)) {\n-\t\t\tpf->flags &= ~I40E_FLAG_DCB_CAPABLE;\n+\t\t\tpf->flags &= ~(I40E_FLAG_DCB_CAPABLE |\n+\t\t\t\t\tI40E_FLAG_DCB_ENABLED);\n \t\t\tdev_info(&pf->pdev->dev, \"not enough queues for DCB. DCB is disabled.\\n\");\n \t\t}\n \t\tpf->num_lan_qps = max_t(int, pf->rss_size_max,\n@@ -10923,7 +10930,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \terr = i40e_init_pf_dcb(pf);\n \tif (err) {\n \t\tdev_info(&pdev->dev, \"DCB init failed %d, disabled\\n\", err);\n-\t\tpf->flags &= ~I40E_FLAG_DCB_CAPABLE;\n+\t\tpf->flags &= ~(I40E_FLAG_DCB_CAPABLE & I40E_FLAG_DCB_ENABLED);\n \t\t/* Continue without DCB enabled */\n \t}\n #endif /* CONFIG_I40E_DCB */\n", "prefixes": [ "net" ] }