Skip to contentSkip to conversation

i40e/i40evf updates

PATCH New Deepthi Kavalur 2 participants 36 messages Dec 23, 2015 – Jan 28, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover i40e/i40evf updates

Anjali Singhai Jain adds some fixes to write-back-on-itr to work with legacy itr.

Jesse Brandeburg refactors a dcb function, removes VF device IDs from PF, and also removes an unnecessary local variable.

Mitch Williams adds counter for arq overflows, add 20G speed for tx bandwidth calculations, and enables bus master after reset.

Pandi Maharajan stores lan_vsi_idx and lan_vsi_id in the right size.

Shannon Nelson implements 'AQ Shared resource flags', 'AQ Add set_switch_config', 'AQ Add VXLAN-GPE tunnel type', and 'AQ thermal sensor control struct'. Also bumps AQ minor version to 1.5 for new FW features, adds a little more to an NVM update debug message, and finally adds netdev info to vsi dump.

 drivers/net/ethernet/intel/i40e/i40e.h             |  1 +
 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h  | 49 ++++++++++++++++++++--
 drivers/net/ethernet/intel/i40e/i40e_common.c      |  8 ----
 drivers/net/ethernet/intel/i40e/i40e_dcb.c         | 15 +++++--
 drivers/net/ethernet/intel/i40e/i40e_debugfs.c     | 24 +++++++----
 drivers/net/ethernet/intel/i40e/i40e_devids.h      |  4 --
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c     |  5 +++
 drivers/net/ethernet/intel/i40e/i40e_main.c        |  4 +-
 drivers/net/ethernet/intel/i40e/i40e_nvm.c         |  5 ++-
 drivers/net/ethernet/intel/i40e/i40e_txrx.c        | 18 +++++---
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c |  3 ++
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h |  4 +-
 .../net/ethernet/intel/i40evf/i40e_adminq_cmd.h    | 49 ++++++++++++++++++++--
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c      |  3 +-
 drivers/net/ethernet/intel/i40evf/i40evf_main.c    |  1 +
 15 files changed, 152 insertions(+), 41 deletions(-)
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/16 i40e: AQ Shared resource flags

From: Shannon Nelson <[email protected]>

Add flags to MAC allocation requests to signify that the macvlan filters should come from the shared resource pool rather than the dedicated PF resource pools.

Change-ID I4c2da64c01856edcb0982bc4aab75c5a91047a7a

---
Testing-Hints:
Apply and compile cleanly.

 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h   | 5 +++++
 drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 5 +++++
 2 files changed, 10 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h +5 -0
index 0e608d2..6e0834e 100644
@@ -976,6 +976,7 @@ struct i40e_aqc_add_macvlan_element_data {
 #define I40E_AQC_MACVLAN_ADD_HASH_MATCH		0x0002
 #define I40E_AQC_MACVLAN_ADD_IGNORE_VLAN	0x0004
 #define I40E_AQC_MACVLAN_ADD_TO_QUEUE		0x0008
+#define I40E_AQC_MACVLAN_ADD_USE_SHARED_MAC	0x0010
 	__le16	queue_number;
 #define I40E_AQC_MACVLAN_CMD_QUEUE_SHIFT	0
 #define I40E_AQC_MACVLAN_CMD_QUEUE_MASK		(0x7FF << \
@@ -1265,6 +1266,10 @@ struct i40e_aqc_add_remove_cloud_filters_element_data {
 #define I40E_AQC_ADD_CLOUD_TNL_TYPE_GENEVE		2
 #define I40E_AQC_ADD_CLOUD_TNL_TYPE_IP			3
 
+#define I40E_AQC_ADD_CLOUD_FLAGS_SHARED_OUTER_MAC	0x2000
+#define I40E_AQC_ADD_CLOUD_FLAGS_SHARED_INNER_MAC	0x4000
+#define I40E_AQC_ADD_CLOUD_FLAGS_SHARED_OUTER_IP	0x8000
+
 	__le32	tenant_id;
 	u8	reserved[4];
 	__le16	queue_number;
drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h +5 -0
index 578b178..220b972 100644
@@ -973,6 +973,7 @@ struct i40e_aqc_add_macvlan_element_data {
 #define I40E_AQC_MACVLAN_ADD_HASH_MATCH		0x0002
 #define I40E_AQC_MACVLAN_ADD_IGNORE_VLAN	0x0004
 #define I40E_AQC_MACVLAN_ADD_TO_QUEUE		0x0008
+#define I40E_AQC_MACVLAN_ADD_USE_SHARED_MAC	0x0010
 	__le16	queue_number;
 #define I40E_AQC_MACVLAN_CMD_QUEUE_SHIFT	0
 #define I40E_AQC_MACVLAN_CMD_QUEUE_MASK		(0x7FF << \
@@ -1262,6 +1263,10 @@ struct i40e_aqc_add_remove_cloud_filters_element_data {
 #define I40E_AQC_ADD_CLOUD_TNL_TYPE_GENEVE		2
 #define I40E_AQC_ADD_CLOUD_TNL_TYPE_IP			3
 
+#define I40E_AQC_ADD_CLOUD_FLAGS_SHARED_OUTER_MAC	0x2000
+#define I40E_AQC_ADD_CLOUD_FLAGS_SHARED_INNER_MAC	0x4000
+#define I40E_AQC_ADD_CLOUD_FLAGS_SHARED_OUTER_IP	0x8000
+
 	__le32	tenant_id;
 	u8	reserved[4];
 	__le16	queue_number;
Signature · 1 line
2.1.0
#2 lore raw

PATCH 1/16 i40e: AQ Shared resource flags

Quoted 18 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Deepthi Kavalur
Sent: Wednesday, December 23, 2015 12:06 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S25 01/16] i40e: AQ Shared resource flags

From: Shannon Nelson <[email protected]>

Add flags to MAC allocation requests to signify that the macvlan filters should come from the shared resource pool rather than the dedicated PF resource pools.

Change-ID I4c2da64c01856edcb0982bc4aab75c5a91047a7a
Quoted 7 lines

---
Testing-Hints:
Apply and compile cleanly.

 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h   | 5 +++++
 drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 5 +++++
 2 files changed, 10 insertions(+)

Patch code changes correctly applied

#3 lore raw

PATCH 2/16 i40e: AQ Add set_switch_config

In reply to Deepthi Kavalur

From: Shannon Nelson <[email protected]>

Add the new Set Switch Config AdminQ command, and mark the L2 Filter bit as deprecated in the Add VEB command.

Change-ID I5b24790f14c56f0ddf3f70df1e486844146b039f

---
Testing-Hints:
Apply and compile cleanly.

 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h   | 15 ++++++++++++++-
 drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 15 ++++++++++++++-
 2 files changed, 28 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h +14 -1
index 6e0834e..7e96615 100644
@@ -145,6 +145,7 @@ enum i40e_admin_queue_opc {
 	i40e_aqc_opc_remove_statistics		= 0x0202,
 	i40e_aqc_opc_set_port_parameters	= 0x0203,
 	i40e_aqc_opc_get_switch_resource_alloc	= 0x0204,
+	i40e_aqc_opc_set_switch_config		= 0x0205,
 
 	i40e_aqc_opc_add_vsi			= 0x0210,
 	i40e_aqc_opc_update_vsi_parameters	= 0x0211,
@@ -683,6 +684,17 @@ struct i40e_aqc_switch_resource_alloc_element_resp {
 
 I40E_CHECK_STRUCT_LEN(0x10, i40e_aqc_switch_resource_alloc_element_resp);
 
+/* Set Switch Configuration (direct 0x0205) */
+struct i40e_aqc_set_switch_config {
+	__le16	flags;
+#define I40E_AQ_SET_SWITCH_CFG_PROMISC		0x0001
+#define I40E_AQ_SET_SWITCH_CFG_L2_FILTER	0x0002
+	__le16	valid_flags;
+	u8	reserved[12];
+};
+
+I40E_CHECK_CMD_LENGTH(i40e_aqc_set_switch_config);
+
 /* Add VSI (indirect 0x0210)
  *    this indirect command uses struct i40e_aqc_vsi_properties_data
  *    as the indirect buffer (128 bytes)
@@ -909,7 +921,8 @@ struct i40e_aqc_add_veb {
 					I40E_AQC_ADD_VEB_PORT_TYPE_SHIFT)
 #define I40E_AQC_ADD_VEB_PORT_TYPE_DEFAULT	0x2
 #define I40E_AQC_ADD_VEB_PORT_TYPE_DATA		0x4
-#define I40E_AQC_ADD_VEB_ENABLE_L2_FILTER	0x8
+#define I40E_AQC_ADD_VEB_ENABLE_L2_FILTER	0x8     /* deprecated */
+#define I40E_AQC_ADD_VEB_ENABLE_DISABLE_STATS	0x10
 	u8	enable_tcs;
 	u8	reserved[9];
 };
drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h +14 -1
index 220b972..2c8f3ed 100644
@@ -145,6 +145,7 @@ enum i40e_admin_queue_opc {
 	i40e_aqc_opc_remove_statistics		= 0x0202,
 	i40e_aqc_opc_set_port_parameters	= 0x0203,
 	i40e_aqc_opc_get_switch_resource_alloc	= 0x0204,
+	i40e_aqc_opc_set_switch_config		= 0x0205,
 
 	i40e_aqc_opc_add_vsi			= 0x0210,
 	i40e_aqc_opc_update_vsi_parameters	= 0x0211,
@@ -680,6 +681,17 @@ struct i40e_aqc_switch_resource_alloc_element_resp {
 
 I40E_CHECK_STRUCT_LEN(0x10, i40e_aqc_switch_resource_alloc_element_resp);
 
+/* Set Switch Configuration (direct 0x0205) */
+struct i40e_aqc_set_switch_config {
+	__le16	flags;
+#define I40E_AQ_SET_SWITCH_CFG_PROMISC		0x0001
+#define I40E_AQ_SET_SWITCH_CFG_L2_FILTER	0x0002
+	__le16	valid_flags;
+	u8	reserved[12];
+};
+
+I40E_CHECK_CMD_LENGTH(i40e_aqc_set_switch_config);
+
 /* Add VSI (indirect 0x0210)
  *    this indirect command uses struct i40e_aqc_vsi_properties_data
  *    as the indirect buffer (128 bytes)
@@ -906,7 +918,8 @@ struct i40e_aqc_add_veb {
 					I40E_AQC_ADD_VEB_PORT_TYPE_SHIFT)
 #define I40E_AQC_ADD_VEB_PORT_TYPE_DEFAULT	0x2
 #define I40E_AQC_ADD_VEB_PORT_TYPE_DATA		0x4
-#define I40E_AQC_ADD_VEB_ENABLE_L2_FILTER	0x8
+#define I40E_AQC_ADD_VEB_ENABLE_L2_FILTER	0x8     /* deprecated */
+#define I40E_AQC_ADD_VEB_ENABLE_DISABLE_STATS	0x10
 	u8	enable_tcs;
 	u8	reserved[9];
 };
Signature · 1 line
2.1.0
#4 lore raw

PATCH 2/16 i40e: AQ Add set_switch_config

Quoted 21 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Deepthi Kavalur
Sent: Wednesday, December 23, 2015 12:06 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S25 02/16] i40e: AQ Add set_switch_config

From: Shannon Nelson <[email protected]>

Add the new Set Switch Config AdminQ command, and mark the L2 Filter bit as deprecated in the Add VEB command.

Change-ID I5b24790f14c56f0ddf3f70df1e486844146b039f

---
Testing-Hints:
Apply and compile cleanly.

Quoted 5 lines
 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h   | 15
++++++++++++++-
 drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 15
++++++++++++++-
 2 files changed, 28 insertions(+), 2 deletions(-)

Patch code changes correctly applied

#5 lore raw

PATCH 3/16 i40e: AQ Add VXLAN-GPE tunnel type

In reply to Deepthi Kavalur

From: Shannon Nelson <[email protected]>

Add the new Cisco VXLAN-GPE cloud tunnel type for the Add Cloud Filter and UDP tunnel AQ commands.

Change-ID I2c093c7d79726c7fca08a36e5c63581a905da3d2

---
Testing-Hints:
Apply and compile cleanly.

 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h   | 3 +++
 drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 3 +++
 2 files changed, 6 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h +3 -0
index 7e96615..5effb91 100644
@@ -1278,6 +1278,8 @@ struct i40e_aqc_add_remove_cloud_filters_element_data {
 #define I40E_AQC_ADD_CLOUD_TNL_TYPE_NVGRE_OMAC		1
 #define I40E_AQC_ADD_CLOUD_TNL_TYPE_GENEVE		2
 #define I40E_AQC_ADD_CLOUD_TNL_TYPE_IP			3
+#define I40E_AQC_ADD_CLOUD_TNL_TYPE_RESERVED		4
+#define I40E_AQC_ADD_CLOUD_TNL_TYPE_VXLAN_GPE		5
 
 #define I40E_AQC_ADD_CLOUD_FLAGS_SHARED_OUTER_MAC	0x2000
 #define I40E_AQC_ADD_CLOUD_FLAGS_SHARED_INNER_MAC	0x4000
@@ -2229,6 +2231,7 @@ struct i40e_aqc_add_udp_tunnel {
 #define I40E_AQC_TUNNEL_TYPE_VXLAN	0x00
 #define I40E_AQC_TUNNEL_TYPE_NGE	0x01
 #define I40E_AQC_TUNNEL_TYPE_TEREDO	0x10
+#define I40E_AQC_TUNNEL_TYPE_VXLAN_GPE	0x11
 	u8	reserved1[10];
 };
 
drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h +3 -0
index 2c8f3ed..bdb18f6 100644
@@ -1275,6 +1275,8 @@ struct i40e_aqc_add_remove_cloud_filters_element_data {
 #define I40E_AQC_ADD_CLOUD_TNL_TYPE_NVGRE_OMAC		1
 #define I40E_AQC_ADD_CLOUD_TNL_TYPE_GENEVE		2
 #define I40E_AQC_ADD_CLOUD_TNL_TYPE_IP			3
+#define I40E_AQC_ADD_CLOUD_TNL_TYPE_RESERVED		4
+#define I40E_AQC_ADD_CLOUD_TNL_TYPE_VXLAN_GPE		5
 
 #define I40E_AQC_ADD_CLOUD_FLAGS_SHARED_OUTER_MAC	0x2000
 #define I40E_AQC_ADD_CLOUD_FLAGS_SHARED_INNER_MAC	0x4000
@@ -2121,6 +2123,7 @@ struct i40e_aqc_add_udp_tunnel {
 #define I40E_AQC_TUNNEL_TYPE_VXLAN	0x00
 #define I40E_AQC_TUNNEL_TYPE_NGE	0x01
 #define I40E_AQC_TUNNEL_TYPE_TEREDO	0x10
+#define I40E_AQC_TUNNEL_TYPE_VXLAN_GPE	0x11
 	u8	reserved1[10];
 };
 
Signature · 1 line
2.1.0
#6 lore raw

PATCH 3/16 i40e: AQ Add VXLAN-GPE tunnel type

Quoted 17 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Deepthi Kavalur
Sent: Wednesday, December 23, 2015 12:06 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S25 03/16] i40e: AQ Add VXLAN-GPE tunnel type

From: Shannon Nelson <[email protected]>

Add the new Cisco VXLAN-GPE cloud tunnel type for the Add Cloud Filter and UDP tunnel AQ commands.

Change-ID I2c093c7d79726c7fca08a36e5c63581a905da3d2
Quoted 7 lines

---
Testing-Hints:
Apply and compile cleanly.

 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h   | 3 +++
 drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 3 +++
 2 files changed, 6 insertions(+)

Patch code changes correctly applied

#7 lore raw

PATCH 4/16 i40e: AQ thermal sensor control struct

In reply to Deepthi Kavalur

From: Shannon Nelson <[email protected]>

Add the new AQ command and struct for managing a thermal sensor.

Change-ID I6f5631839a0f3dca352a6c222f1269a960e2310a
---
 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h   | 17 +++++++++++++++++
 drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 17 +++++++++++++++++
 2 files changed, 34 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h +17 -0
index 5effb91..9684572 100644
@@ -230,6 +230,7 @@ enum i40e_admin_queue_opc {
 	i40e_aqc_opc_nvm_config_read		= 0x0704,
 	i40e_aqc_opc_nvm_config_write		= 0x0705,
 	i40e_aqc_opc_oem_post_update		= 0x0720,
+	i40e_aqc_opc_thermal_sensor		= 0x0721,
 
 	/* virtualization commands */
 	i40e_aqc_opc_send_msg_to_pf		= 0x0801,
@@ -1952,6 +1953,22 @@ struct i40e_aqc_nvm_oem_post_update_buffer {
 
 I40E_CHECK_STRUCT_LEN(0x28, i40e_aqc_nvm_oem_post_update_buffer);
 
+/* Thermal Sensor (indirect 0x0721)
+ *     read or set thermal sensor configs and values
+ *     takes a sensor and command specific data buffer, not detailed here
+ */
+struct i40e_aqc_thermal_sensor {
+	u8 sensor_action;
+#define I40E_AQ_THERMAL_SENSOR_READ_CONFIG	0
+#define I40E_AQ_THERMAL_SENSOR_SET_CONFIG	1
+#define I40E_AQ_THERMAL_SENSOR_READ_TEMP	2
+	u8 reserved[7];
+	__le32	addr_high;
+	__le32	addr_low;
+};
+
+I40E_CHECK_CMD_LENGTH(i40e_aqc_thermal_sensor);
+
 /* Send to PF command (indirect 0x0801) id is only used by PF
  * Send to VF command (indirect 0x0802) id is only used by PF
  * Send to Peer PF command (indirect 0x0803)
drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h +17 -0
index bdb18f6..6468537 100644
@@ -230,6 +230,7 @@ enum i40e_admin_queue_opc {
 	i40e_aqc_opc_nvm_config_read		= 0x0704,
 	i40e_aqc_opc_nvm_config_write		= 0x0705,
 	i40e_aqc_opc_oem_post_update		= 0x0720,
+	i40e_aqc_opc_thermal_sensor		= 0x0721,
 
 	/* virtualization commands */
 	i40e_aqc_opc_send_msg_to_pf		= 0x0801,
@@ -1949,6 +1950,22 @@ struct i40e_aqc_nvm_oem_post_update_buffer {
 
 I40E_CHECK_STRUCT_LEN(0x28, i40e_aqc_nvm_oem_post_update_buffer);
 
+/* Thermal Sensor (indirect 0x0721)
+ *     read or set thermal sensor configs and values
+ *     takes a sensor and command specific data buffer, not detailed here
+ */
+struct i40e_aqc_thermal_sensor {
+	u8 sensor_action;
+#define I40E_AQ_THERMAL_SENSOR_READ_CONFIG	0
+#define I40E_AQ_THERMAL_SENSOR_SET_CONFIG	1
+#define I40E_AQ_THERMAL_SENSOR_READ_TEMP	2
+	u8 reserved[7];
+	__le32	addr_high;
+	__le32	addr_low;
+};
+
+I40E_CHECK_CMD_LENGTH(i40e_aqc_thermal_sensor);
+
 /* Send to PF command (indirect 0x0801) id is only used by PF
  * Send to VF command (indirect 0x0802) id is only used by PF
  * Send to Peer PF command (indirect 0x0803)
Signature · 1 line
2.1.0
#8 lore raw

PATCH 4/16 i40e: AQ thermal sensor control struct

Quoted 15 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Deepthi Kavalur
Sent: Wednesday, December 23, 2015 12:06 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S25 04/16] i40e: AQ thermal sensor control struct

From: Shannon Nelson <[email protected]>

Add the new AQ command and struct for managing a thermal sensor.

Change-ID I6f5631839a0f3dca352a6c222f1269a960e2310a
Quoted 6 lines
---
 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h   | 17
+++++++++++++++++
 drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 17
+++++++++++++++++
 2 files changed, 34 insertions(+)

Patch code changes correctly applied

#9 lore raw

PATCH 5/16 i40e: Bump AQ minor version to 1.5 for new FW features

In reply to Deepthi Kavalur

From: Shannon Nelson <[email protected]>

Bump AQ minor version to 1.5 for new FW features.

Change-ID I5a790f7f519a2a8921aaa1c5663727dd1897ffec

---
Testing-Hints:
Apply and compile cleanly on driver load with old NVMs, should see log message:
The driver for the device detected an older version of the NVM image than expected. Please update the NVM image.

 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h   | 2 +-
 drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h +1 -1
index 9684572..5699299 100644
@@ -34,7 +34,7 @@
  */
 
 #define I40E_FW_API_VERSION_MAJOR	0x0001
-#define I40E_FW_API_VERSION_MINOR	0x0004
+#define I40E_FW_API_VERSION_MINOR	0x0005
 
 struct i40e_aq_desc {
 	__le16 flags;
drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h +1 -1
index 6468537..ed963bc 100644
@@ -34,7 +34,7 @@
  */
 
 #define I40E_FW_API_VERSION_MAJOR	0x0001
-#define I40E_FW_API_VERSION_MINOR	0x0004
+#define I40E_FW_API_VERSION_MINOR	0x0005
 
 struct i40e_aq_desc {
 	__le16 flags;
Signature · 1 line
2.1.0
#10 lore raw

PATCH 5/16 i40e: Bump AQ minor version to 1.5 for new FW features

Quoted 23 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Deepthi Kavalur
Sent: Wednesday, December 23, 2015 12:06 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S25 05/16] i40e: Bump AQ minor version to 1.5 for new FW features

From: Shannon Nelson <[email protected]>

Bump AQ minor version to 1.5 for new FW features.

Change-ID I5a790f7f519a2a8921aaa1c5663727dd1897ffec

---
Testing-Hints:
Apply and compile cleanly on driver load with old NVMs, should see log message:
The driver for the device detected an older version of the NVM image than expected. Please update the NVM image.

Quoted 3 lines
 drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h   | 2 +-
 drivers/net/ethernet/intel/i40evf/i40e_adminq_cmd.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Patch code changes correctly applied

#11 lore raw

PATCH 6/16 i40e: Store lan_vsi_idx and lan_vsi_id in the right size

In reply to Deepthi Kavalur

From: Pandi Maharajan <[email protected]>

lan_vsi_idx and lan_vsi_id are assigned to u16 data sized variables but declared in u8. This patch fixes the width of the datatype.

Change-ID If4bcbcc7d32f2b287c51cb33d17879691258dce2
---
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h +2 -2
index da44995..e74642a 100644
@@ -91,8 +91,8 @@ struct i40e_vf {
 	 * When assigned, these will be non-zero, because VSI 0 is always
 	 * the main LAN VSI for the PF.
 	 */
-	u8 lan_vsi_idx;	        /* index into PF struct */
-	u8 lan_vsi_id;		/* ID as used by firmware */
+	u16 lan_vsi_idx;	/* index into PF struct */
+	u16 lan_vsi_id;		/* ID as used by firmware */
 
 	u8 num_queue_pairs;	/* num of qps assigned to VF vsis */
 	u64 num_mdd_events;	/* num of mdd events detected */
Signature · 1 line
2.1.0
#12 lore raw

PATCH 6/16 i40e: Store lan_vsi_idx and lan_vsi_id in the right size

Quoted 11 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Deepthi Kavalur
Sent: Wednesday, December 23, 2015 12:06 PM
To: intel-wired-lan at lists.osuosl.org
Cc: Maharajan, Pandi <[email protected]>
Subject: [Intel-wired-lan] [next PATCH S25 06/16] i40e: Store lan_vsi_idx and lan_vsi_id in the right size

From: Pandi Maharajan <[email protected]>

Quoted 8 lines

lan_vsi_idx and lan_vsi_id are assigned to u16 data sized variables but declared in u8. This patch fixes the width of the datatype.

Change-ID If4bcbcc7d32f2b287c51cb33d17879691258dce2
---
 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch code changes correctly applied

#13 lore raw

PATCH 7/16 i40e: fix write-back-on-itr to work with legacy itr

In reply to Deepthi Kavalur

From: Anjali Singhai Jain <[email protected]>

We were not doing write-back on interrupt throttle for Legacy case in X722. This patch fixes that, so we do WB_ON_ITR for Legacy as well. Plus the issue that we should still be setting NO_ITR if we are touching the DYN_CTLN register since we do not want to change ITR setting here.

Change-ID I5db8491ee1544118a389db839cecc93e1bbc480e
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 18 +++++++++++++-----
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c |  3 ++-
 2 files changed, 15 insertions(+), 6 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_txrx.c +13 -5
index 94dbeb3..b15d0fa 100644
@@ -789,12 +789,20 @@ void i40e_force_wb(struct i40e_vsi *vsi, struct i40e_q_vector *q_vector)
 		if (q_vector->arm_wb_state)
 			return;
 
-		val = I40E_PFINT_DYN_CTLN_WB_ON_ITR_MASK;
+		if (vsi->back->flags & I40E_FLAG_MSIX_ENABLED) {
+			val = I40E_PFINT_DYN_CTLN_WB_ON_ITR_MASK |
+			      I40E_PFINT_DYN_CTLN_ITR_INDX_MASK; /* set noitr */
+
+			wr32(&vsi->back->hw,
+			     I40E_PFINT_DYN_CTLN(q_vector->v_idx +
+						 vsi->base_vector - 1),
+			     val);
+		} else {
+			val = I40E_PFINT_DYN_CTL0_WB_ON_ITR_MASK |
+			      I40E_PFINT_DYN_CTL0_ITR_INDX_MASK; /* set noitr */
 
-		wr32(&vsi->back->hw,
-		     I40E_PFINT_DYN_CTLN(q_vector->v_idx +
-					 vsi->base_vector - 1),
-		     val);
+			wr32(&vsi->back->hw, I40E_PFINT_DYN_CTL0, val);
+		}
 		q_vector->arm_wb_state = true;
 	} else if (vsi->back->flags & I40E_FLAG_MSIX_ENABLED) {
 		u32 val = I40E_PFINT_DYN_CTLN_INTENA_MASK |
drivers/net/ethernet/intel/i40evf/i40e_txrx.c +2 -1
index 0e2c627..6a4da0a 100644
@@ -307,7 +307,8 @@ static void i40evf_force_wb(struct i40e_vsi *vsi, struct i40e_q_vector *q_vector
 		if (q_vector->arm_wb_state)
 			return;
 
-		val = I40E_VFINT_DYN_CTLN1_WB_ON_ITR_MASK;
+		val = I40E_VFINT_DYN_CTLN1_WB_ON_ITR_MASK |
+		      I40E_VFINT_DYN_CTLN1_ITR_INDX_MASK; /* set noitr */
 
 		wr32(&vsi->back->hw,
 		     I40E_VFINT_DYN_CTLN1(q_vector->v_idx +
Signature · 1 line
2.1.0
#14 lore raw

PATCH 7/16 i40e: fix write-back-on-itr to work with legacy itr

Quoted 15 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Deepthi Kavalur
Sent: Wednesday, December 23, 2015 12:06 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S25 07/16] i40e: fix write-back-on-itr to work with legacy itr

From: Anjali Singhai Jain <[email protected]>

We were not doing write-back on interrupt throttle for Legacy case in X722. This patch fixes that, so we do WB_ON_ITR for Legacy as well. Plus the issue that we should still be setting NO_ITR if we are touching the DYN_CTLN register since we do not want to change ITR setting here.

Quoted 6 lines
Change-ID I5db8491ee1544118a389db839cecc93e1bbc480e
---
 drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 18 +++++++++++++-----
 drivers/net/ethernet/intel/i40evf/i40e_txrx.c |  3 ++-
 2 files changed, 15 insertions(+), 6 deletions(-)

4 tx_timeouts observed with ~10hr of stress traffic, driver properly recovered, continued to pass traffic normally. tx_force_wb at 5 million

#15 lore raw

PATCH 8/16 i40e: add counter for arq overflows

In reply to Deepthi Kavalur

From: Mitch Williams <[email protected]>

Sometimes, ARQ overflows are a big deal and tell us that the firmware/hardware/driver/something is having problems. But normally they're no big deal. To assist in assessing this, add a counter to our Ethtool stats. A handful of ARQ overflows during VF init is no problem. A large, ever-growing number indicates that Something Bad is happening.

Change-ID Ie5348bfbc8a54a890559cb00279c28d976a55096
---
 drivers/net/ethernet/intel/i40e/i40e.h         | 1 +
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 1 +
 drivers/net/ethernet/intel/i40e/i40e_main.c    | 1 +
 3 files changed, 3 insertions(+)
drivers/net/ethernet/intel/i40e/i40e.h +1 -0
index 7ec304c..9ad2f37 100644
@@ -392,6 +392,7 @@ struct i40e_pf {
 	struct i40e_vf *vf;
 	int num_alloc_vfs;	/* actual number of VFs allocated */
 	u32 vf_aq_requests;
+	u32 arq_overflows;	/* Not fatal, possibly indicative of problems */
 
 	/* DCBx/DCBNL capability for PF that indicates
 	 * whether DCBx is managed by firmware or host
drivers/net/ethernet/intel/i40e/i40e_ethtool.c +1 -0
index e13ee93..691939d 100644
@@ -143,6 +143,7 @@ static struct i40e_stats i40e_gstrings_stats[] = {
 	I40E_PF_STAT("rx_oversize", stats.rx_oversize),
 	I40E_PF_STAT("rx_jabber", stats.rx_jabber),
 	I40E_PF_STAT("VF_admin_queue_requests", vf_aq_requests),
+	I40E_PF_STAT("arq_overflows", arq_overflows),
 	I40E_PF_STAT("rx_hwtstamp_cleared", rx_hwtstamp_cleared),
 	I40E_PF_STAT("fdir_flush_cnt", fd_flush_cnt),
 	I40E_PF_STAT("fdir_atr_match", stats.fd_atr_match),
drivers/net/ethernet/intel/i40e/i40e_main.c +1 -0
index 66cc702..f751a80 100644
@@ -6242,6 +6242,7 @@ static void i40e_clean_adminq_subtask(struct i40e_pf *pf)
 		if (hw->debug_mask & I40E_DEBUG_AQ)
 			dev_info(&pf->pdev->dev, "ARQ Overflow Error detected\n");
 		val &= ~I40E_PF_ARQLEN_ARQOVFL_MASK;
+		pf->arq_overflows++;
 	}
 	if (val & I40E_PF_ARQLEN_ARQCRIT_MASK) {
 		if (hw->debug_mask & I40E_DEBUG_AQ)
Signature · 1 line
2.1.0
#16 lore raw

PATCH 8/16 i40e: add counter for arq overflows

Quoted 8 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Deepthi Kavalur
Sent: Wednesday, December 23, 2015 12:06 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S25 08/16] i40e: add counter for arq overflows

Quoted 7 lines

From: Mitch Williams <[email protected]>

Sometimes, ARQ overflows are a big deal and tell us that the firmware/hardware/driver/something is having problems. But normally they're no big deal. To assist in assessing this, add a counter to our Ethtool stats. A handful of ARQ overflows during VF init is no problem. A large, ever- growing number indicates that Something Bad is happening.

Patch code changes correctly applied, ethtool -S [devx] shows port.arq_overflows stat, stat counts correctly

#17 lore raw

PATCH 8/16 i40e: add counter for arq overflows

In reply to Deepthi Kavalur
Quoted 16 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Deepthi Kavalur
Sent: Wednesday, December 23, 2015 12:06 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S25 08/16] i40e: add counter for arq overflows

From: Mitch Williams <[email protected]>

Sometimes, ARQ overflows are a big deal and tell us that the firmware/hardware/driver/something is having problems. But normally they're no big deal. To assist in assessing this, add a counter to our Ethtool stats. A handful of ARQ overflows during VF init is no problem. A large, ever- growing number indicates that Something Bad is happening.

Quoted 7 lines
Change-ID Ie5348bfbc8a54a890559cb00279c28d976a55096
---
 drivers/net/ethernet/intel/i40e/i40e.h         | 1 +
 drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 1 +
 drivers/net/ethernet/intel/i40e/i40e_main.c    | 1 +
 3 files changed, 3 insertions(+)

Patch code changes correctly applied, ethtool -S [devx] shows port.arq_overflows stat, stat counts correctly

#18 lore raw

PATCH 9/16 i40e: add 20G speed for tx bandwidth calculations

In reply to Deepthi Kavalur

From: Mitch Williams <[email protected]>

When calculating TX bandwidth for VFs, we need to know the link speed to make sure we don't allocate more bandwidth than is available. Add 20G link speed to the switch statement so we can support devices that link at that speed.

Change-ID I5409f6139d549e5832777db9c22ca0664e0c5f8b

---
Testing-Hints:
Find a device that links at 20G and make sure you can set VF tx bandwidth on that device.

 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +3 -0
index 8c02fa9..8996627 100644
@@ -2303,6 +2303,9 @@ int i40e_ndo_set_vf_bw(struct net_device *netdev, int vf_id, int min_tx_rate,
 	case I40E_LINK_SPEED_40GB:
 		speed = 40000;
 		break;
+	case I40E_LINK_SPEED_20GB:
+		speed = 20000;
+		break;
 	case I40E_LINK_SPEED_10GB:
 		speed = 10000;
 		break;
Signature · 1 line
2.1.0
#19 lore raw

PATCH 9/16 i40e: add 20G speed for tx bandwidth calculations

Quoted 17 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Deepthi Kavalur
Sent: Wednesday, December 23, 2015 12:06 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S25 09/16] i40e: add 20G speed for tx bandwidth calculations

From: Mitch Williams <[email protected]>

When calculating TX bandwidth for VFs, we need to know the link speed to make sure we don't allocate more bandwidth than is available. Add 20G link speed to the switch statement so we can support devices that link at that speed.

Change-ID I5409f6139d549e5832777db9c22ca0664e0c5f8b
Quoted 7 lines

---
Testing-Hints:
Find a device that links at 20G and make sure you can set VF tx bandwidth on that device.

 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 3 +++
 1 file changed, 3 insertions(+)

Patch code changes correctly applied, able to correctly set Tx bandwidth on 20G device.

#20 lore raw

PATCH 10/16 i40e: refactor dcb function

In reply to Deepthi Kavalur

From: Jesse Brandeburg <[email protected]>

This is a simple refactor suggested by the community to change a multi-level if statement into a switch.

Change-ID I831cf3c40426022220aa9b43990022d22dfd50db

---
Testing-Hints:
Verify if function still works.

 drivers/net/ethernet/intel/i40e/i40e_dcb.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_dcb.c +11 -4
index 582daa7..0fab3a9 100644
@@ -380,17 +380,20 @@ static void i40e_parse_cee_app_tlv(struct i40e_cee_feat_tlv *tlv,
 {
 	u16 length, typelength, offset = 0;
 	struct i40e_cee_app_prio *app;
-	u8 i, up, selector;
+	u8 i;
 
 	typelength = ntohs(tlv->hdr.typelen);
 	length = (u16)((typelength & I40E_LLDP_TLV_LEN_MASK) >>
 		       I40E_LLDP_TLV_LEN_SHIFT);
 
 	dcbcfg->numapps = length / sizeof(*app);
+
 	if (!dcbcfg->numapps)
 		return;
 
 	for (i = 0; i < dcbcfg->numapps; i++) {
+		u8 up, selector;
+
 		app = (struct i40e_cee_app_prio *)(tlv->tlvinfo + offset);
 		for (up = 0; up < I40E_MAX_USER_PRIORITY; up++) {
 			if (app->prio_map & BIT(up))
@@ -400,13 +403,17 @@ static void i40e_parse_cee_app_tlv(struct i40e_cee_feat_tlv *tlv,
 
 		/* Get Selector from lower 2 bits, and convert to IEEE */
 		selector = (app->upper_oui_sel & I40E_CEE_APP_SELECTOR_MASK);
-		if (selector == I40E_CEE_APP_SEL_ETHTYPE)
+		switch (selector) {
+		case I40E_CEE_APP_SEL_ETHTYPE:
 			dcbcfg->app[i].selector = I40E_APP_SEL_ETHTYPE;
-		else if (selector == I40E_CEE_APP_SEL_TCPIP)
+			break;
+		case I40E_CEE_APP_SEL_TCPIP:
 			dcbcfg->app[i].selector = I40E_APP_SEL_TCPIP;
-		else
+			break;
+		default:
 			/* Keep selector as it is for unknown types */
 			dcbcfg->app[i].selector = selector;
+		}
 
 		dcbcfg->app[i].protocolid = ntohs(app->protocol);
 		/* Move to next app */
Signature · 1 line
2.1.0
#21 lore raw

PATCH 10/16 i40e: refactor dcb function

Quoted 16 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Deepthi Kavalur
Sent: Wednesday, December 23, 2015 12:06 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S25 10/16] i40e: refactor dcb function

From: Jesse Brandeburg <[email protected]>

This is a simple refactor suggested by the community to change a multi-level if statement into a switch.

Change-ID I831cf3c40426022220aa9b43990022d22dfd50db
Quoted 6 lines

---
Testing-Hints:
Verify if function still works.

 drivers/net/ethernet/intel/i40e/i40e_dcb.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

Patch code changes correctly applied

#22 lore raw

PATCH 11/16 i40e: add a little more to an NVM update debug message

In reply to Deepthi Kavalur

From: Shannon Nelson <[email protected]>

Add a little more detail to an NVM update debug message in order to see the full ethtool request data.

Change-ID Iab10437cb32d6fddc67ee347e7c0b42511e152cd

---
Testing-Hints:
Turn on NVM update debug and see the new data in the logfile ethtool -s eth0 msglvl 0xf000008f

 drivers/net/ethernet/intel/i40e/i40e_nvm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_nvm.c +3 -2
index 59edd33..042feca 100644
@@ -750,10 +750,11 @@ i40e_status i40e_nvmupd_command(struct i40e_hw *hw,
 	/* early check for status command and debug msgs */
 	upd_cmd = i40e_nvmupd_validate_command(hw, cmd, perrno);
 
-	i40e_debug(hw, I40E_DEBUG_NVM, "%s state %d nvm_release_on_hold %d\n",
+	i40e_debug(hw, I40E_DEBUG_NVM, "%s state %d nvm_release_on_hold %d cmd 0x%08x config 0x%08x offset 0x%08x data_size 0x%08x\n",
 		   i40e_nvm_update_state_str[upd_cmd],
 		   hw->nvmupd_state,
-		   hw->aq.nvm_release_on_done);
+		   hw->aq.nvm_release_on_done,
+		   cmd->command, cmd->config, cmd->offset, cmd->data_size);
 
 	if (upd_cmd == I40E_NVMUPD_INVALID) {
 		*perrno = -EFAULT;
Signature · 1 line
2.1.0
#23 lore raw

PATCH 11/16 i40e: add a little more to an NVM update debug message

Quoted 17 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Deepthi Kavalur
Sent: Wednesday, December 23, 2015 12:06 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S25 11/16] i40e: add a little more to an NVM update debug message

From: Shannon Nelson <[email protected]>

Add a little more detail to an NVM update debug message in order to see the full ethtool request data.

Change-ID Iab10437cb32d6fddc67ee347e7c0b42511e152cd
Quoted 7 lines

---
Testing-Hints:
Turn on NVM update debug and see the new data in the logfile ethtool -s eth0 msglvl 0xf000008f

 drivers/net/ethernet/intel/i40e/i40e_nvm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch code changes correctly applied, ethtool command shows message

#24 lore raw

PATCH 12/16 i40evf: enable bus master after reset

In reply to Deepthi Kavalur

From: Mitch Williams <[email protected]>

If the VF is reset via VFLR, the device will be knocked out of bus master mode, and the driver will fail to recover from the reset. Fix this by enabling bus mastering after every reset. In a non-VFLR case, the bus master bit will not be disabled, and this call will have no effect.

Change-ID Id515859ac7a691db478222228add6d149e96801a

---
Testing-Hints:
Initiate a VFLR using "setpci -s <pci location of VF> CAP_EXP+8.W=8000"

 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 1 +
 1 file changed, 1 insertion(+)
drivers/net/ethernet/intel/i40evf/i40evf_main.c +1 -0
index 5b88123..9b38051 100644
@@ -1837,6 +1837,7 @@ static void i40evf_reset_task(struct work_struct *work)
 			break;
 		msleep(I40EVF_RESET_WAIT_MS);
 	}
+	pci_set_master(adapter->pdev);
 	/* extra wait to make sure minimum wait is met */
 	msleep(I40EVF_RESET_WAIT_MS);
 	if (i == I40EVF_RESET_WAIT_COUNT) {
Signature · 1 line
2.1.0
#25 lore raw

PATCH 12/16 i40evf: enable bus master after reset

Quoted 15 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Deepthi Kavalur
Sent: Wednesday, December 23, 2015 12:06 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S25 12/16] i40evf: enable bus master after reset

From: Mitch Williams <[email protected]>

If the VF is reset via VFLR, the device will be knocked out of bus master mode, and the driver will fail to recover from the reset. Fix this by enabling bus mastering after every reset. In a non-VFLR case, the bus master bit will not be disabled, and this call will have no effect.

Quoted 8 lines
Change-ID Id515859ac7a691db478222228add6d149e96801a

---
Testing-Hints:
Initiate a VFLR using "setpci -s <pci location of VF> CAP_EXP+8.W=8000"

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

Patch code changes correctly applied, driver properly recovers from reset

#26 lore raw

PATCH 13/16 i40e: add netdev info to vsi dump

In reply to Deepthi Kavalur

From: Shannon Nelson <[email protected]>

Add a few more bits of netdev data into the debugfs output for dump vsi. For now, we'll add the features, hw_features, vlan_features, and flags bitflags and the state. More could be added later if needed.

Also, tweak a couple nearby output lines for output readability.

Change-ID I9fb5a9da75c9ad7679498ce9ac3ba24d065ddd2e

---
Testing-Hints:
Do a "dump vsi" in debugfs and see the new prints in the output.

 drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 24 ++++++++++++++++--------
 1 file changed, 16 insertions(+), 8 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_debugfs.c +16 -8
index 10744a6..7aae056 100644
@@ -379,19 +379,27 @@ static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid)
 		return;
 	}
 	dev_info(&pf->pdev->dev, "vsi seid %d\n", seid);
-	if (vsi->netdev)
-		dev_info(&pf->pdev->dev,
-			 "    netdev: name = %s\n",
-			 vsi->netdev->name);
+	if (vsi->netdev) {
+		struct net_device *nd = vsi->netdev;
+
+		dev_info(&pf->pdev->dev, "    netdev: name = %s, state = %lu, flags = 0x%08x\n",
+			 nd->name, nd->state, nd->flags);
+		dev_info(&pf->pdev->dev, "        features      = 0x%08lx\n",
+			 (unsigned long int)nd->features);
+		dev_info(&pf->pdev->dev, "        hw_features   = 0x%08lx\n",
+			 (unsigned long int)nd->hw_features);
+		dev_info(&pf->pdev->dev, "        vlan_features = 0x%08lx\n",
+			 (unsigned long int)nd->vlan_features);
+	}
 	if (vsi->active_vlans)
 		dev_info(&pf->pdev->dev,
 			 "    vlgrp: & = %p\n", vsi->active_vlans);
 	dev_info(&pf->pdev->dev,
-		 "    netdev_registered = %i, current_netdev_flags = 0x%04x, state = %li flags = 0x%08lx\n",
-		 vsi->netdev_registered,
-		 vsi->current_netdev_flags, vsi->state, vsi->flags);
+		 "    state = %li flags = 0x%08lx, netdev_registered = %i, current_netdev_flags = 0x%04x\n",
+		 vsi->state, vsi->flags,
+		 vsi->netdev_registered, vsi->current_netdev_flags);
 	if (vsi == pf->vsi[pf->lan_vsi])
-		dev_info(&pf->pdev->dev, "MAC address: %pM SAN MAC: %pM Port MAC: %pM\n",
+		dev_info(&pf->pdev->dev, "    MAC address: %pM SAN MAC: %pM Port MAC: %pM\n",
 			 pf->hw.mac.addr,
 			 pf->hw.mac.san_addr,
 			 pf->hw.mac.port_addr);
Signature · 1 line
2.1.0
#27 lore raw

PATCH 13/16 i40e: add netdev info to vsi dump

Quoted 20 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Deepthi Kavalur
Sent: Wednesday, December 23, 2015 12:06 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S25 13/16] i40e: add netdev info to vsi dump

From: Shannon Nelson <[email protected]>

Add a few more bits of netdev data into the debugfs output for dump vsi. For now, we'll add the features, hw_features, vlan_features, and flags bitflags and the state. More could be added later if needed.

Also, tweak a couple nearby output lines for output readability.

Change-ID I9fb5a9da75c9ad7679498ce9ac3ba24d065ddd2e
Quoted 7 lines

---
Testing-Hints:
Do a "dump vsi" in debugfs and see the new prints in the output.

 drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 24 ++++++++++++++++---
-----
 1 file changed, 16 insertions(+), 8 deletions(-)

Patch code changes correctly applied, vsi dump shows new info

#28 lore raw

PATCH 13/16 i40e: add netdev info to vsi dump

In reply to Deepthi Kavalur
Quoted 20 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Deepthi Kavalur
Sent: Wednesday, December 23, 2015 12:06 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S25 13/16] i40e: add netdev info to vsi dump

From: Shannon Nelson <[email protected]>

Add a few more bits of netdev data into the debugfs output for dump vsi. For now, we'll add the features, hw_features, vlan_features, and flags bitflags and the state. More could be added later if needed.

Also, tweak a couple nearby output lines for output readability.

Change-ID I9fb5a9da75c9ad7679498ce9ac3ba24d065ddd2e
Quoted 7 lines

---
Testing-Hints:
Do a "dump vsi" in debugfs and see the new prints in the output.

 drivers/net/ethernet/intel/i40e/i40e_debugfs.c | 24 ++++++++++++++++---
-----
 1 file changed, 16 insertions(+), 8 deletions(-)

Patch code changes correctly applied, vsi dump shows new info

#29 lore raw

PATCH 14/16 i40e: remove VF device IDs from PF

In reply to Deepthi Kavalur

From: Jesse Brandeburg <[email protected]>

The PF doesn't need to know about the VF's device IDs, so remove them.

Change-ID I62cf0e0fffa1ace586e58e00bc271b10ae440f05

---
Testing-Hints:
Build only change.

 drivers/net/ethernet/intel/i40e/i40e_common.c | 8 --------
 drivers/net/ethernet/intel/i40e/i40e_devids.h | 4 ----
 2 files changed, 12 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_common.c +0 -8
index 3b03a31..9018f28 100644
@@ -62,14 +62,6 @@ static i40e_status i40e_set_mac_type(struct i40e_hw *hw)
 		case I40E_DEV_ID_10G_BASE_T_X722:
 			hw->mac.type = I40E_MAC_X722;
 			break;
-		case I40E_DEV_ID_X722_VF:
-		case I40E_DEV_ID_X722_VF_HV:
-			hw->mac.type = I40E_MAC_X722_VF;
-			break;
-		case I40E_DEV_ID_VF:
-		case I40E_DEV_ID_VF_HV:
-			hw->mac.type = I40E_MAC_VF;
-			break;
 		default:
 			hw->mac.type = I40E_MAC_GENERIC;
 			break;
drivers/net/ethernet/intel/i40e/i40e_devids.h +0 -4
index f7ce5c7..99257fc 100644
@@ -39,15 +39,11 @@
 #define I40E_DEV_ID_20G_KR2		0x1587
 #define I40E_DEV_ID_20G_KR2_A		0x1588
 #define I40E_DEV_ID_10G_BASE_T4		0x1589
-#define I40E_DEV_ID_VF			0x154C
-#define I40E_DEV_ID_VF_HV		0x1571
 #define I40E_DEV_ID_KX_X722		0x37CE
 #define I40E_DEV_ID_QSFP_X722		0x37CF
 #define I40E_DEV_ID_SFP_X722		0x37D0
 #define I40E_DEV_ID_1G_BASE_T_X722	0x37D1
 #define I40E_DEV_ID_10G_BASE_T_X722	0x37D2
-#define I40E_DEV_ID_X722_VF		0x37CD
-#define I40E_DEV_ID_X722_VF_HV		0x37D9
 
 #define i40e_is_40G_device(d)		((d) == I40E_DEV_ID_QSFP_A  || \
 					 (d) == I40E_DEV_ID_QSFP_B  || \
Signature · 1 line
2.1.0
#30 lore raw

PATCH 14/16 i40e: remove VF device IDs from PF

Quoted 16 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Deepthi Kavalur
Sent: Wednesday, December 23, 2015 12:06 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S25 14/16] i40e: remove VF device IDs from PF

From: Jesse Brandeburg <[email protected]>

The PF doesn't need to know about the VF's device IDs, so remove them.

Change-ID I62cf0e0fffa1ace586e58e00bc271b10ae440f05
Quoted 7 lines

---
Testing-Hints:
Build only change.

 drivers/net/ethernet/intel/i40e/i40e_common.c | 8 --------
drivers/net/ethernet/intel/i40e/i40e_devids.h | 4 ----
 2 files changed, 12 deletions(-)

Patch code changes correctly applied

#31 lore raw

PATCH 14/16 i40e: remove VF device IDs from PF

In reply to Deepthi Kavalur
Quoted 16 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Deepthi Kavalur
Sent: Wednesday, December 23, 2015 12:06 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S25 14/16] i40e: remove VF device IDs from PF

From: Jesse Brandeburg <[email protected]>

The PF doesn't need to know about the VF's device IDs, so remove them.

Change-ID I62cf0e0fffa1ace586e58e00bc271b10ae440f05
Quoted 7 lines

---
Testing-Hints:
Build only change.

 drivers/net/ethernet/intel/i40e/i40e_common.c | 8 --------
drivers/net/ethernet/intel/i40e/i40e_devids.h | 4 ----
 2 files changed, 12 deletions(-)

Patch code changes correctly applied

#32 lore raw

PATCH 15/16 i40e: trivial: remove unnecessary local var

In reply to Deepthi Kavalur

From: Jesse Brandeburg <[email protected]>

Probe routine already has too many locals, just convert one used for kzalloc into a kcalloc, eliminating the local.

Change-ID I349049872b71f858cbeb91ad7836e6767fc7b7d1

---
Testing-Hints: compile test only.

 drivers/net/ethernet/intel/i40e/i40e_main.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +2 -3
index f751a80..eeaa794 100644
@@ -10538,7 +10538,6 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	u16 wol_nvm_bits;
 	u16 link_status;
 	int err;
-	u32 len;
 	u32 val;
 	u32 i;
 	u8 set_fc_aq_fail;
@@ -10791,8 +10790,8 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		pf->num_alloc_vsi = pf->hw.func_caps.num_vsis;
 
 	/* Set up the *vsi struct and our local tracking of the MAIN PF vsi. */
-	len = sizeof(struct i40e_vsi *) * pf->num_alloc_vsi;
-	pf->vsi = kzalloc(len, GFP_KERNEL);
+	pf->vsi = kcalloc(pf->num_alloc_vsi, sizeof(struct i40e_vsi *),
+			  GFP_KERNEL);
 	if (!pf->vsi) {
 		err = -ENOMEM;
 		goto err_switch_setup;
Signature · 1 line
2.1.0
#33 lore raw

PATCH 15/16 i40e: trivial: remove unnecessary local var

Quoted 13 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Deepthi Kavalur
Sent: Wednesday, December 23, 2015 12:06 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S25 15/16] i40e: trivial: remove unnecessary local var

From: Jesse Brandeburg <[email protected]>

Probe routine already has too many locals, just convert one used for kzalloc into a kcalloc, eliminating the local.

Quoted 8 lines
Change-ID I349049872b71f858cbeb91ad7836e6767fc7b7d1

---
Testing-Hints: compile test only.

 drivers/net/ethernet/intel/i40e/i40e_main.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Patch code changes correctly applied

#34 lore raw

PATCH 16/16 i40e/i40evf: Bump i40e to 1.4.11 and i40evf to 1.4.7

In reply to Deepthi Kavalur

From: Catherine Sullivan <[email protected]>

Bump.

Change-ID I21aa520a3c8c5f4f562a98019bf8b76b3706c480

---
Testing-Hints: check version

 drivers/net/ethernet/intel/i40e/i40e_main.c     | 2 +-
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_main.c +1 -1
index eeaa794..ad5b961 100644
@@ -48,7 +48,7 @@ static const char i40e_driver_string[] =
 
 #define DRV_VERSION_MAJOR 1
 #define DRV_VERSION_MINOR 4
-#define DRV_VERSION_BUILD 10
+#define DRV_VERSION_BUILD 11
 #define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \
 	     __stringify(DRV_VERSION_MINOR) "." \
 	     __stringify(DRV_VERSION_BUILD)    DRV_KERN
drivers/net/ethernet/intel/i40evf/i40evf_main.c +1 -1
index 9b38051..da33d0e 100644
@@ -38,7 +38,7 @@ static const char i40evf_driver_string[] =
 
 #define DRV_VERSION_MAJOR 1
 #define DRV_VERSION_MINOR 4
-#define DRV_VERSION_BUILD 4
+#define DRV_VERSION_BUILD 7
 #define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \
 	     __stringify(DRV_VERSION_MINOR) "." \
 	     __stringify(DRV_VERSION_BUILD) \
Signature · 1 line
2.1.0
#35 lore raw

PATCH 16/16 i40e/i40evf: Bump i40e to 1.4.11 and i40evf to 1.4.7

Quoted 12 lines

-----Original Message-----
From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On Behalf Of Deepthi Kavalur
Sent: Wednesday, December 23, 2015 12:06 PM
To: intel-wired-lan at lists.osuosl.org
Subject: [Intel-wired-lan] [next PATCH S25 16/16] i40e/i40evf: Bump i40e to 1.4.11 and i40evf to 1.4.7

From: Catherine Sullivan <[email protected]>

Bump.

Quoted 8 lines
Change-ID I21aa520a3c8c5f4f562a98019bf8b76b3706c480

---
Testing-Hints: check version

 drivers/net/ethernet/intel/i40e/i40e_main.c     | 2 +-
 drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Patch code changes correctly applied, drivers reports correct versions