All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-wired-lan] [next PATCH S72-V3 01/13] i40evf: assign num_active_queues inside i40evf_alloc_queues
@ 2017-06-07  9:43 Alice Michael
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 02/13] i40e/i40evf: update WOL and I40E_AQC_ADDR_VALID_MASK flags Alice Michael
                   ` (12 more replies)
  0 siblings, 13 replies; 26+ messages in thread
From: Alice Michael @ 2017-06-07  9:43 UTC (permalink / raw)
  To: intel-wired-lan

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

The variable num_active_queues represents the number of active queues we
have for the device. We assign this pretty early in i40evf_init_subtask.

Several code locations are written with loops over the tx_rings and
rx_rings structures, which don't get allocated until
i40evf_alloc_queues, and which get freed by i40evf_free_queues.

These call sites were written under the assumption that tx_rings and
rx_rings would always be allocated at least when num_active_queues is
non-zero.

Lets fix this by moving the assignment into the function where we
allocate queues. We'll use a temporary variable for storage so that we
don't assign the value in the adapter structure until after the rings
have been set up.

Finally, when we free the queues, we'll clear the value to ensure that
we do not loop over the rings memory that no longer exists.

This resolves a possible NULL pointer derference in
i40evf_get_ethtool_stats which could occur if the VF fails to recover
from a reset, and then a user requests statistics.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 3a3ca96..7c213a3 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -1198,6 +1198,7 @@ static void i40evf_free_queues(struct i40evf_adapter *adapter)
 {
 	if (!adapter->vsi_res)
 		return;
+	adapter->num_active_queues = 0;
 	kfree(adapter->tx_rings);
 	adapter->tx_rings = NULL;
 	kfree(adapter->rx_rings);
@@ -1214,18 +1215,22 @@ static void i40evf_free_queues(struct i40evf_adapter *adapter)
  **/
 static int i40evf_alloc_queues(struct i40evf_adapter *adapter)
 {
-	int i;
+	int i, num_active_queues;
+
+	num_active_queues = min_t(int,
+				  adapter->vsi_res->num_queue_pairs,
+				  (int)(num_online_cpus()));
 
-	adapter->tx_rings = kcalloc(adapter->num_active_queues,
+	adapter->tx_rings = kcalloc(num_active_queues,
 				    sizeof(struct i40e_ring), GFP_KERNEL);
 	if (!adapter->tx_rings)
 		goto err_out;
-	adapter->rx_rings = kcalloc(adapter->num_active_queues,
+	adapter->rx_rings = kcalloc(num_active_queues,
 				    sizeof(struct i40e_ring), GFP_KERNEL);
 	if (!adapter->rx_rings)
 		goto err_out;
 
-	for (i = 0; i < adapter->num_active_queues; i++) {
+	for (i = 0; i < num_active_queues; i++) {
 		struct i40e_ring *tx_ring;
 		struct i40e_ring *rx_ring;
 
@@ -1247,6 +1252,8 @@ static int i40evf_alloc_queues(struct i40evf_adapter *adapter)
 		rx_ring->rx_itr_setting = (I40E_ITR_DYNAMIC | I40E_ITR_RX_DEF);
 	}
 
+	adapter->num_active_queues = num_active_queues;
+
 	return 0;
 
 err_out:
@@ -2636,9 +2643,6 @@ static void i40evf_init_task(struct work_struct *work)
 	adapter->watchdog_timer.data = (unsigned long)adapter;
 	mod_timer(&adapter->watchdog_timer, jiffies + 1);
 
-	adapter->num_active_queues = min_t(int,
-					   adapter->vsi_res->num_queue_pairs,
-					   (int)(num_online_cpus()));
 	adapter->tx_desc_count = I40EVF_DEFAULT_TXD;
 	adapter->rx_desc_count = I40EVF_DEFAULT_RXD;
 	err = i40evf_init_interrupt_scheme(adapter);
-- 
2.9.3


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

* [Intel-wired-lan] [next PATCH S72-V3 02/13] i40e/i40evf: update WOL and I40E_AQC_ADDR_VALID_MASK flags
  2017-06-07  9:43 [Intel-wired-lan] [next PATCH S72-V3 01/13] i40evf: assign num_active_queues inside i40evf_alloc_queues Alice Michael
@ 2017-06-07  9:43 ` Alice Michael
  2017-06-08 18:22   ` Bowers, AndrewX
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 03/13] i40e: use dev_dbg instead of dev_info when warning about missing routine Alice Michael
                   ` (11 subsequent siblings)
  12 siblings, 1 reply; 26+ messages in thread
From: Alice Michael @ 2017-06-07  9:43 UTC (permalink / raw)
  To: intel-wired-lan

Update a few flags related to FW interactions.

Copyright updated to 2017.

Signed-off-by: Alice Michael <alice.michael@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h   | 4 ++--
 drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
index 5eb0411..5d5f422 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Intel Ethernet Controller XL710 Family Linux Driver
- * Copyright(c) 2013 - 2016 Intel Corporation.
+ * Copyright(c) 2013 - 2017 Intel Corporation.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -531,7 +531,7 @@ struct i40e_aqc_mac_address_read {
 #define I40E_AQC_PORT_ADDR_VALID	0x40
 #define I40E_AQC_WOL_ADDR_VALID		0x80
 #define I40E_AQC_MC_MAG_EN_VALID	0x100
-#define I40E_AQC_ADDR_VALID_MASK	0x1F0
+#define I40E_AQC_ADDR_VALID_MASK	0x3F0
 	u8	reserved[6];
 	__le32	addr_high;
 	__le32	addr_low;
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
index 91d8786..83e63e5 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Intel Ethernet Controller XL710 Family Linux Virtual Function Driver
- * Copyright(c) 2013 - 2016 Intel Corporation.
+ * Copyright(c) 2013 - 2017 Intel Corporation.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -528,7 +528,7 @@ struct i40e_aqc_mac_address_read {
 #define I40E_AQC_PORT_ADDR_VALID	0x40
 #define I40E_AQC_WOL_ADDR_VALID		0x80
 #define I40E_AQC_MC_MAG_EN_VALID	0x100
-#define I40E_AQC_ADDR_VALID_MASK	0x1F0
+#define I40E_AQC_ADDR_VALID_MASK	0x3F0
 	u8	reserved[6];
 	__le32	addr_high;
 	__le32	addr_low;
@@ -586,6 +586,7 @@ struct i40e_aqc_set_wol_filter {
 	__le16 cmd_flags;
 #define I40E_AQC_SET_WOL_FILTER				0x8000
 #define I40E_AQC_SET_WOL_FILTER_NO_TCO_WOL		0x4000
+#define I40E_AQC_SET_WOL_FILTER_WOL_PRESERVE_ON_PFR	0x2000
 #define I40E_AQC_SET_WOL_FILTER_ACTION_CLEAR		0
 #define I40E_AQC_SET_WOL_FILTER_ACTION_SET		1
 	__le16 valid_flags;
-- 
2.9.3


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

* [Intel-wired-lan] [next PATCH S72-V3 03/13] i40e: use dev_dbg instead of dev_info when warning about missing routine
  2017-06-07  9:43 [Intel-wired-lan] [next PATCH S72-V3 01/13] i40evf: assign num_active_queues inside i40evf_alloc_queues Alice Michael
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 02/13] i40e/i40evf: update WOL and I40E_AQC_ADDR_VALID_MASK flags Alice Michael
@ 2017-06-07  9:43 ` Alice Michael
  2017-06-08 18:24   ` Bowers, AndrewX
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 04/13] i40e: comment that udp_port must be in host byte order Alice Michael
                   ` (10 subsequent siblings)
  12 siblings, 1 reply; 26+ messages in thread
From: Alice Michael @ 2017-06-07  9:43 UTC (permalink / raw)
  To: intel-wired-lan

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

When searching for the vf_capability client routine, dev_info() was
used, instead of the normal dev_dbg(). This causes the message to be
displayed at standard log levels which can cause administrators to
worry. Avoid this by using dev_dbg instead.

Copyright updated to 2017.

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

diff --git a/drivers/net/ethernet/intel/i40e/i40e_client.c b/drivers/net/ethernet/intel/i40e/i40e_client.c
index 36f694c..1b1e2ac 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_client.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_client.c
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Intel Ethernet Controller XL710 Family Linux Driver
- * Copyright(c) 2013 - 2015 Intel Corporation.
+ * Copyright(c) 2013 - 2017 Intel Corporation.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -273,8 +273,8 @@ int i40e_vf_client_capable(struct i40e_pf *pf, u32 vf_id)
 	if (!cdev || !cdev->client)
 		goto out;
 	if (!cdev->client->ops || !cdev->client->ops->vf_capable) {
-		dev_info(&pf->pdev->dev,
-			 "Cannot locate client instance VF capability routine\n");
+		dev_dbg(&pf->pdev->dev,
+			"Cannot locate client instance VF capability routine\n");
 		goto out;
 	}
 	if (!test_bit(__I40E_CLIENT_INSTANCE_OPENED, &cdev->state))
-- 
2.9.3


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

* [Intel-wired-lan] [next PATCH S72-V3 04/13] i40e: comment that udp_port must be in host byte order
  2017-06-07  9:43 [Intel-wired-lan] [next PATCH S72-V3 01/13] i40evf: assign num_active_queues inside i40evf_alloc_queues Alice Michael
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 02/13] i40e/i40evf: update WOL and I40E_AQC_ADDR_VALID_MASK flags Alice Michael
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 03/13] i40e: use dev_dbg instead of dev_info when warning about missing routine Alice Michael
@ 2017-06-07  9:43 ` Alice Michael
  2017-06-08 18:28   ` Bowers, AndrewX
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 05/13] i40e: Fix potential out of bound array access Alice Michael
                   ` (9 subsequent siblings)
  12 siblings, 1 reply; 26+ messages in thread
From: Alice Michael @ 2017-06-07  9:43 UTC (permalink / raw)
  To: intel-wired-lan

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

The firmware expects the port number passed when setting up
the UDP tunnel configuration to be in Little Endian format.
The i40e_aq_add_udp_tunnel command byte swaps the value from
host order to Little Endian.

Since commit fe0b0cd97b4f ("i40e: send correct port number to
AdminQ when enabling UDP tunnels") we've correctly
sent the value in host order.

Let's also add a comment to the function explaining that it must
be in host order, as the port numbers are commonly stored as Big
Endian values.

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

diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index cbad4eb..8e082a9 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -3614,11 +3614,15 @@ i40e_status i40e_aq_get_cee_dcb_config(struct i40e_hw *hw,
 /**
  * i40e_aq_add_udp_tunnel
  * @hw: pointer to the hw struct
- * @udp_port: the UDP port to add
+ * @udp_port: the UDP port to add in Host byte order
  * @header_len: length of the tunneling header length in DWords
  * @protocol_index: protocol index type
  * @filter_index: pointer to filter index
  * @cmd_details: pointer to command details structure or NULL
+ *
+ * Note: Firmware expects the udp_port value to be in Little Endian format,
+ * and this function will call cpu_to_le16 to convert from Host byte order to
+ * Little Endian order.
  **/
 i40e_status i40e_aq_add_udp_tunnel(struct i40e_hw *hw,
 				u16 udp_port, u8 protocol_index,
-- 
2.9.3


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

* [Intel-wired-lan] [next PATCH S72-V3 05/13] i40e: Fix potential out of bound array access
  2017-06-07  9:43 [Intel-wired-lan] [next PATCH S72-V3 01/13] i40evf: assign num_active_queues inside i40evf_alloc_queues Alice Michael
                   ` (2 preceding siblings ...)
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 04/13] i40e: comment that udp_port must be in host byte order Alice Michael
@ 2017-06-07  9:43 ` Alice Michael
  2017-06-08 18:29   ` Bowers, AndrewX
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 06/13] i40e: Support firmware CEE DCB UP to TC map re-definition Alice Michael
                   ` (8 subsequent siblings)
  12 siblings, 1 reply; 26+ messages in thread
From: Alice Michael @ 2017-06-07  9:43 UTC (permalink / raw)
  To: intel-wired-lan

From: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>

This is a fix for the static code analysis issue where dcbcfg->numapps
could be greater than size of array (i.e dcbcfg->app[I40E_DCBX_MAX_APPS]).
The fix makes sure that the array is not accessed past the size of
of the array (i.e. I40E_DCBX_MAX_APPS).

Copyright updated to 2017.

Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_dcb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_dcb.c b/drivers/net/ethernet/intel/i40e/i40e_dcb.c
index 0fab3a9..bf1d67e 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_dcb.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_dcb.c
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Intel Ethernet Controller XL710 Family Linux Driver
- * Copyright(c) 2013 - 2014 Intel Corporation.
+ * Copyright(c) 2013 - 2017 Intel Corporation.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -390,6 +390,8 @@ static void i40e_parse_cee_app_tlv(struct i40e_cee_feat_tlv *tlv,
 
 	if (!dcbcfg->numapps)
 		return;
+	if (dcbcfg->numapps > I40E_DCBX_MAX_APPS)
+		dcbcfg->numapps = I40E_DCBX_MAX_APPS;
 
 	for (i = 0; i < dcbcfg->numapps; i++) {
 		u8 up, selector;
-- 
2.9.3


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

* [Intel-wired-lan] [next PATCH S72-V3 06/13] i40e: Support firmware CEE DCB UP to TC map re-definition
  2017-06-07  9:43 [Intel-wired-lan] [next PATCH S72-V3 01/13] i40evf: assign num_active_queues inside i40evf_alloc_queues Alice Michael
                   ` (3 preceding siblings ...)
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 05/13] i40e: Fix potential out of bound array access Alice Michael
@ 2017-06-07  9:43 ` Alice Michael
  2017-06-12 16:51   ` Bowers, AndrewX
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 07/13] i40e: Add message for unsupported MFP mode Alice Michael
                   ` (7 subsequent siblings)
  12 siblings, 1 reply; 26+ messages in thread
From: Alice Michael @ 2017-06-07  9:43 UTC (permalink / raw)
  To: intel-wired-lan

Changes parsing of FW 4.33 AQ command Get CEE DCBX OPER CFG (0x0A07).
Change is required because FW now creates the oper_prio_tc
nibbles reversed from those in the CEE Priority Group sub-TLV.
This change will only apply to FW 4.33 as future FW versions will use a
different function to parse the CEE data.

Signed-off-by: Greg Bowers <gregory.j.bowers@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_dcb.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_dcb.c b/drivers/net/ethernet/intel/i40e/i40e_dcb.c
index bf1d67e..55079fe 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_dcb.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_dcb.c
@@ -620,14 +620,17 @@ static void i40e_cee_to_dcb_v1_config(
 	/* CEE PG data to ETS config */
 	dcbcfg->etscfg.maxtcs = cee_cfg->oper_num_tc;
 
+	/* Note that the FW creates the oper_prio_tc nibbles reversed
+	 * from those in the CEE Priority Group sub-TLV.
+	 */
 	for (i = 0; i < 4; i++) {
 		tc = (u8)((cee_cfg->oper_prio_tc[i] &
-			 I40E_CEE_PGID_PRIO_1_MASK) >>
-			 I40E_CEE_PGID_PRIO_1_SHIFT);
-		dcbcfg->etscfg.prioritytable[i*2] =  tc;
-		tc = (u8)((cee_cfg->oper_prio_tc[i] &
 			 I40E_CEE_PGID_PRIO_0_MASK) >>
 			 I40E_CEE_PGID_PRIO_0_SHIFT);
+		dcbcfg->etscfg.prioritytable[i * 2] =  tc;
+		tc = (u8)((cee_cfg->oper_prio_tc[i] &
+			 I40E_CEE_PGID_PRIO_1_MASK) >>
+			 I40E_CEE_PGID_PRIO_1_SHIFT);
 		dcbcfg->etscfg.prioritytable[i*2 + 1] = tc;
 	}
 
-- 
2.9.3


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

* [Intel-wired-lan] [next PATCH S72-V3 07/13] i40e: Add message for unsupported MFP mode
  2017-06-07  9:43 [Intel-wired-lan] [next PATCH S72-V3 01/13] i40evf: assign num_active_queues inside i40evf_alloc_queues Alice Michael
                   ` (4 preceding siblings ...)
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 06/13] i40e: Support firmware CEE DCB UP to TC map re-definition Alice Michael
@ 2017-06-07  9:43 ` Alice Michael
  2017-06-08 18:47   ` Bowers, AndrewX
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 08/13] i40e: genericize the partition bandwidth control Alice Michael
                   ` (6 subsequent siblings)
  12 siblings, 1 reply; 26+ messages in thread
From: Alice Michael @ 2017-06-07  9:43 UTC (permalink / raw)
  To: intel-wired-lan

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

This patch adds a check and message if the device is in
MFP mode as changing RSS input set is not supported in
MFP mode.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 9d3233c..9692a52 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -2711,6 +2711,12 @@ static int i40e_set_rss_hash_opt(struct i40e_pf *pf, struct ethtool_rxnfc *nfc)
 	u8 flow_pctype = 0;
 	u64 i_set, i_setc;
 
+	if (pf->flags & I40E_FLAG_MFP_ENABLED) {
+		dev_err(&pf->pdev->dev,
+			"Change of RSS hash input set is not supported when MFP mode is enabled\n");
+		return -EOPNOTSUPP;
+	}
+
 	/* RSS does not support anything other than hashing
 	 * to queues on src and dst IPs and ports
 	 */
-- 
2.9.3


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

* [Intel-wired-lan] [next PATCH S72-V3 08/13] i40e: genericize the partition bandwidth control
  2017-06-07  9:43 [Intel-wired-lan] [next PATCH S72-V3 01/13] i40evf: assign num_active_queues inside i40evf_alloc_queues Alice Michael
                   ` (5 preceding siblings ...)
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 07/13] i40e: Add message for unsupported MFP mode Alice Michael
@ 2017-06-07  9:43 ` Alice Michael
  2017-06-12 18:07   ` Bowers, AndrewX
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 09/13] i40e: Add support for OEM firmware version Alice Michael
                   ` (5 subsequent siblings)
  12 siblings, 1 reply; 26+ messages in thread
From: Alice Michael @ 2017-06-07  9:43 UTC (permalink / raw)
  To: intel-wired-lan

From: Shannon Nelson <shannon.nelson@intel.com>

Partition bandwidth control is not in just one form of MFP (multi-function
partitioning), so make the code more generic and be sure to nudge the Tx
scheduler for all MFP.

Copyright updated to 2017.

Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e.h      | 13 +++++----
 drivers/net/ethernet/intel/i40e/i40e_main.c | 41 ++++++++++++++---------------
 2 files changed, 26 insertions(+), 28 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 4250ab5..76395e6 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Intel Ethernet Controller XL710 Family Linux Driver
- * Copyright(c) 2013 - 2016 Intel Corporation.
+ * Copyright(c) 2013 - 2017 Intel Corporation.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -516,9 +516,8 @@ struct i40e_pf {
 	bool ptp_tx;
 	bool ptp_rx;
 	u16 rss_table_size; /* HW RSS table size */
-	/* These are only valid in NPAR modes */
-	u32 npar_max_bw;
-	u32 npar_min_bw;
+	u32 max_bw;
+	u32 min_bw;
 
 	u32 ioremap_len;
 	u32 fd_inv;
@@ -971,9 +970,9 @@ int i40e_ptp_get_ts_config(struct i40e_pf *pf, struct ifreq *ifr);
 void i40e_ptp_init(struct i40e_pf *pf);
 void i40e_ptp_stop(struct i40e_pf *pf);
 int i40e_is_vsi_uplink_mode_veb(struct i40e_vsi *vsi);
-i40e_status i40e_get_npar_bw_setting(struct i40e_pf *pf);
-i40e_status i40e_set_npar_bw_setting(struct i40e_pf *pf);
-i40e_status i40e_commit_npar_bw_setting(struct i40e_pf *pf);
+i40e_status i40e_get_partition_bw_setting(struct i40e_pf *pf);
+i40e_status i40e_set_partition_bw_setting(struct i40e_pf *pf);
+i40e_status i40e_commit_partition_bw_setting(struct i40e_pf *pf);
 void i40e_print_link_message(struct i40e_vsi *vsi, bool isup);
 
 static inline bool i40e_enabled_xdp_vsi(struct i40e_vsi *vsi)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 9f4763d..18a9be6 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -1,7 +1,7 @@
 /*******************************************************************************
  *
  * Intel Ethernet Controller XL710 Family Linux Driver
- * Copyright(c) 2013 - 2016 Intel Corporation.
+ * Copyright(c) 2013 - 2017 Intel Corporation.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -8739,10 +8739,10 @@ int i40e_reconfig_rss_queues(struct i40e_pf *pf, int queue_count)
 }
 
 /**
- * i40e_get_npar_bw_setting - Retrieve BW settings for this PF partition
+ * i40e_get_partition_bw_setting - Retrieve BW settings for this PF partition
  * @pf: board private structure
  **/
-i40e_status i40e_get_npar_bw_setting(struct i40e_pf *pf)
+i40e_status i40e_get_partition_bw_setting(struct i40e_pf *pf)
 {
 	i40e_status status;
 	bool min_valid, max_valid;
@@ -8753,27 +8753,27 @@ i40e_status i40e_get_npar_bw_setting(struct i40e_pf *pf)
 
 	if (!status) {
 		if (min_valid)
-			pf->npar_min_bw = min_bw;
+			pf->min_bw = min_bw;
 		if (max_valid)
-			pf->npar_max_bw = max_bw;
+			pf->max_bw = max_bw;
 	}
 
 	return status;
 }
 
 /**
- * i40e_set_npar_bw_setting - Set BW settings for this PF partition
+ * i40e_set_partition_bw_setting - Set BW settings for this PF partition
  * @pf: board private structure
  **/
-i40e_status i40e_set_npar_bw_setting(struct i40e_pf *pf)
+i40e_status i40e_set_partition_bw_setting(struct i40e_pf *pf)
 {
 	struct i40e_aqc_configure_partition_bw_data bw_data;
 	i40e_status status;
 
 	/* Set the valid bit for this PF */
 	bw_data.pf_valid_bits = cpu_to_le16(BIT(pf->hw.pf_id));
-	bw_data.max_bw[pf->hw.pf_id] = pf->npar_max_bw & I40E_ALT_BW_VALUE_MASK;
-	bw_data.min_bw[pf->hw.pf_id] = pf->npar_min_bw & I40E_ALT_BW_VALUE_MASK;
+	bw_data.max_bw[pf->hw.pf_id] = pf->max_bw & I40E_ALT_BW_VALUE_MASK;
+	bw_data.min_bw[pf->hw.pf_id] = pf->min_bw & I40E_ALT_BW_VALUE_MASK;
 
 	/* Set the new bandwidths */
 	status = i40e_aq_configure_partition_bw(&pf->hw, &bw_data, NULL);
@@ -8782,10 +8782,10 @@ i40e_status i40e_set_npar_bw_setting(struct i40e_pf *pf)
 }
 
 /**
- * i40e_commit_npar_bw_setting - Commit BW settings for this PF partition
+ * i40e_commit_partition_bw_setting - Commit BW settings for this PF partition
  * @pf: board private structure
  **/
-i40e_status i40e_commit_npar_bw_setting(struct i40e_pf *pf)
+i40e_status i40e_commit_partition_bw_setting(struct i40e_pf *pf)
 {
 	/* Commit temporary BW setting to permanent NVM image */
 	enum i40e_admin_queue_err last_aq_status;
@@ -8904,16 +8904,19 @@ static int i40e_sw_init(struct i40e_pf *pf)
 	if (pf->hw.func_caps.npar_enable || pf->hw.func_caps.flex10_enable) {
 		pf->flags |= I40E_FLAG_MFP_ENABLED;
 		dev_info(&pf->pdev->dev, "MFP mode Enabled\n");
-		if (i40e_get_npar_bw_setting(pf))
+		if (i40e_get_partition_bw_setting(pf)) {
 			dev_warn(&pf->pdev->dev,
-				 "Could not get NPAR bw settings\n");
-		else
+				 "Could not get partition bw settings\n");
+		} else {
 			dev_info(&pf->pdev->dev,
-				 "Min BW = %8.8x, Max BW = %8.8x\n",
-				 pf->npar_min_bw, pf->npar_max_bw);
+				 "Partition BW Min = %8.8x, Max = %8.8x\n",
+				 pf->min_bw, pf->max_bw);
+
+			/* nudge the Tx scheduler */
+			i40e_set_partition_bw_setting(pf);
+		}
 	}
 
-	/* FW/NVM is not yet fixed in this regard */
 	if ((pf->hw.func_caps.fd_filters_guaranteed > 0) ||
 	    (pf->hw.func_caps.fd_filters_best_effort > 0)) {
 		pf->flags |= I40E_FLAG_FD_ATR_ENABLED;
@@ -9016,10 +9019,6 @@ static int i40e_sw_init(struct i40e_pf *pf)
 
 	mutex_init(&pf->switch_mutex);
 
-	/* If NPAR is enabled nudge the Tx scheduler */
-	if (pf->hw.func_caps.npar_enable && (!i40e_get_npar_bw_setting(pf)))
-		i40e_set_npar_bw_setting(pf);
-
 sw_init_done:
 	return err;
 }
-- 
2.9.3


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

* [Intel-wired-lan] [next PATCH S72-V3 09/13] i40e: Add support for OEM firmware version
  2017-06-07  9:43 [Intel-wired-lan] [next PATCH S72-V3 01/13] i40evf: assign num_active_queues inside i40evf_alloc_queues Alice Michael
                   ` (6 preceding siblings ...)
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 08/13] i40e: genericize the partition bandwidth control Alice Michael
@ 2017-06-07  9:43 ` Alice Michael
  2017-06-14 14:24   ` Bowers, AndrewX
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 10/13] i40e: fix disabling overflow promiscuous mode Alice Michael
                   ` (4 subsequent siblings)
  12 siblings, 1 reply; 26+ messages in thread
From: Alice Michael @ 2017-06-07  9:43 UTC (permalink / raw)
  To: intel-wired-lan

From: Filip Sadowski <filip.sadowski@intel.com>

This patch adds support for OEM firmware version. If OEM specific
adapter is detected ethtool reports OEM product version in firmware
version string instead of etrack id.

Signed-off-by: Filip Sadowski <filip.sadowski@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e.h      | 48 ++++++++++++++++++++---------
 drivers/net/ethernet/intel/i40e/i40e_main.c | 47 ++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+), 14 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 962ef98..cb102cd 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -103,6 +103,12 @@
 	(I40E_AQ_PHY_DEBUG_DISABLE_LINK_FW | \
 	I40E_AQ_PHY_DEBUG_DISABLE_ALL_LINK_FW)
 
+#define I40E_OEM_EETRACK_ID		0xffffffff
+#define I40E_OEM_GEN_SHIFT		24
+#define I40E_OEM_SNAP_MASK		0x00ff0000
+#define I40E_OEM_SNAP_SHIFT		16
+#define I40E_OEM_RELEASE_MASK		0x0000ffff
+
 /* The values in here are decimal coded as hex as is the case in the NVM map*/
 #define I40E_CURRENT_NVM_VERSION_HI	0x2
 #define I40E_CURRENT_NVM_VERSION_LO	0x40
@@ -733,22 +739,36 @@ static inline char *i40e_nvm_version_str(struct i40e_hw *hw)
 {
 	static char buf[32];
 	u32 full_ver;
-	u8 ver, patch;
-	u16 build;
 
 	full_ver = hw->nvm.oem_ver;
-	ver = (u8)(full_ver >> I40E_OEM_VER_SHIFT);
-	build = (u16)((full_ver >> I40E_OEM_VER_BUILD_SHIFT) &
-		 I40E_OEM_VER_BUILD_MASK);
-	patch = (u8)(full_ver & I40E_OEM_VER_PATCH_MASK);
-
-	snprintf(buf, sizeof(buf),
-		 "%x.%02x 0x%x %d.%d.%d",
-		 (hw->nvm.version & I40E_NVM_VERSION_HI_MASK) >>
-			I40E_NVM_VERSION_HI_SHIFT,
-		 (hw->nvm.version & I40E_NVM_VERSION_LO_MASK) >>
-			I40E_NVM_VERSION_LO_SHIFT,
-		 hw->nvm.eetrack, ver, build, patch);
+
+	if (hw->nvm.eetrack == I40E_OEM_EETRACK_ID) {
+		u8 gen, snap;
+		u16 release;
+
+		gen = (u8)(full_ver >> I40E_OEM_GEN_SHIFT);
+		snap = (u8)((full_ver & I40E_OEM_SNAP_MASK) >>
+			I40E_OEM_SNAP_SHIFT);
+		release = (u16)(full_ver & I40E_OEM_RELEASE_MASK);
+
+		snprintf(buf, sizeof(buf), "%x.%x.%x", gen, snap, release);
+	} else {
+		u8 ver, patch;
+		u16 build;
+
+		ver = (u8)(full_ver >> I40E_OEM_VER_SHIFT);
+		build = (u16)((full_ver >> I40E_OEM_VER_BUILD_SHIFT) &
+			 I40E_OEM_VER_BUILD_MASK);
+		patch = (u8)(full_ver & I40E_OEM_VER_PATCH_MASK);
+
+		snprintf(buf, sizeof(buf),
+			 "%x.%02x 0x%x %d.%d.%d",
+			 (hw->nvm.version & I40E_NVM_VERSION_HI_MASK) >>
+				I40E_NVM_VERSION_HI_SHIFT,
+			 (hw->nvm.version & I40E_NVM_VERSION_LO_MASK) >>
+				I40E_NVM_VERSION_LO_SHIFT,
+			 hw->nvm.eetrack, ver, build, patch);
+	}
 
 	return buf;
 }
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index e4ae673..5fd4d2f 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -7107,6 +7107,51 @@ static void i40e_send_version(struct i40e_pf *pf)
 }
 
 /**
+ * i40e_get_oem_version - get OEM specific version information
+ * @hw: pointer to the hardware structure
+ **/
+static void i40e_get_oem_version(struct i40e_hw *hw)
+{
+	u16 block_offset = 0xffff;
+	u16 block_length = 0;
+	u16 capabilities = 0;
+	u16 gen_snap = 0;
+	u16 release = 0;
+
+#define I40E_SR_NVM_OEM_VERSION_PTR		0x1B
+#define I40E_NVM_OEM_LENGTH_OFFSET		0x00
+#define I40E_NVM_OEM_CAPABILITIES_OFFSET	0x01
+#define I40E_NVM_OEM_GEN_OFFSET			0x02
+#define I40E_NVM_OEM_RELEASE_OFFSET		0x03
+#define I40E_NVM_OEM_CAPABILITIES_MASK		0x000F
+#define I40E_NVM_OEM_LENGTH			3
+
+	/* Check if pointer to OEM version block is valid. */
+	i40e_read_nvm_word(hw, I40E_SR_NVM_OEM_VERSION_PTR, &block_offset);
+	if (block_offset == 0xffff)
+		return;
+
+	/* Check if OEM version block has correct length. */
+	i40e_read_nvm_word(hw, block_offset + I40E_NVM_OEM_LENGTH_OFFSET,
+			   &block_length);
+	if (block_length < I40E_NVM_OEM_LENGTH)
+		return;
+
+	/* Check if OEM version format is as expected. */
+	i40e_read_nvm_word(hw, block_offset + I40E_NVM_OEM_CAPABILITIES_OFFSET,
+			   &capabilities);
+	if ((capabilities & I40E_NVM_OEM_CAPABILITIES_MASK) != 0)
+		return;
+
+	i40e_read_nvm_word(hw, block_offset + I40E_NVM_OEM_GEN_OFFSET,
+			   &gen_snap);
+	i40e_read_nvm_word(hw, block_offset + I40E_NVM_OEM_RELEASE_OFFSET,
+			   &release);
+	hw->nvm.oem_ver = (gen_snap << I40E_OEM_SNAP_SHIFT) | release;
+	hw->nvm.eetrack = I40E_OEM_EETRACK_ID;
+}
+
+/**
  * i40e_reset - wait for core reset to finish reset, reset pf if corer not seen
  * @pf: board private structure
  **/
@@ -7153,6 +7198,7 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired)
 			 i40e_aq_str(&pf->hw, pf->hw.aq.asq_last_status));
 		goto clear_recovery;
 	}
+	i40e_get_oem_version(&pf->hw);
 
 	/* re-verify the eeprom if we just had an EMP reset */
 	if (test_and_clear_bit(__I40E_EMP_RESET_INTR_RECEIVED, pf->state))
@@ -11337,6 +11383,7 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 		goto err_pf_reset;
 	}
+	i40e_get_oem_version(hw);
 
 	/* provide nvm, fw, api versions */
 	dev_info(&pdev->dev, "fw %d.%d.%05d api %d.%d nvm %s\n",
-- 
2.9.3


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

* [Intel-wired-lan] [next PATCH S72-V3 10/13] i40e: fix disabling overflow promiscuous mode
  2017-06-07  9:43 [Intel-wired-lan] [next PATCH S72-V3 01/13] i40evf: assign num_active_queues inside i40evf_alloc_queues Alice Michael
                   ` (7 preceding siblings ...)
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 09/13] i40e: Add support for OEM firmware version Alice Michael
@ 2017-06-07  9:43 ` Alice Michael
  2017-06-14 18:38   ` Bowers, AndrewX
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 11/13] i40e: clear only cause_ena bit Alice Michael
                   ` (3 subsequent siblings)
  12 siblings, 1 reply; 26+ messages in thread
From: Alice Michael @ 2017-06-07  9:43 UTC (permalink / raw)
  To: intel-wired-lan

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

There exists a bug in which the driver does not correctly exit overflow
promiscuous mode.  This can occur if "too many" mac filters are added,
putting the driver into overflow promiscuous mode, and the filters are
then removed.  When the failed filters are removed, the driver reports
exiting overflow promiscuous mode which is correct, however traffic
continues to be received as if in promiscuous mode still.

The bug occurs because the conditional for toggling promiscuous mode was
set to only execute when promiscuous mode was enabled and not when it
was disabled as well.  This patch fixes the conditional to correctly
execute when promiscuous mode is toggled and not just enabled.  Without
this patch, the driver is unable to correctly exit overflow promiscuous
mode.

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

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 5fd4d2f..b7b1f18 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -2281,9 +2281,8 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
 				 i40e_aq_str(hw, hw->aq.asq_last_status));
 		}
 	}
-	if ((changed_flags & IFF_PROMISC) ||
-	    (promisc_changed &&
-	     test_bit(__I40E_VSI_OVERFLOW_PROMISC, vsi->state))) {
+
+	if ((changed_flags & IFF_PROMISC) || promisc_changed) {
 		bool cur_promisc;
 
 		cur_promisc = (!!(vsi->current_netdev_flags & IFF_PROMISC) ||
-- 
2.9.3


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

* [Intel-wired-lan] [next PATCH S72-V3 11/13] i40e: clear only cause_ena bit
  2017-06-07  9:43 [Intel-wired-lan] [next PATCH S72-V3 01/13] i40evf: assign num_active_queues inside i40evf_alloc_queues Alice Michael
                   ` (8 preceding siblings ...)
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 10/13] i40e: fix disabling overflow promiscuous mode Alice Michael
@ 2017-06-07  9:43 ` Alice Michael
  2017-06-08 18:51   ` Bowers, AndrewX
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 12/13] i40e: Handle PE_CRITERR properly with IWARP enabled Alice Michael
                   ` (2 subsequent siblings)
  12 siblings, 1 reply; 26+ messages in thread
From: Alice Michael @ 2017-06-07  9:43 UTC (permalink / raw)
  To: intel-wired-lan

From: Shannon Nelson <shannon.nelson@intel.com>

When disabling interrupts, we should only be clearing the CAUSE_ENA bit,
not clearing the whole register.  Clearing the whole register sets the
NEXTQ_IDX field to 0 instead of 0x7ff which can confuse the Firmware in
some reset sequences.

Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index b7b1f18..581a8ff 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -3588,14 +3588,24 @@ static void i40e_vsi_disable_irq(struct i40e_vsi *vsi)
 	int base = vsi->base_vector;
 	int i;
 
+	/* disable interrupt causation from each queue */
 	for (i = 0; i < vsi->num_queue_pairs; i++) {
-		wr32(hw, I40E_QINT_TQCTL(vsi->tx_rings[i]->reg_idx), 0);
-		wr32(hw, I40E_QINT_RQCTL(vsi->rx_rings[i]->reg_idx), 0);
+		u32 val;
+
+		val = rd32(hw, I40E_QINT_TQCTL(vsi->tx_rings[i]->reg_idx));
+		val &= ~I40E_QINT_TQCTL_CAUSE_ENA_MASK;
+		wr32(hw, I40E_QINT_TQCTL(vsi->tx_rings[i]->reg_idx), val);
+
+		val = rd32(hw, I40E_QINT_RQCTL(vsi->rx_rings[i]->reg_idx));
+		val &= ~I40E_QINT_RQCTL_CAUSE_ENA_MASK;
+		wr32(hw, I40E_QINT_RQCTL(vsi->rx_rings[i]->reg_idx), val);
+
 		if (!i40e_enabled_xdp_vsi(vsi))
 			continue;
 		wr32(hw, I40E_QINT_TQCTL(vsi->xdp_rings[i]->reg_idx), 0);
 	}
 
+	/* disable each interrupt */
 	if (pf->flags & I40E_FLAG_MSIX_ENABLED) {
 		for (i = vsi->base_vector;
 		     i < (vsi->num_q_vectors + vsi->base_vector); i++)
-- 
2.9.3


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

* [Intel-wired-lan] [next PATCH S72-V3 12/13] i40e: Handle PE_CRITERR properly with IWARP enabled
  2017-06-07  9:43 [Intel-wired-lan] [next PATCH S72-V3 01/13] i40evf: assign num_active_queues inside i40evf_alloc_queues Alice Michael
                   ` (9 preceding siblings ...)
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 11/13] i40e: clear only cause_ena bit Alice Michael
@ 2017-06-07  9:43 ` Alice Michael
  2017-06-12 18:14   ` Bowers, AndrewX
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 13/13] i40e: don't hold RTNL lock for the entire reset Alice Michael
  2017-06-08 18:09 ` [Intel-wired-lan] [next PATCH S72-V3 01/13] i40evf: assign num_active_queues inside i40evf_alloc_queues Bowers, AndrewX
  12 siblings, 1 reply; 26+ messages in thread
From: Alice Michael @ 2017-06-07  9:43 UTC (permalink / raw)
  To: intel-wired-lan

From: Catherine Sullivan <catherine.sullivan@intel.com>

When IWARP is enabled, we weren't clearing the PE_CRITERR, just logging
it and removing it from the mask. We need to do a corer to reset the
PE_CRITERR register, so set the bit for that as we handle the
interrupt.

We should also be checking for the error against the PFINT_ICR0 register,
and only need to clear it in the value getting written to
PFINT_ICR0_ENA.

Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 581a8ff..6db448e 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -3684,10 +3684,10 @@ static irqreturn_t i40e_intr(int irq, void *data)
 		pf->sw_int_count++;
 
 	if ((pf->flags & I40E_FLAG_IWARP_ENABLED) &&
-	    (ena_mask & I40E_PFINT_ICR0_ENA_PE_CRITERR_MASK)) {
+	    (icr0 & I40E_PFINT_ICR0_ENA_PE_CRITERR_MASK)) {
 		ena_mask &= ~I40E_PFINT_ICR0_ENA_PE_CRITERR_MASK;
-		icr0 &= ~I40E_PFINT_ICR0_ENA_PE_CRITERR_MASK;
 		dev_dbg(&pf->pdev->dev, "cleared PE_CRITERR\n");
+		set_bit(__I40E_CORE_RESET_REQUESTED, pf->state);
 	}
 
 	/* only q0 is used in MSI/Legacy mode, and none are used in MSIX */
-- 
2.9.3


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

* [Intel-wired-lan] [next PATCH S72-V3 13/13] i40e: don't hold RTNL lock for the entire reset
  2017-06-07  9:43 [Intel-wired-lan] [next PATCH S72-V3 01/13] i40evf: assign num_active_queues inside i40evf_alloc_queues Alice Michael
                   ` (10 preceding siblings ...)
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 12/13] i40e: Handle PE_CRITERR properly with IWARP enabled Alice Michael
@ 2017-06-07  9:43 ` Alice Michael
  2017-06-12 18:18   ` Bowers, AndrewX
  2017-06-08 18:09 ` [Intel-wired-lan] [next PATCH S72-V3 01/13] i40evf: assign num_active_queues inside i40evf_alloc_queues Bowers, AndrewX
  12 siblings, 1 reply; 26+ messages in thread
From: Alice Michael @ 2017-06-07  9:43 UTC (permalink / raw)
  To: intel-wired-lan

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

We recently refactored i40e_do_reset() and its friends to be able to
hold the RTNL lock only for the portions that actually need to be
protected. However, a separate refactoring added several new callers of
these functions during the PCIe error recovery and suspend/resume
cycles.

When merging the changes together, it was not noticed that we could
reduce the RTNL scope by letting the reset function handle the lock
itself, as previously it was not possible.

Fix this by replacing these call sites to indicate that the reset
function should handle its own lock. This enables multiple PFs to reset
or resume simultaneously without serializing the resets via the RTNL
lock. The end result is that on systems with lots of PFs and VFs the
resets don't stall waiting for each other to finish.

It is probable that we can also do the same for i40e_do_reset_safe, but
this author did not research that change carefully enough to be
confident.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 27 +++++++--------------------
 1 file changed, 7 insertions(+), 20 deletions(-)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 6db448e..67b4e09 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -6565,9 +6565,7 @@ static void i40e_reset_subtask(struct i40e_pf *pf)
 	if (reset_flags &&
 	    !test_bit(__I40E_DOWN, pf->state) &&
 	    !test_bit(__I40E_CONFIG_BUSY, pf->state)) {
-		rtnl_lock();
-		i40e_do_reset(pf, reset_flags, true);
-		rtnl_unlock();
+		i40e_do_reset(pf, reset_flags, false);
 	}
 }
 
@@ -11905,11 +11903,8 @@ static pci_ers_result_t i40e_pci_error_detected(struct pci_dev *pdev,
 	}
 
 	/* shutdown all operations */
-	if (!test_bit(__I40E_SUSPENDED, pf->state)) {
-		rtnl_lock();
-		i40e_prep_for_reset(pf, true);
-		rtnl_unlock();
-	}
+	if (!test_bit(__I40E_SUSPENDED, pf->state))
+		i40e_prep_for_reset(pf, false);
 
 	/* Request a slot reset */
 	return PCI_ERS_RESULT_NEED_RESET;
@@ -11975,9 +11970,7 @@ static void i40e_pci_error_resume(struct pci_dev *pdev)
 	if (test_bit(__I40E_SUSPENDED, pf->state))
 		return;
 
-	rtnl_lock();
-	i40e_handle_reset_warning(pf, true);
-	rtnl_unlock();
+	i40e_handle_reset_warning(pf, false);
 }
 
 /**
@@ -12057,9 +12050,7 @@ static void i40e_shutdown(struct pci_dev *pdev)
 	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, true);
-	rtnl_unlock();
+	i40e_prep_for_reset(pf, false);
 
 	wr32(hw, I40E_PFPM_APM,
 	     (pf->wol_en ? I40E_PFPM_APM_APME_MASK : 0));
@@ -12091,9 +12082,7 @@ static int i40e_suspend(struct pci_dev *pdev, pm_message_t 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, true);
-	rtnl_unlock();
+	i40e_prep_for_reset(pf, false);
 
 	wr32(hw, I40E_PFPM_APM, (pf->wol_en ? I40E_PFPM_APM_APME_MASK : 0));
 	wr32(hw, I40E_PFPM_WUFC, (pf->wol_en ? I40E_PFPM_WUFC_MAG_MASK : 0));
@@ -12139,9 +12128,7 @@ static int i40e_resume(struct pci_dev *pdev)
 	/* handling the reset will rebuild the device state */
 	if (test_and_clear_bit(__I40E_SUSPENDED, pf->state)) {
 		clear_bit(__I40E_DOWN, pf->state);
-		rtnl_lock();
-		i40e_reset_and_rebuild(pf, false, true);
-		rtnl_unlock();
+		i40e_reset_and_rebuild(pf, false, false);
 	}
 
 	return 0;
-- 
2.9.3


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

* [Intel-wired-lan] [next PATCH S72-V3 01/13] i40evf: assign num_active_queues inside i40evf_alloc_queues
  2017-06-07  9:43 [Intel-wired-lan] [next PATCH S72-V3 01/13] i40evf: assign num_active_queues inside i40evf_alloc_queues Alice Michael
                   ` (11 preceding siblings ...)
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 13/13] i40e: don't hold RTNL lock for the entire reset Alice Michael
@ 2017-06-08 18:09 ` Bowers, AndrewX
  12 siblings, 0 replies; 26+ messages in thread
From: Bowers, AndrewX @ 2017-06-08 18:09 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Wednesday, June 7, 2017 2:43 AM
> To: Michael, Alice <alice.michael@intel.com>; intel-wired-
> lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S72-V3 01/13] i40evf: assign
> num_active_queues inside i40evf_alloc_queues
> 
> From: Jacob Keller <jacob.e.keller@intel.com>
> 
> The variable num_active_queues represents the number of active queues
> we have for the device. We assign this pretty early in i40evf_init_subtask.
> 
> Several code locations are written with loops over the tx_rings and rx_rings
> structures, which don't get allocated until i40evf_alloc_queues, and which
> get freed by i40evf_free_queues.
> 
> These call sites were written under the assumption that tx_rings and rx_rings
> would always be allocated at least when num_active_queues is non-zero.
> 
> Lets fix this by moving the assignment into the function where we allocate
> queues. We'll use a temporary variable for storage so that we don't assign
> the value in the adapter structure until after the rings have been set up.
> 
> Finally, when we free the queues, we'll clear the value to ensure that we do
> not loop over the rings memory that no longer exists.
> 
> This resolves a possible NULL pointer derference in i40evf_get_ethtool_stats
> which could occur if the VF fails to recover from a reset, and then a user
> requests statistics.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
>  drivers/net/ethernet/intel/i40evf/i40evf_main.c | 18 +++++++++++-------
>  1 file changed, 11 insertions(+), 7 deletions(-)

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



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

* [Intel-wired-lan] [next PATCH S72-V3 02/13] i40e/i40evf: update WOL and I40E_AQC_ADDR_VALID_MASK flags
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 02/13] i40e/i40evf: update WOL and I40E_AQC_ADDR_VALID_MASK flags Alice Michael
@ 2017-06-08 18:22   ` Bowers, AndrewX
  0 siblings, 0 replies; 26+ messages in thread
From: Bowers, AndrewX @ 2017-06-08 18:22 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Wednesday, June 7, 2017 2:43 AM
> To: Michael, Alice <alice.michael@intel.com>; intel-wired-
> lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S72-V3 02/13] i40e/i40evf: update
> WOL and I40E_AQC_ADDR_VALID_MASK flags
> 
> Update a few flags related to FW interactions.
> 
> Copyright updated to 2017.
> 
> Signed-off-by: Alice Michael <alice.michael@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h   | 4 ++--
>  drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 5 +++--
>  2 files changed, 5 insertions(+), 4 deletions(-)

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



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

* [Intel-wired-lan] [next PATCH S72-V3 03/13] i40e: use dev_dbg instead of dev_info when warning about missing routine
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 03/13] i40e: use dev_dbg instead of dev_info when warning about missing routine Alice Michael
@ 2017-06-08 18:24   ` Bowers, AndrewX
  0 siblings, 0 replies; 26+ messages in thread
From: Bowers, AndrewX @ 2017-06-08 18:24 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Wednesday, June 7, 2017 2:43 AM
> To: Michael, Alice <alice.michael@intel.com>; intel-wired-
> lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S72-V3 03/13] i40e: use dev_dbg
> instead of dev_info when warning about missing routine
> 
> From: Jacob Keller <jacob.e.keller@intel.com>
> 
> When searching for the vf_capability client routine, dev_info() was used,
> instead of the normal dev_dbg(). This causes the message to be displayed at
> standard log levels which can cause administrators to worry. Avoid this by
> using dev_dbg instead.
> 
> Copyright updated to 2017.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_client.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

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



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

* [Intel-wired-lan] [next PATCH S72-V3 04/13] i40e: comment that udp_port must be in host byte order
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 04/13] i40e: comment that udp_port must be in host byte order Alice Michael
@ 2017-06-08 18:28   ` Bowers, AndrewX
  0 siblings, 0 replies; 26+ messages in thread
From: Bowers, AndrewX @ 2017-06-08 18:28 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Wednesday, June 7, 2017 2:43 AM
> To: Michael, Alice <alice.michael@intel.com>; intel-wired-
> lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S72-V3 04/13] i40e: comment that
> udp_port must be in host byte order
> 
> From: Jacob Keller <jacob.e.keller@intel.com>
> 
> The firmware expects the port number passed when setting up the UDP
> tunnel configuration to be in Little Endian format.
> The i40e_aq_add_udp_tunnel command byte swaps the value from host
> order to Little Endian.
> 
> Since commit fe0b0cd97b4f ("i40e: send correct port number to AdminQ
> when enabling UDP tunnels") we've correctly sent the value in host order.
> 
> Let's also add a comment to the function explaining that it must be in host
> order, as the port numbers are commonly stored as Big Endian values.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_common.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)

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



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

* [Intel-wired-lan] [next PATCH S72-V3 05/13] i40e: Fix potential out of bound array access
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 05/13] i40e: Fix potential out of bound array access Alice Michael
@ 2017-06-08 18:29   ` Bowers, AndrewX
  0 siblings, 0 replies; 26+ messages in thread
From: Bowers, AndrewX @ 2017-06-08 18:29 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Wednesday, June 7, 2017 2:43 AM
> To: Michael, Alice <alice.michael@intel.com>; intel-wired-
> lan at lists.osuosl.org
> Cc: Mogilappagari, Sudheer <sudheer.mogilappagari@intel.com>
> Subject: [Intel-wired-lan] [next PATCH S72-V3 05/13] i40e: Fix potential out
> of bound array access
> 
> From: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
> 
> This is a fix for the static code analysis issue where dcbcfg->numapps could
> be greater than size of array (i.e dcbcfg->app[I40E_DCBX_MAX_APPS]).
> The fix makes sure that the array is not accessed past the size of of the array
> (i.e. I40E_DCBX_MAX_APPS).
> 
> Copyright updated to 2017.
> 
> Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_dcb.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

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



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

* [Intel-wired-lan] [next PATCH S72-V3 07/13] i40e: Add message for unsupported MFP mode
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 07/13] i40e: Add message for unsupported MFP mode Alice Michael
@ 2017-06-08 18:47   ` Bowers, AndrewX
  0 siblings, 0 replies; 26+ messages in thread
From: Bowers, AndrewX @ 2017-06-08 18:47 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Wednesday, June 7, 2017 2:43 AM
> To: Michael, Alice <alice.michael@intel.com>; intel-wired-
> lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S72-V3 07/13] i40e: Add message for
> unsupported MFP mode
> 
> From: Carolyn Wyborny <carolyn.wyborny@intel.com>
> 
> This patch adds a check and message if the device is in MFP mode as
> changing RSS input set is not supported in MFP mode.
> 
> Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 6 ++++++
>  1 file changed, 6 insertions(+)

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



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

* [Intel-wired-lan] [next PATCH S72-V3 11/13] i40e: clear only cause_ena bit
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 11/13] i40e: clear only cause_ena bit Alice Michael
@ 2017-06-08 18:51   ` Bowers, AndrewX
  0 siblings, 0 replies; 26+ messages in thread
From: Bowers, AndrewX @ 2017-06-08 18:51 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Wednesday, June 7, 2017 2:43 AM
> To: Michael, Alice <alice.michael@intel.com>; intel-wired-
> lan at lists.osuosl.org
> Cc: Shannon Nelson <shannon.nelson@intel.com>
> Subject: [Intel-wired-lan] [next PATCH S72-V3 11/13] i40e: clear only
> cause_ena bit
> 
> From: Shannon Nelson <shannon.nelson@intel.com>
> 
> When disabling interrupts, we should only be clearing the CAUSE_ENA bit,
> not clearing the whole register.  Clearing the whole register sets the
> NEXTQ_IDX field to 0 instead of 0x7ff which can confuse the Firmware in
> some reset sequences.
> 
> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)

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



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

* [Intel-wired-lan] [next PATCH S72-V3 06/13] i40e: Support firmware CEE DCB UP to TC map re-definition
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 06/13] i40e: Support firmware CEE DCB UP to TC map re-definition Alice Michael
@ 2017-06-12 16:51   ` Bowers, AndrewX
  0 siblings, 0 replies; 26+ messages in thread
From: Bowers, AndrewX @ 2017-06-12 16:51 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Wednesday, June 7, 2017 2:43 AM
> To: Michael, Alice <alice.michael@intel.com>; intel-wired-
> lan at lists.osuosl.org
> Cc: Bowers, Gregory J <gregory.j.bowers@intel.com>
> Subject: [Intel-wired-lan] [next PATCH S72-V3 06/13] i40e: Support firmware
> CEE DCB UP to TC map re-definition
> 
> Changes parsing of FW 4.33 AQ command Get CEE DCBX OPER CFG (0x0A07).
> Change is required because FW now creates the oper_prio_tc nibbles
> reversed from those in the CEE Priority Group sub-TLV.
> This change will only apply to FW 4.33 as future FW versions will use a
> different function to parse the CEE data.
> 
> Signed-off-by: Greg Bowers <gregory.j.bowers@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_dcb.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)


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



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

* [Intel-wired-lan] [next PATCH S72-V3 08/13] i40e: genericize the partition bandwidth control
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 08/13] i40e: genericize the partition bandwidth control Alice Michael
@ 2017-06-12 18:07   ` Bowers, AndrewX
  0 siblings, 0 replies; 26+ messages in thread
From: Bowers, AndrewX @ 2017-06-12 18:07 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Wednesday, June 7, 2017 2:43 AM
> To: Michael, Alice <alice.michael@intel.com>; intel-wired-
> lan at lists.osuosl.org
> Cc: Shannon Nelson <shannon.nelson@intel.com>
> Subject: [Intel-wired-lan] [next PATCH S72-V3 08/13] i40e: genericize the
> partition bandwidth control
> 
> From: Shannon Nelson <shannon.nelson@intel.com>
> 
> Partition bandwidth control is not in just one form of MFP (multi-function
> partitioning), so make the code more generic and be sure to nudge the Tx
> scheduler for all MFP.
> 
> Copyright updated to 2017.
> 
> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e.h      | 13 +++++----
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 41 ++++++++++++++----------
> -----
>  2 files changed, 26 insertions(+), 28 deletions(-)

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



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

* [Intel-wired-lan] [next PATCH S72-V3 12/13] i40e: Handle PE_CRITERR properly with IWARP enabled
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 12/13] i40e: Handle PE_CRITERR properly with IWARP enabled Alice Michael
@ 2017-06-12 18:14   ` Bowers, AndrewX
  0 siblings, 0 replies; 26+ messages in thread
From: Bowers, AndrewX @ 2017-06-12 18:14 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Wednesday, June 7, 2017 2:43 AM
> To: Michael, Alice <alice.michael@intel.com>; intel-wired-
> lan at lists.osuosl.org
> Cc: Catherine Sullivan <catherine.sullivan@intel.com>
> Subject: [Intel-wired-lan] [next PATCH S72-V3 12/13] i40e: Handle
> PE_CRITERR properly with IWARP enabled
> 
> From: Catherine Sullivan <catherine.sullivan@intel.com>
> 
> When IWARP is enabled, we weren't clearing the PE_CRITERR, just logging it
> and removing it from the mask. We need to do a corer to reset the
> PE_CRITERR register, so set the bit for that as we handle the interrupt.
> 
> We should also be checking for the error against the PFINT_ICR0 register, and
> only need to clear it in the value getting written to PFINT_ICR0_ENA.
> 
> Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com>
> Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

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



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

* [Intel-wired-lan] [next PATCH S72-V3 13/13] i40e: don't hold RTNL lock for the entire reset
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 13/13] i40e: don't hold RTNL lock for the entire reset Alice Michael
@ 2017-06-12 18:18   ` Bowers, AndrewX
  0 siblings, 0 replies; 26+ messages in thread
From: Bowers, AndrewX @ 2017-06-12 18:18 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Wednesday, June 7, 2017 2:43 AM
> To: Michael, Alice <alice.michael@intel.com>; intel-wired-
> lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S72-V3 13/13] i40e: don't hold RTNL
> lock for the entire reset
> 
> From: Jacob Keller <jacob.e.keller@intel.com>
> 
> We recently refactored i40e_do_reset() and its friends to be able to hold the
> RTNL lock only for the portions that actually need to be protected. However,
> a separate refactoring added several new callers of these functions during
> the PCIe error recovery and suspend/resume cycles.
> 
> When merging the changes together, it was not noticed that we could
> reduce the RTNL scope by letting the reset function handle the lock itself, as
> previously it was not possible.
> 
> Fix this by replacing these call sites to indicate that the reset function should
> handle its own lock. This enables multiple PFs to reset or resume
> simultaneously without serializing the resets via the RTNL lock. The end result
> is that on systems with lots of PFs and VFs the resets don't stall waiting for
> each other to finish.
> 
> It is probable that we can also do the same for i40e_do_reset_safe, but this
> author did not research that change carefully enough to be confident.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 27 +++++++--------------------
>  1 file changed, 7 insertions(+), 20 deletions(-)

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



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

* [Intel-wired-lan] [next PATCH S72-V3 09/13] i40e: Add support for OEM firmware version
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 09/13] i40e: Add support for OEM firmware version Alice Michael
@ 2017-06-14 14:24   ` Bowers, AndrewX
  0 siblings, 0 replies; 26+ messages in thread
From: Bowers, AndrewX @ 2017-06-14 14:24 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Wednesday, June 7, 2017 2:43 AM
> To: Michael, Alice <alice.michael@intel.com>; intel-wired-
> lan at lists.osuosl.org
> Cc: Sadowski, Filip <filip.sadowski@intel.com>
> Subject: [Intel-wired-lan] [next PATCH S72-V3 09/13] i40e: Add support for
> OEM firmware version
> 
> From: Filip Sadowski <filip.sadowski@intel.com>
> 
> This patch adds support for OEM firmware version. If OEM specific adapter is
> detected ethtool reports OEM product version in firmware version string
> instead of etrack id.
> 
> Signed-off-by: Filip Sadowski <filip.sadowski@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e.h      | 48 ++++++++++++++++++++-----
> ----
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 47
> ++++++++++++++++++++++++++++
>  2 files changed, 81 insertions(+), 14 deletions(-)

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



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

* [Intel-wired-lan] [next PATCH S72-V3 10/13] i40e: fix disabling overflow promiscuous mode
  2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 10/13] i40e: fix disabling overflow promiscuous mode Alice Michael
@ 2017-06-14 18:38   ` Bowers, AndrewX
  0 siblings, 0 replies; 26+ messages in thread
From: Bowers, AndrewX @ 2017-06-14 18:38 UTC (permalink / raw)
  To: intel-wired-lan

> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Wednesday, June 7, 2017 2:43 AM
> To: Michael, Alice <alice.michael@intel.com>; intel-wired-
> lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S72-V3 10/13] i40e: fix disabling
> overflow promiscuous mode
> 
> From: Alan Brady <alan.brady@intel.com>
> 
> There exists a bug in which the driver does not correctly exit overflow
> promiscuous mode.  This can occur if "too many" mac filters are added,
> putting the driver into overflow promiscuous mode, and the filters are then
> removed.  When the failed filters are removed, the driver reports exiting
> overflow promiscuous mode which is correct, however traffic continues to
> be received as if in promiscuous mode still.
> 
> The bug occurs because the conditional for toggling promiscuous mode was
> set to only execute when promiscuous mode was enabled and not when it
> was disabled as well.  This patch fixes the conditional to correctly execute
> when promiscuous mode is toggled and not just enabled.  Without this
> patch, the driver is unable to correctly exit overflow promiscuous mode.
> 
> Signed-off-by: Alan Brady <alan.brady@intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

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



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

end of thread, other threads:[~2017-06-14 18:38 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-07  9:43 [Intel-wired-lan] [next PATCH S72-V3 01/13] i40evf: assign num_active_queues inside i40evf_alloc_queues Alice Michael
2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 02/13] i40e/i40evf: update WOL and I40E_AQC_ADDR_VALID_MASK flags Alice Michael
2017-06-08 18:22   ` Bowers, AndrewX
2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 03/13] i40e: use dev_dbg instead of dev_info when warning about missing routine Alice Michael
2017-06-08 18:24   ` Bowers, AndrewX
2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 04/13] i40e: comment that udp_port must be in host byte order Alice Michael
2017-06-08 18:28   ` Bowers, AndrewX
2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 05/13] i40e: Fix potential out of bound array access Alice Michael
2017-06-08 18:29   ` Bowers, AndrewX
2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 06/13] i40e: Support firmware CEE DCB UP to TC map re-definition Alice Michael
2017-06-12 16:51   ` Bowers, AndrewX
2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 07/13] i40e: Add message for unsupported MFP mode Alice Michael
2017-06-08 18:47   ` Bowers, AndrewX
2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 08/13] i40e: genericize the partition bandwidth control Alice Michael
2017-06-12 18:07   ` Bowers, AndrewX
2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 09/13] i40e: Add support for OEM firmware version Alice Michael
2017-06-14 14:24   ` Bowers, AndrewX
2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 10/13] i40e: fix disabling overflow promiscuous mode Alice Michael
2017-06-14 18:38   ` Bowers, AndrewX
2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 11/13] i40e: clear only cause_ena bit Alice Michael
2017-06-08 18:51   ` Bowers, AndrewX
2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 12/13] i40e: Handle PE_CRITERR properly with IWARP enabled Alice Michael
2017-06-12 18:14   ` Bowers, AndrewX
2017-06-07  9:43 ` [Intel-wired-lan] [next PATCH S72-V3 13/13] i40e: don't hold RTNL lock for the entire reset Alice Michael
2017-06-12 18:18   ` Bowers, AndrewX
2017-06-08 18:09 ` [Intel-wired-lan] [next PATCH S72-V3 01/13] i40evf: assign num_active_queues inside i40evf_alloc_queues 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.