Skip to content

Commit

Permalink
Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git…
Browse files Browse the repository at this point in the history
…/jkirsher/next-queue

Jeff Kirsher says:

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

This series contains updates to i40e and i40evf.

Michal updates the driver to pass critical errors from the firmware to
the caller.

Patryk fixes an issue of creating multiple identical filters with the
same location, by simply moving the functions so that we remove the
existing filter and then add the new filter.

Paweł adds back in the ability to turn off offloads when VLAN is set for
the VF driver.  Fixed an issue where the number of TC queue pairs was
exceeding MSI-X vectors count, causing messages about invalid TC mapping
and wrong selected Tx queue.

Alex cleans up the i40e/i40evf_set_itr_per_queue() by dropping all the
unneeded pointer chases.  Puts to use the reg_idx value, which was going
unused, so that we can avoid having to compute the vector every time
throughout the driver.

Upasana enable the driver to display LLDP information on the vSphere Web
Client by exposing DCB parameters.

Alice converts our flags from 32 to 64 bit size, since we have added
more flags.

Dave implements a private ethtool flag to disable the processing of LLDP
packets by the firmware, so that the firmware will not consume LLDPDU
and cause them to be sent up the stack.

Alan adds a mechanism for detecting/storing the flag for processing of
LLDP packets by the firmware, so that its current state is persistent
across reboots/reloads of the driver.

Avinash fixes kdump with i40e due to resource constraints.  We were
enabling VMDq and iWARP when we just have a single CPU, which was
starving kdump for the lack of IRQs.

Jake adds support to program the fragmented IPv4 input set PCTYPE.
Fixed the reported masks to properly report that the entire field is
masked, since we had accidentally swapped the mask values for the IPv4
addresses with the L4 port numbers.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jan 29, 2018
2 parents 457740a + 1563f2d commit 5abe9ea
Show file tree
Hide file tree
Showing 17 changed files with 342 additions and 106 deletions.
67 changes: 34 additions & 33 deletions drivers/net/ethernet/intel/i40e/i40e.h
Original file line number Diff line number Diff line change
Expand Up @@ -508,39 +508,40 @@ struct i40e_pf {
#define I40E_HW_PORT_ID_VALID BIT(17)
#define I40E_HW_RESTART_AUTONEG BIT(18)

u32 flags;
#define I40E_FLAG_RX_CSUM_ENABLED BIT(0)
#define I40E_FLAG_MSI_ENABLED BIT(1)
#define I40E_FLAG_MSIX_ENABLED BIT(2)
#define I40E_FLAG_RSS_ENABLED BIT(3)
#define I40E_FLAG_VMDQ_ENABLED BIT(4)
#define I40E_FLAG_FILTER_SYNC BIT(5)
#define I40E_FLAG_SRIOV_ENABLED BIT(6)
#define I40E_FLAG_DCB_CAPABLE BIT(7)
#define I40E_FLAG_DCB_ENABLED BIT(8)
#define I40E_FLAG_FD_SB_ENABLED BIT(9)
#define I40E_FLAG_FD_ATR_ENABLED BIT(10)
#define I40E_FLAG_FD_SB_AUTO_DISABLED BIT(11)
#define I40E_FLAG_FD_ATR_AUTO_DISABLED BIT(12)
#define I40E_FLAG_MFP_ENABLED BIT(13)
#define I40E_FLAG_UDP_FILTER_SYNC BIT(14)
#define I40E_FLAG_HW_ATR_EVICT_ENABLED BIT(15)
#define I40E_FLAG_VEB_MODE_ENABLED BIT(16)
#define I40E_FLAG_VEB_STATS_ENABLED BIT(17)
#define I40E_FLAG_LINK_POLLING_ENABLED BIT(18)
#define I40E_FLAG_TRUE_PROMISC_SUPPORT BIT(19)
#define I40E_FLAG_TEMP_LINK_POLLING BIT(20)
#define I40E_FLAG_LEGACY_RX BIT(21)
#define I40E_FLAG_PTP BIT(22)
#define I40E_FLAG_IWARP_ENABLED BIT(23)
#define I40E_FLAG_SERVICE_CLIENT_REQUESTED BIT(24)
#define I40E_FLAG_CLIENT_L2_CHANGE BIT(25)
#define I40E_FLAG_CLIENT_RESET BIT(26)
#define I40E_FLAG_LINK_DOWN_ON_CLOSE_ENABLED BIT(27)
#define I40E_FLAG_SOURCE_PRUNING_DISABLED BIT(28)
#define I40E_FLAG_TC_MQPRIO BIT(29)
#define I40E_FLAG_FD_SB_INACTIVE BIT(30)
#define I40E_FLAG_FD_SB_TO_CLOUD_FILTER BIT(31)
u64 flags;
#define I40E_FLAG_RX_CSUM_ENABLED BIT_ULL(0)
#define I40E_FLAG_MSI_ENABLED BIT_ULL(1)
#define I40E_FLAG_MSIX_ENABLED BIT_ULL(2)
#define I40E_FLAG_RSS_ENABLED BIT_ULL(3)
#define I40E_FLAG_VMDQ_ENABLED BIT_ULL(4)
#define I40E_FLAG_FILTER_SYNC BIT_ULL(5)
#define I40E_FLAG_SRIOV_ENABLED BIT_ULL(6)
#define I40E_FLAG_DCB_CAPABLE BIT_ULL(7)
#define I40E_FLAG_DCB_ENABLED BIT_ULL(8)
#define I40E_FLAG_FD_SB_ENABLED BIT_ULL(9)
#define I40E_FLAG_FD_ATR_ENABLED BIT_ULL(10)
#define I40E_FLAG_FD_SB_AUTO_DISABLED BIT_ULL(11)
#define I40E_FLAG_FD_ATR_AUTO_DISABLED BIT_ULL(12)
#define I40E_FLAG_MFP_ENABLED BIT_ULL(13)
#define I40E_FLAG_UDP_FILTER_SYNC BIT_ULL(14)
#define I40E_FLAG_HW_ATR_EVICT_ENABLED BIT_ULL(15)
#define I40E_FLAG_VEB_MODE_ENABLED BIT_ULL(16)
#define I40E_FLAG_VEB_STATS_ENABLED BIT_ULL(17)
#define I40E_FLAG_LINK_POLLING_ENABLED BIT_ULL(18)
#define I40E_FLAG_TRUE_PROMISC_SUPPORT BIT_ULL(19)
#define I40E_FLAG_TEMP_LINK_POLLING BIT_ULL(20)
#define I40E_FLAG_LEGACY_RX BIT_ULL(21)
#define I40E_FLAG_PTP BIT_ULL(22)
#define I40E_FLAG_IWARP_ENABLED BIT_ULL(23)
#define I40E_FLAG_SERVICE_CLIENT_REQUESTED BIT_ULL(24)
#define I40E_FLAG_CLIENT_L2_CHANGE BIT_ULL(25)
#define I40E_FLAG_CLIENT_RESET BIT_ULL(26)
#define I40E_FLAG_LINK_DOWN_ON_CLOSE_ENABLED BIT_ULL(27)
#define I40E_FLAG_SOURCE_PRUNING_DISABLED BIT_ULL(28)
#define I40E_FLAG_TC_MQPRIO BIT_ULL(29)
#define I40E_FLAG_FD_SB_INACTIVE BIT_ULL(30)
#define I40E_FLAG_FD_SB_TO_CLOUD_FILTER BIT_ULL(31)
#define I40E_FLAG_DISABLE_FW_LLDP BIT_ULL(32)

struct i40e_client_instance *cinst;
bool stat_offsets_loaded;
Expand Down
15 changes: 10 additions & 5 deletions drivers/net/ethernet/intel/i40e/i40e_adminq.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,10 +907,15 @@ i40e_status i40e_asq_send_command(struct i40e_hw *hw,
/* update the error if time out occurred */
if ((!cmd_completed) &&
(!details->async && !details->postpone)) {
i40e_debug(hw,
I40E_DEBUG_AQ_MESSAGE,
"AQTX: Writeback timeout.\n");
status = I40E_ERR_ADMIN_QUEUE_TIMEOUT;
if (rd32(hw, hw->aq.asq.len) & I40E_GL_ATQLEN_ATQCRIT_MASK) {
i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE,
"AQTX: AQ Critical error.\n");
status = I40E_ERR_ADMIN_QUEUE_CRITICAL_ERROR;
} else {
i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE,
"AQTX: Writeback timeout.\n");
status = I40E_ERR_ADMIN_QUEUE_TIMEOUT;
}
}

asq_send_command_error:
Expand Down Expand Up @@ -971,7 +976,7 @@ i40e_status i40e_clean_arq_element(struct i40e_hw *hw,
}

/* set next_to_use to head */
ntu = (rd32(hw, hw->aq.arq.head) & I40E_PF_ARQH_ARQH_MASK);
ntu = rd32(hw, hw->aq.arq.head) & I40E_PF_ARQH_ARQH_MASK;
if (ntu == ntc) {
/* nothing to do - shouldn't need to update ring's values */
ret_code = I40E_ERR_ADMIN_QUEUE_NO_WORK;
Expand Down
12 changes: 12 additions & 0 deletions drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ enum i40e_admin_queue_opc {
/* DCB commands */
i40e_aqc_opc_dcb_ignore_pfc = 0x0301,
i40e_aqc_opc_dcb_updated = 0x0302,
i40e_aqc_opc_set_dcb_parameters = 0x0303,

/* TX scheduler */
i40e_aqc_opc_configure_vsi_bw_limit = 0x0400,
Expand Down Expand Up @@ -2496,6 +2497,17 @@ struct i40e_aqc_lldp_start {

I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_start);

/* Set DCB (direct 0x0303) */
struct i40e_aqc_set_dcb_parameters {
u8 command;
#define I40E_AQ_DCB_SET_AGENT 0x1
#define I40E_DCB_VALID 0x1
u8 valid_flags;
u8 reserved[14];
};

I40E_CHECK_CMD_LENGTH(i40e_aqc_set_dcb_parameters);

/* Get CEE DCBX Oper Config (0x0A07)
* uses the generic descriptor struct
* returns below as indirect response
Expand Down
29 changes: 29 additions & 0 deletions drivers/net/ethernet/intel/i40e/i40e_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ const char *i40e_stat_str(struct i40e_hw *hw, i40e_status stat_err)
return "I40E_NOT_SUPPORTED";
case I40E_ERR_FIRMWARE_API_VERSION:
return "I40E_ERR_FIRMWARE_API_VERSION";
case I40E_ERR_ADMIN_QUEUE_CRITICAL_ERROR:
return "I40E_ERR_ADMIN_QUEUE_CRITICAL_ERROR";
}

snprintf(hw->err_str, sizeof(hw->err_str), "%d", stat_err);
Expand Down Expand Up @@ -3639,7 +3641,34 @@ i40e_status i40e_aq_start_lldp(struct i40e_hw *hw,
i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_lldp_start);

cmd->command = I40E_AQ_LLDP_AGENT_START;
status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);

return status;
}

/**
* i40e_aq_set_dcb_parameters
* @hw: pointer to the hw struct
* @cmd_details: pointer to command details structure or NULL
* @dcb_enable: True if DCB configuration needs to be applied
*
**/
enum i40e_status_code
i40e_aq_set_dcb_parameters(struct i40e_hw *hw, bool dcb_enable,
struct i40e_asq_cmd_details *cmd_details)
{
struct i40e_aq_desc desc;
struct i40e_aqc_set_dcb_parameters *cmd =
(struct i40e_aqc_set_dcb_parameters *)&desc.params.raw;
i40e_status status;

i40e_fill_default_direct_cmd_desc(&desc,
i40e_aqc_opc_set_dcb_parameters);

if (dcb_enable) {
cmd->valid_flags = I40E_DCB_VALID;
cmd->command = I40E_AQ_DCB_SET_AGENT;
}
status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);

return status;
Expand Down
Loading

0 comments on commit 5abe9ea

Please sign in to comment.