All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [next PATCH S57 00/11] i40e/i40evf updates
@ 2016-12-12 23:44 Bimmy Pujari
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 01/11] i40e: fix disable overflow promiscuous mode Bimmy Pujari
                   ` (10 more replies)
  0 siblings, 11 replies; 22+ messages in thread
From: Bimmy Pujari @ 2016-12-12 23:44 UTC (permalink / raw)
  To: intel-wired-lan

Alan Brady adds code to fix disable overflow promiscuous mode and
adds code to refactor AQ CMD buffer debug printing.

Carolyn Wyborny adds code to fix Adaptive ITR enabling.

Harshitha Ramamurthy adds code for error handling for link event.

Joshua Hay adds code to enable mc magic pkt wakeup during power down.

Jacob Keller  removes unnecessary call to i40e_update_link_info, 
converts to cpu from le16 to generate switch_id, adds code to 
properly convert le16 value to CPU format and marks the value passed 
to csum_replace_by_diff as __wsum.

Mitch Williams adds code to free rings in remove function and adds one
comment.

 drivers/net/ethernet/intel/i40e/i40e.h            |   2 +
 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h |   2 +
 drivers/net/ethernet/intel/i40e/i40e_common.c     |  19 ++--
 drivers/net/ethernet/intel/i40e/i40e_debugfs.c    |   5 +-
 drivers/net/ethernet/intel/i40e/i40e_main.c       | 112 +++++++++++++++++-----
 drivers/net/ethernet/intel/i40e/i40e_txrx.c       |  17 ++--
 drivers/net/ethernet/intel/i40evf/i40e_common.c   |  19 ++--
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c     |  17 ++--
 drivers/net/ethernet/intel/i40evf/i40evf_main.c   |   8 +-
 9 files changed, 145 insertions(+), 56 deletions(-)

-- 
2.4.11


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Intel-wired-lan] [next PATCH S57 01/11] i40e: fix disable overflow promiscuous mode
  2016-12-12 23:44 [Intel-wired-lan] [next PATCH S57 00/11] i40e/i40evf updates Bimmy Pujari
@ 2016-12-12 23:44 ` Bimmy Pujari
  2016-12-16 20:06   ` Bowers, AndrewX
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 02/11] i40e: enable mc magic pkt wakeup during power down Bimmy Pujari
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 22+ messages in thread
From: Bimmy Pujari @ 2016-12-12 23:44 UTC (permalink / raw)
  To: intel-wired-lan

From: Alan Brady <alan.brady@intel.com>

There exists a bug in which the driver is unable to exit overflow
promiscuous mode after having added "too many" mac filters.  It is
expected that after triggering overflow promiscuous, removing the
failed/extra filters should then disable overflow promiscuous mode.

The bug exists because we were intentionally skipping the sync_vsi_filter
path in cases where we were removing failed filters since they shouldn't
have been added to the firmware in the first place, however we still
need to go through the sync_vsi_filter code path to determine whether or
not it is ok to exit overflow promiscuous mode.  This patch fixes the
bug by making sure we go through the sync_vsi_filter path in cases of
failed filters.

Signed-off-by: Alan Brady <alan.brady@intel.com>
Change-ID: I634d249ca3e5fa50729553137c295e73e7722143
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 69a51a4..cb62a1e 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -1453,18 +1453,20 @@ void __i40e_del_filter(struct i40e_vsi *vsi, struct i40e_mac_filter *f)
 	if (!f)
 		return;
 
+	/* If the filter was never added to firmware then we can just delete it
+	 * directly and we don't want to set the status to remove or else an
+	 * admin queue command will unnecessarily fire.
+	 */
 	if ((f->state == I40E_FILTER_FAILED) ||
 	    (f->state == I40E_FILTER_NEW)) {
-		/* this one never got added by the FW. Just remove it,
-		 * no need to sync anything.
-		 */
 		hash_del(&f->hlist);
 		kfree(f);
 	} else {
 		f->state = I40E_FILTER_REMOVE;
-		vsi->flags |= I40E_VSI_FLAG_FILTER_CHANGED;
-		vsi->back->flags |= I40E_FLAG_FILTER_SYNC;
 	}
+
+	vsi->flags |= I40E_VSI_FLAG_FILTER_CHANGED;
+	vsi->back->flags |= I40E_FLAG_FILTER_SYNC;
 }
 
 /**
-- 
2.4.11


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Intel-wired-lan] [next PATCH S57 02/11] i40e: enable mc magic pkt wakeup during power down
  2016-12-12 23:44 [Intel-wired-lan] [next PATCH S57 00/11] i40e/i40evf updates Bimmy Pujari
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 01/11] i40e: fix disable overflow promiscuous mode Bimmy Pujari
@ 2016-12-12 23:44 ` Bimmy Pujari
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 03/11] i40e: remove unnecessary call to i40e_update_link_info Bimmy Pujari
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 22+ messages in thread
From: Bimmy Pujari @ 2016-12-12 23:44 UTC (permalink / raw)
  To: intel-wired-lan

From: "Joshua Hay" <joshua.a.hay@intel.com>

This patch adds a call to the mac_address_write admin q function during
power down to update the PRTPM_SAH/SAL registers with the MC_MAG_EN bit
thus enabling multicast magic packet wakeup.
    
A FW workaround is needed to write the multicast magic wake up enable 
bit in the PRTPM_SAH register. The FW expects the mac address write  
admin q cmd to be called first with one of the WRITE_TYPE_LAA flags 
and then with the multicast relevant flags.

*Note: This solution only works for X722 devices currently. A PFR will
clear the previously mentioned bit by default, but X722 has support for a
WOL_PRESERVE_ON_PFR flag which prevents the bit from being cleared. Once
other devices support this flag, this solution should work as well.

Signed-off-by: Joshua Hay <joshua.a.hay@intel.com>
Change-ID: I51bd5b8535bd9051c2676e27c999c1657f786827
---
 drivers/net/ethernet/intel/i40e/i40e.h            |  1 +
 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h |  2 +
 drivers/net/ethernet/intel/i40e/i40e_main.c       | 74 ++++++++++++++++++++---
 3 files changed, 67 insertions(+), 10 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 0f2bf241..0f13d19 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -387,6 +387,7 @@ struct i40e_pf {
 #define I40E_FLAG_TRUE_PROMISC_SUPPORT		BIT_ULL(51)
 #define I40E_FLAG_HAVE_CRT_RETIMER		BIT_ULL(52)
 #define I40E_FLAG_PTP_L4_CAPABLE		BIT_ULL(53)
+#define I40E_FLAG_WOL_MC_MAGIC_PKT_WAKE		BIT_ULL(54)
 
 	/* tracks features that get auto disabled by errors */
 	u64 auto_disable_flags;
diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
index b2101a5..451f48b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
@@ -538,6 +538,8 @@ I40E_CHECK_STRUCT_LEN(24, i40e_aqc_mac_address_read_data);
 /* Manage MAC Address Write Command (0x0108) */
 struct i40e_aqc_mac_address_write {
 	__le16	command_flags;
+#define I40E_AQC_MC_MAG_EN		0x0100
+#define I40E_AQC_WOL_PRESERVE_ON_PFR	0x0200
 #define I40E_AQC_WRITE_TYPE_LAA_ONLY	0x0000
 #define I40E_AQC_WRITE_TYPE_LAA_WOL	0x4000
 #define I40E_AQC_WRITE_TYPE_PORT	0x8000
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index cb62a1e..51a962c 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -8830,16 +8830,17 @@ static int i40e_sw_init(struct i40e_pf *pf)
 	}
 #endif /* CONFIG_PCI_IOV */
 	if (pf->hw.mac.type == I40E_MAC_X722) {
-		pf->flags |= I40E_FLAG_RSS_AQ_CAPABLE |
-			     I40E_FLAG_128_QP_RSS_CAPABLE |
-			     I40E_FLAG_HW_ATR_EVICT_CAPABLE |
-			     I40E_FLAG_OUTER_UDP_CSUM_CAPABLE |
-			     I40E_FLAG_WB_ON_ITR_CAPABLE |
-			     I40E_FLAG_MULTIPLE_TCP_UDP_RSS_PCTYPE |
-			     I40E_FLAG_NO_PCI_LINK_CHECK |
-			     I40E_FLAG_USE_SET_LLDP_MIB |
-			     I40E_FLAG_GENEVE_OFFLOAD_CAPABLE |
-			     I40E_FLAG_PTP_L4_CAPABLE;
+		pf->flags |= I40E_FLAG_RSS_AQ_CAPABLE
+			     | I40E_FLAG_128_QP_RSS_CAPABLE
+			     | I40E_FLAG_HW_ATR_EVICT_CAPABLE
+			     | I40E_FLAG_OUTER_UDP_CSUM_CAPABLE
+			     | I40E_FLAG_WB_ON_ITR_CAPABLE
+			     | I40E_FLAG_MULTIPLE_TCP_UDP_RSS_PCTYPE
+			     | I40E_FLAG_NO_PCI_LINK_CHECK
+			     | I40E_FLAG_USE_SET_LLDP_MIB
+			     | I40E_FLAG_GENEVE_OFFLOAD_CAPABLE
+			     | I40E_FLAG_PTP_L4_CAPABLE
+			     | I40E_FLAG_WOL_MC_MAGIC_PKT_WAKE;
 	} else if ((pf->hw.aq.api_maj_ver > 1) ||
 		   ((pf->hw.aq.api_maj_ver == 1) &&
 		    (pf->hw.aq.api_min_ver > 4))) {
@@ -11757,6 +11758,53 @@ static void i40e_pci_error_resume(struct pci_dev *pdev)
 }
 
 /**
+ * i40e_enable_mc_magic_wake - enable multicast magic packet wake up
+ * using the mac_address_write admin q function
+ * @pf: pointer to i40e_pf struct
+ **/
+static void i40e_enable_mc_magic_wake(struct i40e_pf *pf)
+{
+	struct i40e_hw *hw = &pf->hw;
+	i40e_status ret;
+	u8 mac_addr[6];
+	u16 flags = 0;
+
+	/* Get current MAC address in case it's an LAA */
+	if (pf->vsi[pf->lan_vsi] && pf->vsi[pf->lan_vsi]->netdev) {
+		ether_addr_copy(mac_addr,
+				pf->vsi[pf->lan_vsi]->netdev->dev_addr);
+	} else {
+		dev_err(&pf->pdev->dev,
+			"Failed to retrieve MAC address; using default\n");
+		ether_addr_copy(mac_addr, hw->mac.addr);
+	}
+
+	/* The FW expects the mac address write cmd to first be called with
+	 * one of these flags before calling it again with the multicast
+	 * enable flags.
+	 */
+	flags = I40E_AQC_WRITE_TYPE_LAA_WOL;
+
+	if (hw->func_caps.flex10_enable && hw->partition_id != 1)
+		flags = I40E_AQC_WRITE_TYPE_LAA_ONLY;
+
+	ret = i40e_aq_mac_address_write(hw, flags, mac_addr, NULL);
+	if (ret) {
+		dev_err(&pf->pdev->dev,
+			"Failed to update MAC address registers; cannot enable Multicast Magic packet wake up");
+		return;
+	}
+
+	flags = I40E_AQC_MC_MAG_EN
+			| I40E_AQC_WOL_PRESERVE_ON_PFR
+			| I40E_AQC_WRITE_TYPE_UPDATE_MC_MAG;
+	ret = i40e_aq_mac_address_write(hw, flags, mac_addr, NULL);
+	if (ret)
+		dev_err(&pf->pdev->dev,
+			"Failed to enable Multicast Magic Packet wake up\n");
+}
+
+/**
  * i40e_shutdown - PCI callback for shutting down
  * @pdev: PCI device information struct
  **/
@@ -11778,6 +11826,9 @@ static void i40e_shutdown(struct pci_dev *pdev)
 	cancel_work_sync(&pf->service_task);
 	i40e_fdir_teardown(pf);
 
+	if (pf->wol_en && (pf->flags & I40E_FLAG_WOL_MC_MAGIC_PKT_WAKE))
+		i40e_enable_mc_magic_wake(pf);
+
 	rtnl_lock();
 	i40e_prep_for_reset(pf);
 	rtnl_unlock();
@@ -11809,6 +11860,9 @@ static int i40e_suspend(struct pci_dev *pdev, pm_message_t state)
 	set_bit(__I40E_SUSPENDED, &pf->state);
 	set_bit(__I40E_DOWN, &pf->state);
 
+	if (pf->wol_en && (pf->flags & I40E_FLAG_WOL_MC_MAGIC_PKT_WAKE))
+		i40e_enable_mc_magic_wake(pf);
+
 	rtnl_lock();
 	i40e_prep_for_reset(pf);
 	rtnl_unlock();
-- 
2.4.11


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Intel-wired-lan] [next PATCH S57 03/11] i40e: remove unnecessary call to i40e_update_link_info
  2016-12-12 23:44 [Intel-wired-lan] [next PATCH S57 00/11] i40e/i40evf updates Bimmy Pujari
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 01/11] i40e: fix disable overflow promiscuous mode Bimmy Pujari
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 02/11] i40e: enable mc magic pkt wakeup during power down Bimmy Pujari
@ 2016-12-12 23:44 ` Bimmy Pujari
  2016-12-16 21:54   ` Bowers, AndrewX
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 04/11] i40evf: free rings in remove function Bimmy Pujari
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 22+ messages in thread
From: Bimmy Pujari @ 2016-12-12 23:44 UTC (permalink / raw)
  To: intel-wired-lan

From: Jacob Keller <jacob.e.keller@intel.com>

This call is made just prior to running i40e_link_event. In
i40e_link_event, we set hw->phy.get_link_info to true just prior to
calling i40e_get_link_status, which conveniently runs
i40e_update_link_info for us. Thus, we are running i40e_update_link_info
twice, which seems like something we don't need to do...

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Change-ID: I36467a570f44b7546d218c99e134ff97c2709315
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 51a962c..128a21e 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -10777,7 +10777,6 @@ static int i40e_setup_pf_switch(struct i40e_pf *pf, bool reinit)
 		i40e_pf_config_rss(pf);
 
 	/* fill in link information and enable LSE reporting */
-	i40e_update_link_info(&pf->hw);
 	i40e_link_event(pf);
 
 	/* Initialize user-specific link properties */
-- 
2.4.11


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Intel-wired-lan] [next PATCH S57 04/11] i40evf: free rings in remove function
  2016-12-12 23:44 [Intel-wired-lan] [next PATCH S57 00/11] i40e/i40evf updates Bimmy Pujari
                   ` (2 preceding siblings ...)
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 03/11] i40e: remove unnecessary call to i40e_update_link_info Bimmy Pujari
@ 2016-12-12 23:44 ` Bimmy Pujari
  2016-12-16 22:10   ` Bowers, AndrewX
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 05/11] i40evf: add comment Bimmy Pujari
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 22+ messages in thread
From: Bimmy Pujari @ 2016-12-12 23:44 UTC (permalink / raw)
  To: intel-wired-lan

From: Mitch Williams <mitch.a.williams@intel.com>

When the i40evf_remove() calls netdev close, the device doesn't actually
close - it schedules the work for the watchdog to perform. Since we're
stopping the watchdog, this work doesn't get done. However, we're
resetting the part, so we can free resources after the reset request has
gone through. This plugs a memory leak.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Change-ID: Id5335dcaf76ce00d2a4c3d26e9faf711d7f051cf
---
Testing Hints : Load/unload test

 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 920c1cb..5673dbd 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -2871,7 +2871,8 @@ static void i40evf_remove(struct pci_dev *pdev)
 		i40evf_request_reset(adapter);
 		msleep(50);
 	}
-
+	i40evf_free_all_tx_resources(adapter);
+	i40evf_free_all_rx_resources(adapter);
 	i40evf_misc_irq_disable(adapter);
 	i40evf_free_misc_irq(adapter);
 	i40evf_reset_interrupt_capability(adapter);
-- 
2.4.11


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Intel-wired-lan] [next PATCH S57 05/11] i40evf: add comment
  2016-12-12 23:44 [Intel-wired-lan] [next PATCH S57 00/11] i40e/i40evf updates Bimmy Pujari
                   ` (3 preceding siblings ...)
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 04/11] i40evf: free rings in remove function Bimmy Pujari
@ 2016-12-12 23:44 ` Bimmy Pujari
  2016-12-16 22:13   ` Bowers, AndrewX
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 06/11] i40e: Fix Adaptive ITR enabling Bimmy Pujari
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 22+ messages in thread
From: Bimmy Pujari @ 2016-12-12 23:44 UTC (permalink / raw)
  To: intel-wired-lan

From: Mitch Williams <mitch.a.williams@intel.com>

Add a comment to reduce confusion.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Change-ID: I3d5819c0f3f5174680442ae54398a073d4a61f4f
---
Testing Hints : No code change, just a comment

 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 5673dbd..f35dcaa 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -2153,6 +2153,11 @@ static int i40evf_close(struct net_device *netdev)
 	adapter->state = __I40EVF_DOWN_PENDING;
 	i40evf_free_traffic_irqs(adapter);
 
+	/* We explicitly don't free resources here because the hardware is
+	 * still active and can DMA into memory. Resources are cleared in
+	 * i40evf_virtchnl_completion() after we get confirmation from the PF
+	 * driver that the rings have been stopped.
+	 */
 	return 0;
 }
 
-- 
2.4.11


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Intel-wired-lan] [next PATCH S57 06/11] i40e: Fix Adaptive ITR enabling
  2016-12-12 23:44 [Intel-wired-lan] [next PATCH S57 00/11] i40e/i40evf updates Bimmy Pujari
                   ` (4 preceding siblings ...)
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 05/11] i40evf: add comment Bimmy Pujari
@ 2016-12-12 23:44 ` Bimmy Pujari
  2016-12-16 22:31   ` Bowers, AndrewX
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 07/11] i40e: refactor AQ CMD buffer debug printing Bimmy Pujari
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 22+ messages in thread
From: Bimmy Pujari @ 2016-12-12 23:44 UTC (permalink / raw)
  To: intel-wired-lan

From: Carolyn Wyborny <carolyn.wyborny@intel.com>

This patch fixes a bug introduced with the addition of the per queue
ITR feature support in ethtool.  With that addition, there were
functions added which converted the ITR settings to binary values.
The IS_ENABLED macros that run on those values check whether a bit
is set or not and with the value being binary, the bit check always
returned ITR disabled which prevents any updating of the ITR rate.
This patch fixes the problem by changing the functions to return the
current ITR value instead and renaming it to better reflect
its function.  These functions now provide a value which will be
accurately asessed and update the ITR as intended.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Change-ID: I14f1d088d052e27f652aaa3113e186415ddea1fc
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 12 ++++++------
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index e88e335..8531f4b 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -1864,14 +1864,14 @@ static u32 i40e_buildreg_itr(const int type, const u16 itr)
 
 /* a small macro to shorten up some long lines */
 #define INTREG I40E_PFINT_DYN_CTLN
-static inline int get_rx_itr_enabled(struct i40e_vsi *vsi, int idx)
+static inline int get_rx_itr(struct i40e_vsi *vsi, int idx)
 {
-	return !!(vsi->rx_rings[idx]->rx_itr_setting);
+	return vsi->rx_rings[idx]->rx_itr_setting;
 }
 
-static inline int get_tx_itr_enabled(struct i40e_vsi *vsi, int idx)
+static inline int get_tx_itr(struct i40e_vsi *vsi, int idx)
 {
-	return !!(vsi->tx_rings[idx]->tx_itr_setting);
+	return vsi->tx_rings[idx]->tx_itr_setting;
 }
 
 /**
@@ -1897,8 +1897,8 @@ static inline void i40e_update_enable_itr(struct i40e_vsi *vsi,
 	 */
 	rxval = txval = i40e_buildreg_itr(I40E_ITR_NONE, 0);
 
-	rx_itr_setting = get_rx_itr_enabled(vsi, idx);
-	tx_itr_setting = get_tx_itr_enabled(vsi, idx);
+	rx_itr_setting = get_rx_itr(vsi, idx);
+	tx_itr_setting = get_tx_itr(vsi, idx);
 
 	if (q_vector->itr_countdown > 0 ||
 	    (!ITR_IS_DYNAMIC(rx_itr_setting) &&
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index 4870cb5..45792dd 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -1324,18 +1324,18 @@ static u32 i40e_buildreg_itr(const int type, const u16 itr)
 
 /* a small macro to shorten up some long lines */
 #define INTREG I40E_VFINT_DYN_CTLN1
-static inline int get_rx_itr_enabled(struct i40e_vsi *vsi, int idx)
+static inline int get_rx_itr(struct i40e_vsi *vsi, int idx)
 {
 	struct i40evf_adapter *adapter = vsi->back;
 
-	return !!(adapter->rx_rings[idx].rx_itr_setting);
+	return adapter->rx_rings[idx].rx_itr_setting;
 }
 
-static inline int get_tx_itr_enabled(struct i40e_vsi *vsi, int idx)
+static inline int get_tx_itr(struct i40e_vsi *vsi, int idx)
 {
 	struct i40evf_adapter *adapter = vsi->back;
 
-	return !!(adapter->tx_rings[idx].tx_itr_setting);
+	return adapter->tx_rings[idx].tx_itr_setting;
 }
 
 /**
@@ -1361,8 +1361,8 @@ static inline void i40e_update_enable_itr(struct i40e_vsi *vsi,
 	 */
 	rxval = txval = i40e_buildreg_itr(I40E_ITR_NONE, 0);
 
-	rx_itr_setting = get_rx_itr_enabled(vsi, idx);
-	tx_itr_setting = get_tx_itr_enabled(vsi, idx);
+	rx_itr_setting = get_rx_itr(vsi, idx);
+	tx_itr_setting = get_tx_itr(vsi, idx);
 
 	if (q_vector->itr_countdown > 0 ||
 	    (!ITR_IS_DYNAMIC(rx_itr_setting) &&
-- 
2.4.11


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Intel-wired-lan] [next PATCH S57 07/11] i40e: refactor AQ CMD buffer debug printing
  2016-12-12 23:44 [Intel-wired-lan] [next PATCH S57 00/11] i40e/i40evf updates Bimmy Pujari
                   ` (5 preceding siblings ...)
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 06/11] i40e: Fix Adaptive ITR enabling Bimmy Pujari
@ 2016-12-12 23:44 ` Bimmy Pujari
  2016-12-16 22:32   ` Bowers, AndrewX
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 08/11] i40e: convert to cpu from le16 to generate switch_id correctly Bimmy Pujari
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 22+ messages in thread
From: Bimmy Pujari @ 2016-12-12 23:44 UTC (permalink / raw)
  To: intel-wired-lan

From: Alan Brady <alan.brady@intel.com>

This patch refactors the '%*ph' printk format specifier to instead use
the print_hex_dump function, as recommended by the '%*ph' documentation.
This produces better/more standardized output.

Signed-off-by: Alan Brady <alan.brady@intel.com>
Change-ID: Id56700b4e8abc40ff8c04bc8379e7df04cb4d6fd
---
 drivers/net/ethernet/intel/i40e/i40e_common.c   | 19 ++++++++++++-------
 drivers/net/ethernet/intel/i40evf/i40e_common.c | 19 ++++++++++++-------
 2 files changed, 24 insertions(+), 14 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index a5d0028..ed5d328 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -300,7 +300,6 @@ void i40e_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask, void *desc,
 	struct i40e_aq_desc *aq_desc = (struct i40e_aq_desc *)desc;
 	u16 len;
 	u8 *buf = (u8 *)buffer;
-	u16 i = 0;
 
 	if ((!(mask & hw->debug_mask)) || (desc == NULL))
 		return;
@@ -328,12 +327,18 @@ void i40e_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask, void *desc,
 		if (buf_len < len)
 			len = buf_len;
 		/* write the full 16-byte chunks */
-		for (i = 0; i < (len - 16); i += 16)
-			i40e_debug(hw, mask, "\t0x%04X  %16ph\n", i, buf + i);
-		/* write whatever's left over without overrunning the buffer */
-		if (i < len)
-			i40e_debug(hw, mask, "\t0x%04X  %*ph\n",
-					     i, len - i, buf + i);
+		if (hw->debug_mask & mask) {
+			char prefix[20];
+
+			snprintf(prefix, 20,
+				 "i40e %02x:%02x.%x: \t0x",
+				 hw->bus.bus_id,
+				 hw->bus.device,
+				 hw->bus.func);
+
+			print_hex_dump(KERN_INFO, prefix, DUMP_PREFIX_OFFSET,
+				       16, 1, buf, len, false);
+		}
 	}
 }
 
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_common.c b/drivers/net/ethernet/intel/i40evf/i40e_common.c
index b5a59dd..89dfdbc 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_common.c
@@ -304,7 +304,6 @@ void i40evf_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask, void *desc,
 {
 	struct i40e_aq_desc *aq_desc = (struct i40e_aq_desc *)desc;
 	u8 *buf = (u8 *)buffer;
-	u16 i = 0;
 
 	if ((!(mask & hw->debug_mask)) || (desc == NULL))
 		return;
@@ -332,12 +331,18 @@ void i40evf_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask, void *desc,
 		if (buf_len < len)
 			len = buf_len;
 		/* write the full 16-byte chunks */
-		for (i = 0; i < (len - 16); i += 16)
-			i40e_debug(hw, mask, "\t0x%04X  %16ph\n", i, buf + i);
-		/* write whatever's left over without overrunning the buffer */
-		if (i < len)
-			i40e_debug(hw, mask, "\t0x%04X  %*ph\n",
-					     i, len - i, buf + i);
+		if (hw->debug_mask & mask) {
+			char prefix[20];
+
+			snprintf(prefix, 20,
+				 "i40evf %02x:%02x.%x: \t0x",
+				 hw->bus.bus_id,
+				 hw->bus.device,
+				 hw->bus.func);
+
+			print_hex_dump(KERN_INFO, prefix, DUMP_PREFIX_OFFSET,
+				       16, 1, buf, len, false);
+		}
 	}
 }
 
-- 
2.4.11


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Intel-wired-lan] [next PATCH S57 08/11] i40e: convert to cpu from le16 to generate switch_id correctly
  2016-12-12 23:44 [Intel-wired-lan] [next PATCH S57 00/11] i40e/i40evf updates Bimmy Pujari
                   ` (6 preceding siblings ...)
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 07/11] i40e: refactor AQ CMD buffer debug printing Bimmy Pujari
@ 2016-12-12 23:44 ` Bimmy Pujari
  2016-12-16 22:37   ` Bowers, AndrewX
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 09/11] i40e: properly convert le16 value to CPU format Bimmy Pujari
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 22+ messages in thread
From: Bimmy Pujari @ 2016-12-12 23:44 UTC (permalink / raw)
  To: intel-wired-lan

From: Jacob Keller <jacob.e.keller@intel.com>

On Big Endian platforms we would incorrectly calculate the wrong switch
id since we did not properly convert the le16 value into CPU format.
Caught by sparse.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Change-ID: I69a2f9fa064a0a91691f7d0e6fcc206adceb8e36
---
 drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
index f1f41f1..267ad25 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_debugfs.c
@@ -974,7 +974,7 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
 			struct i40e_dcbx_config *r_cfg =
 						&pf->hw.remote_dcbx_config;
 			int i, ret;
-			u32 switch_id;
+			u16 switch_id;
 
 			bw_data = kzalloc(sizeof(
 				    struct i40e_aqc_query_port_ets_config_resp),
@@ -986,7 +986,8 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
 
 			vsi = pf->vsi[pf->lan_vsi];
 			switch_id =
-				vsi->info.switch_id & I40E_AQ_VSI_SW_ID_MASK;
+				le16_to_cpu(vsi->info.switch_id) &
+					    I40E_AQ_VSI_SW_ID_MASK;
 
 			ret = i40e_aq_query_port_ets_config(&pf->hw,
 							    switch_id,
-- 
2.4.11


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Intel-wired-lan] [next PATCH S57 09/11] i40e: properly convert le16 value to CPU format
  2016-12-12 23:44 [Intel-wired-lan] [next PATCH S57 00/11] i40e/i40evf updates Bimmy Pujari
                   ` (7 preceding siblings ...)
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 08/11] i40e: convert to cpu from le16 to generate switch_id correctly Bimmy Pujari
@ 2016-12-12 23:44 ` Bimmy Pujari
  2016-12-16 22:40   ` Bowers, AndrewX
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 10/11] i40e: Error handling for link event Bimmy Pujari
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 11/11] i40e: mark the value passed to csum_replace_by_diff as __wsum Bimmy Pujari
  10 siblings, 1 reply; 22+ messages in thread
From: Bimmy Pujari @ 2016-12-12 23:44 UTC (permalink / raw)
  To: intel-wired-lan

From: Jacob Keller <jacob.e.keller@intel.com>

This ensures that the pvid which is stored in __le16 format is converted
to the CPU format. This will fix comparison issues on Big Endian
platforms.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Change-ID: I92c80d1315dc2a0f9f095d5a0c48d461beb052ed
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 128a21e..99ea5652 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -1260,6 +1260,7 @@ static int i40e_correct_mac_vlan_filters(struct i40e_vsi *vsi,
 					 struct hlist_head *tmp_del_list,
 					 int vlan_filters)
 {
+	s16 pvid = le16_to_cpu(vsi->info.pvid);
 	struct i40e_mac_filter *f, *add_head;
 	struct i40e_new_mac_filter *new;
 	struct hlist_node *h;
@@ -1281,8 +1282,8 @@ static int i40e_correct_mac_vlan_filters(struct i40e_vsi *vsi,
 
 	/* Update the filters about to be added in place */
 	hlist_for_each_entry(new, tmp_add_list, hlist) {
-		if (vsi->info.pvid && new->f->vlan != vsi->info.pvid)
-			new->f->vlan = vsi->info.pvid;
+		if (pvid && new->f->vlan != pvid)
+			new->f->vlan = pvid;
 		else if (vlan_filters && new->f->vlan == I40E_VLAN_ANY)
 			new->f->vlan = 0;
 		else if (!vlan_filters && new->f->vlan == 0)
@@ -1296,12 +1297,12 @@ static int i40e_correct_mac_vlan_filters(struct i40e_vsi *vsi,
 		 * order to avoid duplicating code for adding the new filter
 		 * then deleting the old filter.
 		 */
-		if ((vsi->info.pvid && f->vlan != vsi->info.pvid) ||
+		if ((pvid && f->vlan != pvid) ||
 		    (vlan_filters && f->vlan == I40E_VLAN_ANY) ||
 		    (!vlan_filters && f->vlan == 0)) {
 			/* Determine the new vlan we will be adding */
-			if (vsi->info.pvid)
-				new_vlan = vsi->info.pvid;
+			if (pvid)
+				new_vlan = pvid;
 			else if (vlan_filters)
 				new_vlan = 0;
 			else
-- 
2.4.11


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Intel-wired-lan] [next PATCH S57 10/11] i40e: Error handling for link event
  2016-12-12 23:44 [Intel-wired-lan] [next PATCH S57 00/11] i40e/i40evf updates Bimmy Pujari
                   ` (8 preceding siblings ...)
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 09/11] i40e: properly convert le16 value to CPU format Bimmy Pujari
@ 2016-12-12 23:44 ` Bimmy Pujari
  2016-12-16 22:47   ` Bowers, AndrewX
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 11/11] i40e: mark the value passed to csum_replace_by_diff as __wsum Bimmy Pujari
  10 siblings, 1 reply; 22+ messages in thread
From: Bimmy Pujari @ 2016-12-12 23:44 UTC (permalink / raw)
  To: intel-wired-lan

From: Harshitha Ramamurthy <harshitha.ramamurthy@intel.com>

There exists an intermittent bug which causes the 'Link Detected'
field reported by the 'ethtool <iface>' command to be 'Yes' when
in fact, there is no link. This patch fixes the problem by
enabling temporary link polling when i40e_get_link_status returns
an error. This causes the driver to remember that an admin queue
command failed and polls, until the function returns with a success.

Signed-off-by: Harshitha Ramamurthy <harshitha.ramamurthy@intel.com>
Change-Id: I64c69b008db4017b8729f3fc27b8f65c8fe2eaa0
---
 drivers/net/ethernet/intel/i40e/i40e.h      |  1 +
 drivers/net/ethernet/intel/i40e/i40e_main.c | 14 ++++++++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 0f13d19..19a296d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -388,6 +388,7 @@ struct i40e_pf {
 #define I40E_FLAG_HAVE_CRT_RETIMER		BIT_ULL(52)
 #define I40E_FLAG_PTP_L4_CAPABLE		BIT_ULL(53)
 #define I40E_FLAG_WOL_MC_MAGIC_PKT_WAKE		BIT_ULL(54)
+#define I40E_FLAG_TEMP_LINK_POLLING		BIT_ULL(55)
 
 	/* tracks features that get auto disabled by errors */
 	u64 auto_disable_flags;
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 99ea5652..ef8dc28 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -6367,7 +6367,16 @@ static void i40e_link_event(struct i40e_pf *pf)
 	old_link = (pf->hw.phy.link_info_old.link_info & I40E_AQ_LINK_UP);
 
 	status = i40e_get_link_status(&pf->hw, &new_link);
-	if (status) {
+
+	/* On success, disable temp link polling */
+	if (status == I40E_SUCCESS) {
+		if (pf->flags & I40E_FLAG_TEMP_LINK_POLLING)
+			pf->flags &= ~I40E_FLAG_TEMP_LINK_POLLING;
+	} else {
+		/* Enable link polling temporarily until i40e_get_link_status
+		 * returns I40E_SUCCESS
+		 */
+		pf->flags |= I40E_FLAG_TEMP_LINK_POLLING;
 		dev_dbg(&pf->pdev->dev, "couldn't get link state, status: %d\n",
 			status);
 		return;
@@ -6419,7 +6428,8 @@ static void i40e_watchdog_subtask(struct i40e_pf *pf)
 		return;
 	pf->service_timer_previous = jiffies;
 
-	if (pf->flags & I40E_FLAG_LINK_POLLING_ENABLED)
+	if ((pf->flags & I40E_FLAG_LINK_POLLING_ENABLED) ||
+	    (pf->flags & I40E_FLAG_TEMP_LINK_POLLING))
 		i40e_link_event(pf);
 
 	/* Update the stats for active netdevs so the network stack
-- 
2.4.11


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Intel-wired-lan] [next PATCH S57 11/11] i40e: mark the value passed to csum_replace_by_diff as __wsum
  2016-12-12 23:44 [Intel-wired-lan] [next PATCH S57 00/11] i40e/i40evf updates Bimmy Pujari
                   ` (9 preceding siblings ...)
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 10/11] i40e: Error handling for link event Bimmy Pujari
@ 2016-12-12 23:44 ` Bimmy Pujari
  2016-12-16 22:48   ` Bowers, AndrewX
  10 siblings, 1 reply; 22+ messages in thread
From: Bimmy Pujari @ 2016-12-12 23:44 UTC (permalink / raw)
  To: intel-wired-lan

From: Jacob Keller <jacob.e.keller@intel.com>

Fix, or rather, avoid a sparse warning caused by the fact that
csum_replace_by_diff expects to receive a __wsum value. Since the
calculation appears to work, simply typecast the passed paylen value to
__wsum to avoid the warning.

This seems pretty fishy since __wsum was obviously annotated as
a separate type on purpose, so this throws the entire calculation into
question. Since it currently appears to behave as expected, the typecast
is probably safe.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Change-ID: I4fdc5cddd589abc16098176e8a61127e761488f4
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 5 +++--
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
index 8531f4b..a623de9 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c
@@ -2335,7 +2335,8 @@ static int i40e_tso(struct i40e_tx_buffer *first, u8 *hdr_len,
 
 			/* remove payload length from outer checksum */
 			paylen = skb->len - l4_offset;
-			csum_replace_by_diff(&l4.udp->check, htonl(paylen));
+			csum_replace_by_diff(&l4.udp->check,
+					     (__force __wsum)htonl(paylen));
 		}
 
 		/* reset pointers to inner headers */
@@ -2356,7 +2357,7 @@ static int i40e_tso(struct i40e_tx_buffer *first, u8 *hdr_len,
 
 	/* remove payload length from inner checksum */
 	paylen = skb->len - l4_offset;
-	csum_replace_by_diff(&l4.tcp->check, htonl(paylen));
+	csum_replace_by_diff(&l4.tcp->check, (__force __wsum)htonl(paylen));
 
 	/* compute length of segmentation header */
 	*hdr_len = (l4.tcp->doff * 4) + l4_offset;
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
index 45792dd..cd0e28f 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.c
@@ -1629,7 +1629,8 @@ static int i40e_tso(struct i40e_tx_buffer *first, u8 *hdr_len,
 
 			/* remove payload length from outer checksum */
 			paylen = skb->len - l4_offset;
-			csum_replace_by_diff(&l4.udp->check, htonl(paylen));
+			csum_replace_by_diff(&l4.udp->check,
+					     (__force __wsum)htonl(paylen));
 		}
 
 		/* reset pointers to inner headers */
@@ -1650,7 +1651,7 @@ static int i40e_tso(struct i40e_tx_buffer *first, u8 *hdr_len,
 
 	/* remove payload length from inner checksum */
 	paylen = skb->len - l4_offset;
-	csum_replace_by_diff(&l4.tcp->check, htonl(paylen));
+	csum_replace_by_diff(&l4.tcp->check, (__force __wsum)htonl(paylen));
 
 	/* compute length of segmentation header */
 	*hdr_len = (l4.tcp->doff * 4) + l4_offset;
-- 
2.4.11


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Intel-wired-lan] [next PATCH S57 01/11] i40e: fix disable overflow promiscuous mode
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 01/11] i40e: fix disable overflow promiscuous mode Bimmy Pujari
@ 2016-12-16 20:06   ` Bowers, AndrewX
  0 siblings, 0 replies; 22+ messages in thread
From: Bowers, AndrewX @ 2016-12-16 20:06 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Bimmy Pujari
> Sent: Monday, December 12, 2016 3:44 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Brady, Alan <alan.brady@intel.com>
> Subject: [Intel-wired-lan] [next PATCH S57 01/11] i40e: fix disable overflow
> promiscuous mode
> 
> From: Alan Brady <alan.brady@intel.com>
> 
> There exists a bug in which the driver is unable to exit overflow promiscuous
> mode after having added "too many" mac filters.  It is expected that after
> triggering overflow promiscuous, removing the failed/extra filters should
> then disable overflow promiscuous mode.
> 
> The bug exists because we were intentionally skipping the sync_vsi_filter
> path in cases where we were removing failed filters since they shouldn't
> have been added to the firmware in the first place, however we still need to
> go through the sync_vsi_filter code path to determine whether or not it is ok
> to exit overflow promiscuous mode.  This patch fixes the bug by making sure
> we go through the sync_vsi_filter path in cases of failed filters.
> 
> Signed-off-by: Alan Brady <alan.brady@intel.com>
> Change-ID: I634d249ca3e5fa50729553137c295e73e7722143
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Intel-wired-lan] [next PATCH S57 03/11] i40e: remove unnecessary call to i40e_update_link_info
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 03/11] i40e: remove unnecessary call to i40e_update_link_info Bimmy Pujari
@ 2016-12-16 21:54   ` Bowers, AndrewX
  0 siblings, 0 replies; 22+ messages in thread
From: Bowers, AndrewX @ 2016-12-16 21:54 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Bimmy Pujari
> Sent: Monday, December 12, 2016 3:44 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S57 03/11] i40e: remove unnecessary
> call to i40e_update_link_info
> 
> From: Jacob Keller <jacob.e.keller@intel.com>
> 
> This call is made just prior to running i40e_link_event. In i40e_link_event, we
> set hw->phy.get_link_info to true just prior to calling i40e_get_link_status,
> which conveniently runs i40e_update_link_info for us. Thus, we are running
> i40e_update_link_info twice, which seems like something we don't need to
> do...
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Change-ID: I36467a570f44b7546d218c99e134ff97c2709315
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 1 -
>  1 file changed, 1 deletion(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Intel-wired-lan] [next PATCH S57 04/11] i40evf: free rings in remove function
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 04/11] i40evf: free rings in remove function Bimmy Pujari
@ 2016-12-16 22:10   ` Bowers, AndrewX
  0 siblings, 0 replies; 22+ messages in thread
From: Bowers, AndrewX @ 2016-12-16 22:10 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Bimmy Pujari
> Sent: Monday, December 12, 2016 3:44 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S57 04/11] i40evf: free rings in remove
> function
> 
> From: Mitch Williams <mitch.a.williams@intel.com>
> 
> When the i40evf_remove() calls netdev close, the device doesn't actually
> close - it schedules the work for the watchdog to perform. Since we're
> stopping the watchdog, this work doesn't get done. However, we're
> resetting the part, so we can free resources after the reset request has gone
> through. This plugs a memory leak.
> 
> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
> Change-ID: Id5335dcaf76ce00d2a4c3d26e9faf711d7f051cf
> ---
> Testing Hints : Load/unload test
> 
>  drivers/net/ethernet/intel/i40evf/i40evf_main.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Intel-wired-lan] [next PATCH S57 05/11] i40evf: add comment
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 05/11] i40evf: add comment Bimmy Pujari
@ 2016-12-16 22:13   ` Bowers, AndrewX
  0 siblings, 0 replies; 22+ messages in thread
From: Bowers, AndrewX @ 2016-12-16 22:13 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Bimmy Pujari
> Sent: Monday, December 12, 2016 3:44 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S57 05/11] i40evf: add comment
> 
> From: Mitch Williams <mitch.a.williams@intel.com>
> 
> Add a comment to reduce confusion.
> 
> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
> Change-ID: I3d5819c0f3f5174680442ae54398a073d4a61f4f
> ---
> Testing Hints : No code change, just a comment
> 
>  drivers/net/ethernet/intel/i40evf/i40evf_main.c | 5 +++++
>  1 file changed, 5 insertions(+)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Intel-wired-lan] [next PATCH S57 06/11] i40e: Fix Adaptive ITR enabling
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 06/11] i40e: Fix Adaptive ITR enabling Bimmy Pujari
@ 2016-12-16 22:31   ` Bowers, AndrewX
  0 siblings, 0 replies; 22+ messages in thread
From: Bowers, AndrewX @ 2016-12-16 22:31 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Bimmy Pujari
> Sent: Monday, December 12, 2016 3:44 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S57 06/11] i40e: Fix Adaptive ITR
> enabling
> 
> From: Carolyn Wyborny <carolyn.wyborny@intel.com>
> 
> This patch fixes a bug introduced with the addition of the per queue ITR
> feature support in ethtool.  With that addition, there were functions added
> which converted the ITR settings to binary values.
> The IS_ENABLED macros that run on those values check whether a bit is set
> or not and with the value being binary, the bit check always returned ITR
> disabled which prevents any updating of the ITR rate.
> This patch fixes the problem by changing the functions to return the current
> ITR value instead and renaming it to better reflect its function.  These
> functions now provide a value which will be accurately asessed and update
> the ITR as intended.
> 
> Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
> Change-ID: I14f1d088d052e27f652aaa3113e186415ddea1fc
> ---
>  drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 12 ++++++------
>  drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 12 ++++++------
>  2 files changed, 12 insertions(+), 12 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Intel-wired-lan] [next PATCH S57 07/11] i40e: refactor AQ CMD buffer debug printing
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 07/11] i40e: refactor AQ CMD buffer debug printing Bimmy Pujari
@ 2016-12-16 22:32   ` Bowers, AndrewX
  0 siblings, 0 replies; 22+ messages in thread
From: Bowers, AndrewX @ 2016-12-16 22:32 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Bimmy Pujari
> Sent: Monday, December 12, 2016 3:44 PM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Brady, Alan <alan.brady@intel.com>
> Subject: [Intel-wired-lan] [next PATCH S57 07/11] i40e: refactor AQ CMD
> buffer debug printing
> 
> From: Alan Brady <alan.brady@intel.com>
> 
> This patch refactors the '%*ph' printk format specifier to instead use the
> print_hex_dump function, as recommended by the '%*ph' documentation.
> This produces better/more standardized output.
> 
> Signed-off-by: Alan Brady <alan.brady@intel.com>
> Change-ID: Id56700b4e8abc40ff8c04bc8379e7df04cb4d6fd
> ---
>  drivers/net/ethernet/intel/i40e/i40e_common.c   | 19 ++++++++++++-------
>  drivers/net/ethernet/intel/i40evf/i40e_common.c | 19 ++++++++++++------
> -
>  2 files changed, 24 insertions(+), 14 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Intel-wired-lan] [next PATCH S57 08/11] i40e: convert to cpu from le16 to generate switch_id correctly
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 08/11] i40e: convert to cpu from le16 to generate switch_id correctly Bimmy Pujari
@ 2016-12-16 22:37   ` Bowers, AndrewX
  0 siblings, 0 replies; 22+ messages in thread
From: Bowers, AndrewX @ 2016-12-16 22:37 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Bimmy Pujari
> Sent: Monday, December 12, 2016 3:44 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S57 08/11] i40e: convert to cpu from
> le16 to generate switch_id correctly
> 
> From: Jacob Keller <jacob.e.keller@intel.com>
> 
> On Big Endian platforms we would incorrectly calculate the wrong switch id
> since we did not properly convert the le16 value into CPU format.
> Caught by sparse.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Change-ID: I69a2f9fa064a0a91691f7d0e6fcc206adceb8e36
> ---
>  drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Intel-wired-lan] [next PATCH S57 09/11] i40e: properly convert le16 value to CPU format
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 09/11] i40e: properly convert le16 value to CPU format Bimmy Pujari
@ 2016-12-16 22:40   ` Bowers, AndrewX
  0 siblings, 0 replies; 22+ messages in thread
From: Bowers, AndrewX @ 2016-12-16 22:40 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Bimmy Pujari
> Sent: Monday, December 12, 2016 3:44 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S57 09/11] i40e: properly convert le16
> value to CPU format
> 
> From: Jacob Keller <jacob.e.keller@intel.com>
> 
> This ensures that the pvid which is stored in __le16 format is converted to
> the CPU format. This will fix comparison issues on Big Endian platforms.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Change-ID: I92c80d1315dc2a0f9f095d5a0c48d461beb052ed
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Intel-wired-lan] [next PATCH S57 10/11] i40e: Error handling for link event
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 10/11] i40e: Error handling for link event Bimmy Pujari
@ 2016-12-16 22:47   ` Bowers, AndrewX
  0 siblings, 0 replies; 22+ messages in thread
From: Bowers, AndrewX @ 2016-12-16 22:47 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Bimmy Pujari
> Sent: Monday, December 12, 2016 3:44 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S57 10/11] i40e: Error handling for link
> event
> 
> From: Harshitha Ramamurthy <harshitha.ramamurthy@intel.com>
> 
> There exists an intermittent bug which causes the 'Link Detected'
> field reported by the 'ethtool <iface>' command to be 'Yes' when in fact,
> there is no link. This patch fixes the problem by enabling temporary link
> polling when i40e_get_link_status returns an error. This causes the driver to
> remember that an admin queue command failed and polls, until the function
> returns with a success.
> 
> Signed-off-by: Harshitha Ramamurthy <harshitha.ramamurthy@intel.com>
> Change-Id: I64c69b008db4017b8729f3fc27b8f65c8fe2eaa0
> ---
>  drivers/net/ethernet/intel/i40e/i40e.h      |  1 +
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 14 ++++++++++++--
>  2 files changed, 13 insertions(+), 2 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>



^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Intel-wired-lan] [next PATCH S57 11/11] i40e: mark the value passed to csum_replace_by_diff as __wsum
  2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 11/11] i40e: mark the value passed to csum_replace_by_diff as __wsum Bimmy Pujari
@ 2016-12-16 22:48   ` Bowers, AndrewX
  0 siblings, 0 replies; 22+ messages in thread
From: Bowers, AndrewX @ 2016-12-16 22:48 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Bimmy Pujari
> Sent: Monday, December 12, 2016 3:44 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S57 11/11] i40e: mark the value
> passed to csum_replace_by_diff as __wsum
> 
> From: Jacob Keller <jacob.e.keller@intel.com>
> 
> Fix, or rather, avoid a sparse warning caused by the fact that
> csum_replace_by_diff expects to receive a __wsum value. Since the
> calculation appears to work, simply typecast the passed paylen value to
> __wsum to avoid the warning.
> 
> This seems pretty fishy since __wsum was obviously annotated as a separate
> type on purpose, so this throws the entire calculation into question. Since it
> currently appears to behave as expected, the typecast is probably safe.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Change-ID: I4fdc5cddd589abc16098176e8a61127e761488f4
> ---
>  drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 5 +++--
>  drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 5 +++--
>  2 files changed, 6 insertions(+), 4 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers@intel.com>



^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2016-12-16 22:48 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-12 23:44 [Intel-wired-lan] [next PATCH S57 00/11] i40e/i40evf updates Bimmy Pujari
2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 01/11] i40e: fix disable overflow promiscuous mode Bimmy Pujari
2016-12-16 20:06   ` Bowers, AndrewX
2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 02/11] i40e: enable mc magic pkt wakeup during power down Bimmy Pujari
2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 03/11] i40e: remove unnecessary call to i40e_update_link_info Bimmy Pujari
2016-12-16 21:54   ` Bowers, AndrewX
2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 04/11] i40evf: free rings in remove function Bimmy Pujari
2016-12-16 22:10   ` Bowers, AndrewX
2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 05/11] i40evf: add comment Bimmy Pujari
2016-12-16 22:13   ` Bowers, AndrewX
2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 06/11] i40e: Fix Adaptive ITR enabling Bimmy Pujari
2016-12-16 22:31   ` Bowers, AndrewX
2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 07/11] i40e: refactor AQ CMD buffer debug printing Bimmy Pujari
2016-12-16 22:32   ` Bowers, AndrewX
2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 08/11] i40e: convert to cpu from le16 to generate switch_id correctly Bimmy Pujari
2016-12-16 22:37   ` Bowers, AndrewX
2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 09/11] i40e: properly convert le16 value to CPU format Bimmy Pujari
2016-12-16 22:40   ` Bowers, AndrewX
2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 10/11] i40e: Error handling for link event Bimmy Pujari
2016-12-16 22:47   ` Bowers, AndrewX
2016-12-12 23:44 ` [Intel-wired-lan] [next PATCH S57 11/11] i40e: mark the value passed to csum_replace_by_diff as __wsum Bimmy Pujari
2016-12-16 22:48   ` Bowers, AndrewX

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.