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

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


Jeff Kirsher says:

====================
40GbE Intel Wired LAN Driver Updates 2018-01-10

This series contains updates to i40e and i40evf only.

Alice adds the displaying of priority xon/xoff packet stats, since we
were already keeping track of them.  Based on the recent changes, bump
the driver versions.

Jake changes how the driver determines whether or not the device is
currently up to resolve the possible issue of freeing data structures
and other memory before they have been fully allocated.  Refactored
the driver to simplify the locking behavior and to consistently use
spinlocks instead of an overloaded bit lock to protect MAC and filter
lists.  Created a helper function which can convert the AdminQ link
speed definition into a virtchnl definition.

Colin Ian King cleans up a redundant variable initialization.

Alex cleans up the driver to stop clearing the pending bit array for
each vector manually, since it is prone to dropping an interrupt and
based on the hardware specs, the pending bit array will be cleared
automatically in MSI-X mode.  Cleaned up flags for promiscuous mode to
resolve an issue where enabling & disabling promiscuous mode on a VF
would leave us in a high polling rate for the adminq task.  Cleaned up
code that was prone to race issues.

Jingjing renames pipeline personalization profile (ppp) to dynamic
device personalization (ddp) because it was being confused with the
well known point to point protocol.  Also removed checks for "track_id"
being zero, since it is valid for it to be zero for profiles that do
not have any 'write' commands.

v2: cleaned up commit message for patch 12 based on feedback from Sergei
    Shtylyov and Alex Duyck
v3: dropped patch 15 from the original series while Mariusz Stachura
    works on the changes that Jakub Kicinski has suggested
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 09fb35ea 0794fedc
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -198,7 +198,7 @@ enum i40e_admin_queue_opc {
	i40e_aqc_opc_add_mirror_rule	= 0x0260,
	i40e_aqc_opc_delete_mirror_rule	= 0x0261,

	/* Pipeline Personalization Profile */
	/* Dynamic Device Personalization */
	i40e_aqc_opc_write_personalization_profile	= 0x0270,
	i40e_aqc_opc_get_personalization_profile_list	= 0x0271,

@@ -1594,7 +1594,7 @@ struct i40e_aqc_add_delete_mirror_rule_completion {

I40E_CHECK_CMD_LENGTH(i40e_aqc_add_delete_mirror_rule_completion);

/* Pipeline Personalization Profile */
/* Dynamic Device Personalization */
struct i40e_aqc_write_personalization_profile {
	u8      flags;
	u8      reserved[3];
@@ -1605,7 +1605,7 @@ struct i40e_aqc_write_personalization_profile {

I40E_CHECK_CMD_LENGTH(i40e_aqc_write_personalization_profile);

struct i40e_aqc_write_ppp_resp {
struct i40e_aqc_write_ddp_resp {
	__le32 error_offset;
	__le32 error_info;
	__le32 addr_high;
@@ -1614,8 +1614,8 @@ struct i40e_aqc_write_ppp_resp {

struct i40e_aqc_get_applied_profiles {
	u8      flags;
#define I40E_AQC_GET_PPP_GET_CONF	0x1
#define I40E_AQC_GET_PPP_GET_RDPU_CONF	0x2
#define I40E_AQC_GET_DDP_GET_CONF	0x1
#define I40E_AQC_GET_DDP_GET_RDPU_CONF	0x2
	u8      rsv[3];
	__le32  reserved;
	__le32  addr_high;
+11 −16
Original line number Diff line number Diff line
@@ -5236,7 +5236,7 @@ i40e_status i40e_aq_get_phy_register(struct i40e_hw *hw,
}

/**
 * i40e_aq_write_ppp - Write pipeline personalization profile (ppp)
 * i40e_aq_write_ddp - Write dynamic device personalization (ddp)
 * @hw: pointer to the hw struct
 * @buff: command buffer (size in bytes = buff_size)
 * @buff_size: buffer size in bytes
@@ -5246,7 +5246,7 @@ i40e_status i40e_aq_get_phy_register(struct i40e_hw *hw,
 * @cmd_details: pointer to command details structure or NULL
 **/
enum
i40e_status_code i40e_aq_write_ppp(struct i40e_hw *hw, void *buff,
i40e_status_code i40e_aq_write_ddp(struct i40e_hw *hw, void *buff,
				   u16 buff_size, u32 track_id,
				   u32 *error_offset, u32 *error_info,
				   struct i40e_asq_cmd_details *cmd_details)
@@ -5255,7 +5255,7 @@ i40e_status_code i40e_aq_write_ppp(struct i40e_hw *hw, void *buff,
	struct i40e_aqc_write_personalization_profile *cmd =
		(struct i40e_aqc_write_personalization_profile *)
		&desc.params.raw;
	struct i40e_aqc_write_ppp_resp *resp;
	struct i40e_aqc_write_ddp_resp *resp;
	i40e_status status;

	i40e_fill_default_direct_cmd_desc(&desc,
@@ -5271,7 +5271,7 @@ i40e_status_code i40e_aq_write_ppp(struct i40e_hw *hw, void *buff,

	status = i40e_asq_send_command(hw, &desc, buff, buff_size, cmd_details);
	if (!status) {
		resp = (struct i40e_aqc_write_ppp_resp *)&desc.params.raw;
		resp = (struct i40e_aqc_write_ddp_resp *)&desc.params.raw;
		if (error_offset)
			*error_offset = le32_to_cpu(resp->error_offset);
		if (error_info)
@@ -5282,14 +5282,14 @@ i40e_status_code i40e_aq_write_ppp(struct i40e_hw *hw, void *buff,
}

/**
 * i40e_aq_get_ppp_list - Read pipeline personalization profile (ppp)
 * i40e_aq_get_ddp_list - Read dynamic device personalization (ddp)
 * @hw: pointer to the hw struct
 * @buff: command buffer (size in bytes = buff_size)
 * @buff_size: buffer size in bytes
 * @cmd_details: pointer to command details structure or NULL
 **/
enum
i40e_status_code i40e_aq_get_ppp_list(struct i40e_hw *hw, void *buff,
i40e_status_code i40e_aq_get_ddp_list(struct i40e_hw *hw, void *buff,
				      u16 buff_size, u8 flags,
				      struct i40e_asq_cmd_details *cmd_details)
{
@@ -5364,11 +5364,6 @@ i40e_write_profile(struct i40e_hw *hw, struct i40e_profile_segment *profile,
	u32 offset = 0, info = 0;
	u32 i;

	if (!track_id) {
		i40e_debug(hw, I40E_DEBUG_PACKAGE, "Track_id can't be 0.");
		return I40E_NOT_SUPPORTED;
	}

	dev_cnt = profile->device_table_count;

	for (i = 0; i < dev_cnt; i++) {
@@ -5378,7 +5373,7 @@ i40e_write_profile(struct i40e_hw *hw, struct i40e_profile_segment *profile,
				break;
	}
	if (i == dev_cnt) {
		i40e_debug(hw, I40E_DEBUG_PACKAGE, "Device doesn't support PPP");
		i40e_debug(hw, I40E_DEBUG_PACKAGE, "Device doesn't support DDP");
		return I40E_ERR_DEVICE_NOT_SUPPORTED;
	}

@@ -5397,7 +5392,7 @@ i40e_write_profile(struct i40e_hw *hw, struct i40e_profile_segment *profile,
			sizeof(struct i40e_profile_section_header);

		/* Write profile */
		status = i40e_aq_write_ppp(hw, (void *)sec, (u16)section_size,
		status = i40e_aq_write_ddp(hw, (void *)sec, (u16)section_size,
					   track_id, &offset, &info, NULL);
		if (status) {
			i40e_debug(hw, I40E_DEBUG_PACKAGE,
@@ -5439,10 +5434,10 @@ i40e_add_pinfo_to_list(struct i40e_hw *hw,
					     sec->section.offset);
	pinfo->track_id = track_id;
	pinfo->version = profile->version;
	pinfo->op = I40E_PPP_ADD_TRACKID;
	memcpy(pinfo->name, profile->name, I40E_PPP_NAME_SIZE);
	pinfo->op = I40E_DDP_ADD_TRACKID;
	memcpy(pinfo->name, profile->name, I40E_DDP_NAME_SIZE);

	status = i40e_aq_write_ppp(hw, (void *)sec, sec->data_end,
	status = i40e_aq_write_ddp(hw, (void *)sec, sec->data_end,
				   track_id, &offset, &info, NULL);

	return status;
+4 −0
Original line number Diff line number Diff line
@@ -126,6 +126,10 @@ static const struct i40e_stats i40e_gstrings_stats[] = {
	I40E_PF_STAT("link_xoff_rx", stats.link_xoff_rx),
	I40E_PF_STAT("link_xon_tx", stats.link_xon_tx),
	I40E_PF_STAT("link_xoff_tx", stats.link_xoff_tx),
	I40E_PF_STAT("priority_xon_rx", stats.priority_xon_rx),
	I40E_PF_STAT("priority_xoff_rx", stats.priority_xoff_rx),
	I40E_PF_STAT("priority_xon_tx", stats.priority_xon_tx),
	I40E_PF_STAT("priority_xoff_tx", stats.priority_xoff_tx),
	I40E_PF_STAT("rx_size_64", stats.rx_size_64),
	I40E_PF_STAT("rx_size_127", stats.rx_size_127),
	I40E_PF_STAT("rx_size_255", stats.rx_size_255),
+2 −2
Original line number Diff line number Diff line
@@ -47,8 +47,8 @@ static const char i40e_driver_string[] =
#define DRV_KERN "-k"

#define DRV_VERSION_MAJOR 2
#define DRV_VERSION_MINOR 1
#define DRV_VERSION_BUILD 14
#define DRV_VERSION_MINOR 3
#define DRV_VERSION_BUILD 2
#define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \
	     __stringify(DRV_VERSION_MINOR) "." \
	     __stringify(DRV_VERSION_BUILD)    DRV_KERN
+1 −1
Original line number Diff line number Diff line
@@ -389,7 +389,7 @@ static i40e_status i40e_read_nvm_buffer_aq(struct i40e_hw *hw, u16 offset,
					   u16 *words, u16 *data)
{
	i40e_status ret_code;
	u16 read_size = *words;
	u16 read_size;
	bool last_cmd = false;
	u16 words_read = 0;
	u16 i = 0;
Loading