Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/511347/?format=api
{ "id": 511347, "url": "http://patchwork.ozlabs.org/api/patches/511347/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1440690163-128213-13-git-send-email-catherine.sullivan@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": "<1440690163-128213-13-git-send-email-catherine.sullivan@intel.com>", "list_archive_url": null, "date": "2015-08-27T15:42:40", "name": "[next,S12,12/15] i40e: add switch for link polling", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "98a6ce251c4da1f14f59fe14299d80c7a588527b", "submitter": { "id": 13931, "url": "http://patchwork.ozlabs.org/api/people/13931/?format=api", "name": "Catherine Sullivan", "email": "catherine.sullivan@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/1440690163-128213-13-git-send-email-catherine.sullivan@intel.com/mbox/", "series": [], "comments": "http://patchwork.ozlabs.org/api/patches/511347/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/511347/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\tby ozlabs.org (Postfix) with ESMTP id 4D6D11401DA\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 28 Aug 2015 01:41:56 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id A076C95178;\n\tThu, 27 Aug 2015 15:41:55 +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 dhmpk70iiJK5; Thu, 27 Aug 2015 15:41:54 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 5FC7D95182;\n\tThu, 27 Aug 2015 15:41:54 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 5CFD41C11ED\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 27 Aug 2015 15:41:52 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 5755294FF7\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 27 Aug 2015 15:41:52 +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 jKliEhZkcvEm for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 27 Aug 2015 15:41:51 +0000 (UTC)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 0545995194\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 27 Aug 2015 15:41:50 +0000 (UTC)", "from orsmga003.jf.intel.com ([10.7.209.27])\n\tby fmsmga103.fm.intel.com with ESMTP; 27 Aug 2015 08:41:50 -0700", "from catheri1-tigger.jf.intel.com ([134.134.176.92])\n\tby orsmga003.jf.intel.com with ESMTP; 27 Aug 2015 08:41:50 -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.17,422,1437462000\"; d=\"scan'208\";a=\"633370285\"", "From": "Catherine Sullivan <catherine.sullivan@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Thu, 27 Aug 2015 11:42:40 -0400", "Message-Id": "<1440690163-128213-13-git-send-email-catherine.sullivan@intel.com>", "X-Mailer": "git-send-email 1.9.3", "In-Reply-To": "<1440690163-128213-1-git-send-email-catherine.sullivan@intel.com>", "References": "<1440690163-128213-1-git-send-email-catherine.sullivan@intel.com>", "Subject": "[Intel-wired-lan] [next PATCH S12 12/15] i40e: add switch for link\n\tpolling", "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": "From: Shannon Nelson <shannon.nelson@intel.com>\n\nThere's been some need for controlling the periodic link polling for\ndebugging link issues. This patch enables switching it off and on\nthrough an ethtool private flag. The link poll remains on by default,\nbut can be turned off with\n\tethtool --set-priv-flags p261p1 LinkPolling off\nand later turned back on with\n\tethtool --set-priv-flags p261p1 LinkPolling on\n\nTo check the current status, use\n\tethtool --show-priv-flags p261p1\n\nSigned-off-by: Shannon Nelson <shannon.nelson@intel.com>\nChange-ID: I32e4ab654ff3eec90a06cf144899971b82d71c40\n---\n drivers/net/ethernet/intel/i40e/i40e.h | 2 ++\n drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 26 ++++++++++++++++++++++++--\n drivers/net/ethernet/intel/i40e/i40e_main.c | 4 +++-\n 3 files changed, 29 insertions(+), 3 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h\nindex 672ca75..9c9601c 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e.h\n+++ b/drivers/net/ethernet/intel/i40e/i40e.h\n@@ -101,6 +101,7 @@\n \n /* Ethtool Private Flags */\n #define I40E_PRIV_FLAGS_NPAR_FLAG\tBIT(0)\n+#define I40E_PRIV_FLAGS_LINKPOLL_FLAG\tBIT(1)\n \n #define I40E_NVM_VERSION_LO_SHIFT 0\n #define I40E_NVM_VERSION_LO_MASK (0xff << I40E_NVM_VERSION_LO_SHIFT)\n@@ -329,6 +330,7 @@ struct i40e_pf {\n #define I40E_FLAG_WB_ON_ITR_CAPABLE\t\tBIT_ULL(35)\n #define I40E_FLAG_VEB_STATS_ENABLED\t\tBIT_ULL(37)\n #define I40E_FLAG_MULTIPLE_TCP_UDP_RSS_PCTYPE\tBIT_ULL(38)\n+#define I40E_FLAG_LINK_POLLING_ENABLED\t\tBIT_ULL(39)\n #define I40E_FLAG_VEB_MODE_ENABLED\t\tBIT_ULL(40)\n #define I40E_FLAG_GENEVE_OFFLOAD_CAPABLE\tBIT_ULL(41)\n \ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\nindex f2b4f8b..5a726f2 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c\n@@ -230,10 +230,10 @@ static const char i40e_gstrings_test[][ETH_GSTRING_LEN] = {\n \n static const char i40e_priv_flags_strings[][ETH_GSTRING_LEN] = {\n \t\"NPAR\",\n+\t\"LinkPolling\",\n };\n \n-#define I40E_PRIV_FLAGS_STR_LEN \\\n-\t(sizeof(i40e_priv_flags_strings) / ETH_GSTRING_LEN)\n+#define I40E_PRIV_FLAGS_STR_LEN ARRAY_SIZE(i40e_priv_flags_strings)\n \n /**\n * i40e_partition_setting_complaint - generic complaint for MFP restriction\n@@ -2636,10 +2636,31 @@ static u32 i40e_get_priv_flags(struct net_device *dev)\n \n \tret_flags |= pf->hw.func_caps.npar_enable ?\n \t\tI40E_PRIV_FLAGS_NPAR_FLAG : 0;\n+\tret_flags |= pf->flags & I40E_FLAG_LINK_POLLING_ENABLED ?\n+\t\tI40E_PRIV_FLAGS_LINKPOLL_FLAG : 0;\n \n \treturn ret_flags;\n }\n \n+/**\n+ * i40e_set_priv_flags - set private flags\n+ * @dev: network interface device structure\n+ * @flags: bit flags to be set\n+ **/\n+static int i40e_set_priv_flags(struct net_device *dev, u32 flags)\n+{\n+\tstruct i40e_netdev_priv *np = netdev_priv(dev);\n+\tstruct i40e_vsi *vsi = np->vsi;\n+\tstruct i40e_pf *pf = vsi->back;\n+\n+\tif (flags & I40E_PRIV_FLAGS_LINKPOLL_FLAG)\n+\t\tpf->flags |= I40E_FLAG_LINK_POLLING_ENABLED;\n+\telse\n+\t\tpf->flags &= ~I40E_FLAG_LINK_POLLING_ENABLED;\n+\n+\treturn 0;\n+}\n+\n static const struct ethtool_ops i40e_ethtool_ops = {\n \t.get_settings\t\t= i40e_get_settings,\n \t.set_settings\t\t= i40e_set_settings,\n@@ -2676,6 +2697,7 @@ static const struct ethtool_ops i40e_ethtool_ops = {\n \t.set_channels\t\t= i40e_set_channels,\n \t.get_ts_info\t\t= i40e_get_ts_info,\n \t.get_priv_flags\t\t= i40e_get_priv_flags,\n+\t.set_priv_flags\t\t= i40e_set_priv_flags,\n };\n \n void i40e_set_ethtool_ops(struct net_device *netdev)\ndiff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c\nindex 73c6d37..4830c91 100644\n--- a/drivers/net/ethernet/intel/i40e/i40e_main.c\n+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c\n@@ -5745,7 +5745,8 @@ static void i40e_watchdog_subtask(struct i40e_pf *pf)\n \tpf->service_timer_previous = jiffies;\n \n \ti40e_check_hang_subtask(pf);\n-\ti40e_link_event(pf);\n+\tif (pf->flags & I40E_FLAG_LINK_POLLING_ENABLED)\n+\t\ti40e_link_event(pf);\n \n \t/* Update the stats for active netdevs so the network stack\n \t * can look at updated numbers whenever it cares to\n@@ -7756,6 +7757,7 @@ static int i40e_sw_init(struct i40e_pf *pf)\n \t/* Set default capability flags */\n \tpf->flags = I40E_FLAG_RX_CSUM_ENABLED |\n \t\t I40E_FLAG_MSI_ENABLED |\n+\t\t I40E_FLAG_LINK_POLLING_ENABLED |\n \t\t I40E_FLAG_MSIX_ENABLED;\n \n \tif (iommu_present(&pci_bus_type))\n", "prefixes": [ "next", "S12", "12/15" ] }