Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5515885 authored by David S. Miller's avatar David S. Miller
Browse files


Jeff Kirsher says:

====================
40GbE Intel Wired LAN Driver Updates 2016-02-16

This series contains updates to i40e/i40evf only.

Shannon adds flags to MAC allocation requests to signify that the MAC VLAN
filters should come from the shared resource pool.  Added a new "set switch
config" admin queue command and the new Cisco VXLAN-GPE cloud tunnel type
for the admin queue commands.  Added more detail to the NVM update debug
message in order to see the full ethtool request data.  Also added a few
more bits of netdev data into the debugfs output for dump VSI.

Pandi fixes the width of two datatypes which were being declared a different
size from what they are assigned.

Anjali fixes an issue where we were not doing write-back on interrupt
throttle for legacy case in x722.

Mitch adds a counter for ARQ overflows since sometimes an ever-growing
number indicates that something bad is happening.  Also added 20G speed for
Tx bandwidth calculations.

Jesse refactors the DCB function based on a community suggestion to change
the multi-level if statement into a switch statement.  Cleans up VF device
IDs in the PF, since it does not need to know them.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 86f44778 82f399c9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -393,6 +393,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
+40 −2
Original line number Diff line number Diff line
@@ -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;
@@ -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,
@@ -229,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,
@@ -683,6 +685,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 +922,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];
};
@@ -976,6 +990,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 << \
@@ -1264,6 +1279,12 @@ 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
#define I40E_AQC_ADD_CLOUD_FLAGS_SHARED_OUTER_IP	0x8000

	__le32	tenant_id;
	u8	reserved[4];
@@ -1932,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)
@@ -2211,6 +2248,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];
};

+0 −8
Original line number Diff line number Diff line
@@ -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;
+11 −4
Original line number Diff line number Diff line
@@ -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 */
+16 −8
Original line number Diff line number Diff line
@@ -379,17 +379,25 @@ 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",
			 pf->hw.mac.addr,
Loading