Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/853254/?format=api
{ "id": 853254, "url": "http://patchwork.ozlabs.org/api/patches/853254/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20171227131821.23877-1-alice.michael@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": "<20171227131821.23877-1-alice.michael@intel.com>", "list_archive_url": null, "date": "2017-12-27T13:18:21", "name": "[next,S84-V2,07/13] i40e: Implement an ethtool private flag to stop LLDP in FW", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "037c68b4fa5aba791d2c9060d9b8afeb7b024130", "submitter": { "id": 71123, "url": "http://patchwork.ozlabs.org/api/people/71123/?format=api", "name": "Michael, Alice", "email": "alice.michael@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/20171227131821.23877-1-alice.michael@intel.com/mbox/", "series": [ { "id": 20417, "url": "http://patchwork.ozlabs.org/api/series/20417/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=20417", "date": "2017-12-27T13:14:40", "name": "[next,S84-V2,01/13] i40e: Add returning AQ critical error to SW", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/20417/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/853254/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/853254/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@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" ], "Authentication-Results": "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.137; helo=fraxinus.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "Received": [ "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\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 3z6Qqm2hP8z9sR8\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 28 Dec 2017 08:25:24 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id E489386A73;\n\tWed, 27 Dec 2017 21:25:22 +0000 (UTC)", "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id PTQLOoBqZgUY; Wed, 27 Dec 2017 21:25:22 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 308D086842;\n\tWed, 27 Dec 2017 21:25:22 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n\tby ash.osuosl.org (Postfix) with ESMTP id EBDDE1C25C5\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 27 Dec 2017 21:25:20 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby silver.osuosl.org (Postfix) with ESMTP id E44232DE10\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 27 Dec 2017 21:25:20 +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 gZQhyQDsjpZ0 for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 27 Dec 2017 21:25:20 +0000 (UTC)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby silver.osuosl.org (Postfix) with ESMTPS id EE8C42DAE5\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 27 Dec 2017 21:25:19 +0000 (UTC)", "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t27 Dec 2017 13:25:19 -0800", "from alicemic-2.jf.intel.com ([10.166.16.121])\n\tby orsmga005.jf.intel.com with ESMTP; 27 Dec 2017 13:25:19 -0800" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.45,467,1508828400\"; d=\"scan'208\";a=\"187520748\"", "From": "Alice Michael <alice.michael@intel.com>", "To": "alice.michael@intel.com,\n\tintel-wired-lan@lists.osuosl.org", "Date": "Wed, 27 Dec 2017 08:18:21 -0500", "Message-Id": "<20171227131821.23877-1-alice.michael@intel.com>", "X-Mailer": "git-send-email 2.9.5", "Subject": "[Intel-wired-lan] [next PATCH S84-V2 07/13] i40e: Implement an\n\tethtool private flag to stop LLDP in FW", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.24", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n\t<intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>, \n\t<mailto:intel-wired-lan-request@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@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "From: Dave Ertman <david.m.ertman@intel.com>\n\nImplement the private flag disable-fw-lldp for ethtool\nto disable the processing of LLDP packets by the FW.\nThis will stop the FW from consuming LLDPDU and cause\nthem to be sent up the stack.\n\nThe FW is also being configured to apply a default DCB\nconfiguration on link up.\n\nToggling the value of this flag will also cause a PF reset.\n\nDisabling FW DCB will also disable DCBX.\n\nSigned-off-by: Dave Ertman <david.m.ertman@intel.com>\n---\n drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 47 +++++++++++++++++++++++++-\n drivers/net/ethernet/intel/i40e/i40e_main.c | 14 ++++++--\n 2 files changed, 58 insertions(+), 3 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\nindex e42b1c2..96155f1 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\n@@ -235,6 +235,7 @@ static const struct i40e_priv_flags i40e_gstrings_priv_flags[] = {\n \tI40E_PRIV_FLAG(\"legacy-rx\", I40E_FLAG_LEGACY_RX, 0),\n \tI40E_PRIV_FLAG(\"disable-source-pruning\",\n \t\t I40E_FLAG_SOURCE_PRUNING_DISABLED, 0),\n+\tI40E_PRIV_FLAG(\"disable-fw-lldp\", I40E_FLAG_DISABLE_FW_LLDP, 0),\n };\n \n #define I40E_PRIV_FLAGS_STR_LEN ARRAY_SIZE(i40e_gstrings_priv_flags)\n@@ -4317,6 +4318,25 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)\n \t !(pf->hw_features & I40E_HW_ATR_EVICT_CAPABLE))\n \t\treturn -EOPNOTSUPP;\n \n+\t/* Disable FW LLDP not supported if NPAR active or if FW\n+\t * API version < 1.7\n+\t */\n+\tif (new_flags & I40E_FLAG_DISABLE_FW_LLDP) {\n+\t\tif (pf->hw.func_caps.npar_enable) {\n+\t\t\tdev_warn(&pf->pdev->dev,\n+\t\t\t\t \"Unable to stop FW LLDP if NPAR active\\n\");\n+\t\t\treturn -EOPNOTSUPP;\n+\t\t}\n+\n+\t\tif (pf->hw.aq.api_maj_ver < 1 ||\n+\t\t (pf->hw.aq.api_maj_ver == 1 &&\n+\t\t pf->hw.aq.api_min_ver < 7)) {\n+\t\t\tdev_warn(&pf->pdev->dev,\n+\t\t\t\t \"FW ver does not support stopping FW LLDP\\n\");\n+\t\t\treturn -EOPNOTSUPP;\n+\t\t}\n+\t}\n+\n \t/* Compare and exchange the new flags into place. If we failed, that\n \t * is if cmpxchg returns anything but the old value, this means that\n \t * something else has modified the flags variable since we copied it\n@@ -4362,12 +4382,37 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)\n \t\t}\n \t}\n \n+\tif (changed_flags & I40E_FLAG_DISABLE_FW_LLDP) {\n+\t\tif (pf->flags & I40E_FLAG_DISABLE_FW_LLDP) {\n+\t\t\tstruct i40e_dcbx_config *dcbcfg;\n+\t\t\tint i;\n+\n+\t\t\ti40e_aq_stop_lldp(&pf->hw, true, NULL);\n+\t\t\ti40e_aq_set_dcb_parameters(&pf->hw, true, NULL);\n+\t\t\t/* reset local_dcbx_config to default */\n+\t\t\tdcbcfg = &pf->hw.local_dcbx_config;\n+\t\t\tdcbcfg->etscfg.willing = 1;\n+\t\t\tdcbcfg->etscfg.maxtcs = 0;\n+\t\t\tdcbcfg->etscfg.tcbwtable[0] = 100;\n+\t\t\tfor (i = 1; i < I40E_MAX_TRAFFIC_CLASS; i++)\n+\t\t\t\tdcbcfg->etscfg.tcbwtable[i] = 0;\n+\t\t\tfor (i = 0; i < I40E_MAX_USER_PRIORITY; i++)\n+\t\t\t\tdcbcfg->etscfg.prioritytable[i] = 0;\n+\t\t\tdcbcfg->etscfg.tsatable[0] = I40E_IEEE_TSA_ETS;\n+\t\t\tdcbcfg->pfc.willing = 1;\n+\t\t\tdcbcfg->pfc.pfccap = I40E_MAX_TRAFFIC_CLASS;\n+\t\t} else {\n+\t\t\ti40e_aq_start_lldp(&pf->hw, NULL);\n+\t\t}\n+\t}\n+\n \t/* Issue reset to cause things to take effect, as additional bits\n \t * are added we will need to create a mask of bits requiring reset\n \t */\n \tif (changed_flags & (I40E_FLAG_VEB_STATS_ENABLED |\n \t\t\t I40E_FLAG_LEGACY_RX |\n-\t\t\t I40E_FLAG_SOURCE_PRUNING_DISABLED))\n+\t\t\t I40E_FLAG_SOURCE_PRUNING_DISABLED |\n+\t\t\t I40E_FLAG_DISABLE_FW_LLDP))\n \t\ti40e_do_reset(pf, BIT(__I40E_PF_RESET_REQUESTED), true);\n \n \treturn 0;\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 5c5296e..be24d9e 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -6305,8 +6305,11 @@ static int i40e_init_pf_dcb(struct i40e_pf *pf)\n \tstruct i40e_hw *hw = &pf->hw;\n \tint err = 0;\n \n-\t/* Do not enable DCB for SW1 and SW2 images even if the FW is capable */\n-\tif (pf->hw_features & I40E_HW_NO_DCB_SUPPORT)\n+\t/* Do not enable DCB for SW1 and SW2 images even if the FW is capable\n+\t * Also do not enable DCBx if FW LLDP agent is disabled\n+\t */\n+\tif ((pf->hw_features & I40E_HW_NO_DCB_SUPPORT) ||\n+\t (pf->flags & I40E_FLAG_DISABLE_FW_LLDP))\n \t\tgoto out;\n \n \t/* Get the initial DCB configuration */\n@@ -9266,6 +9269,9 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired)\n \t\tgoto end_core_reset;\n \t}\n \n+\t/* Enable FW to write a default DCB config on link-up */\n+\ti40e_aq_set_dcb_parameters(hw, true, NULL);\n+\n #ifdef CONFIG_I40E_DCB\n \tret = i40e_init_pf_dcb(pf);\n \tif (ret) {\n@@ -13589,6 +13595,10 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \n \tpci_set_drvdata(pdev, pf);\n \tpci_save_state(pdev);\n+\n+\t/* Enable FW to write default DCB config on link-up */\n+\ti40e_aq_set_dcb_parameters(hw, true, NULL);\n+\n #ifdef CONFIG_I40E_DCB\n \terr = i40e_init_pf_dcb(pf);\n \tif (err) {\n", "prefixes": [ "next", "S84-V2", "07/13" ] }