Skip to content

Commit bab3ce4

Browse files
committed
Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue
Tony Nguyen says: ==================== ice: implement SRIOV VF Active-Active LAG Dave Ertman says: Implement support for SRIOV VFs over an Active-Active link aggregate. The same restrictions apply as are in place for the support of Active-Backup bonds. - the two interfaces must be on the same NIC - the FW LLDP engine needs to be disabled - the DDP package that supports VF LAG must be loaded on device - the two interfaces must have the same QoS config - only the first interface added to the bond will have VF support - the interface with VFs must be in switchdev mode With the additional requirement of - the version of the FW on the NIC needs to have VF Active/Active support The balancing of traffic between the two interfaces is done on a queue basis. Taking the queues allocated to all of the VFs as a whole, one half of them will be distributed to each interface. When a link goes down, then the queues allocated to the down interface will migrate to the active port. When the down port comes back up, then the same queues as were originally assigned there will be moved back. Patch 1 cleans up void pointer casts Patch 2 utilizes bool over u8 when appropriate Patch 3 adds a driver prefix to a LAG define Patch 4 pre-move a function to reduce delta in implementation patch Patch 5 cleanup variable initialization in declaration block Patch 6 cleanup capability parsing for LAG feature Patch 7 is the implementation of the new functionality * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ice: Implement support for SRIOV VFs across Active/Active bonds ice: cleanup capabilities evaluation ice: Cleanup variable initialization in LAG code ice: move LAG function in code to prepare for Active-Active ice: Add driver specific prefix to LAG defines ice: replace u8 elements with bool where appropriate ice: Remove casts on void pointers in LAG code ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 8159572 + 28f073b commit bab3ce4

File tree

8 files changed

+807
-226
lines changed

8 files changed

+807
-226
lines changed

drivers/net/ethernet/intel/ice/ice.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ enum ice_feature {
203203
ICE_F_GCS,
204204
ICE_F_ROCE_LAG,
205205
ICE_F_SRIOV_LAG,
206+
ICE_F_SRIOV_AA_LAG,
206207
ICE_F_MBX_LIMIT,
207208
ICE_F_MAX
208209
};

drivers/net/ethernet/intel/ice/ice_adminq_cmd.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2060,6 +2060,10 @@ struct ice_aqc_cfg_txqs {
20602060
#define ICE_AQC_Q_CFG_SRC_PRT_M 0x7
20612061
#define ICE_AQC_Q_CFG_DST_PRT_S 3
20622062
#define ICE_AQC_Q_CFG_DST_PRT_M (0x7 << ICE_AQC_Q_CFG_DST_PRT_S)
2063+
#define ICE_AQC_Q_CFG_MODE_M GENMASK(7, 6)
2064+
#define ICE_AQC_Q_CFG_MODE_SAME_PF 0x0
2065+
#define ICE_AQC_Q_CFG_MODE_GIVE_OWN 0x1
2066+
#define ICE_AQC_Q_CFG_MODE_KEEP_OWN 0x2
20632067
u8 time_out;
20642068
#define ICE_AQC_Q_CFG_TIMEOUT_S 2
20652069
#define ICE_AQC_Q_CFG_TIMEOUT_M (0x1F << ICE_AQC_Q_CFG_TIMEOUT_S)

drivers/net/ethernet/intel/ice/ice_common.c

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2418,12 +2418,15 @@ ice_parse_common_caps(struct ice_hw *hw, struct ice_hw_common_caps *caps,
24182418
caps->reset_restrict_support);
24192419
break;
24202420
case LIBIE_AQC_CAPS_FW_LAG_SUPPORT:
2421-
caps->roce_lag = !!(number & LIBIE_AQC_BIT_ROCEV2_LAG);
2421+
caps->roce_lag = number & LIBIE_AQC_BIT_ROCEV2_LAG;
24222422
ice_debug(hw, ICE_DBG_INIT, "%s: roce_lag = %u\n",
24232423
prefix, caps->roce_lag);
2424-
caps->sriov_lag = !!(number & LIBIE_AQC_BIT_SRIOV_LAG);
2424+
caps->sriov_lag = number & LIBIE_AQC_BIT_SRIOV_LAG;
24252425
ice_debug(hw, ICE_DBG_INIT, "%s: sriov_lag = %u\n",
24262426
prefix, caps->sriov_lag);
2427+
caps->sriov_aa_lag = number & LIBIE_AQC_BIT_SRIOV_AA_LAG;
2428+
ice_debug(hw, ICE_DBG_INIT, "%s: sriov_aa_lag = %u\n",
2429+
prefix, caps->sriov_aa_lag);
24272430
break;
24282431
case LIBIE_AQC_CAPS_TX_SCHED_TOPO_COMP_MODE:
24292432
caps->tx_sched_topo_comp_mode_en = (number == 1);
@@ -4712,24 +4715,24 @@ ice_aq_dis_lan_txq(struct ice_hw *hw, u8 num_qgrps,
47124715
}
47134716

47144717
/**
4715-
* ice_aq_cfg_lan_txq
4718+
* ice_aq_cfg_lan_txq - send AQ command 0x0C32 to FW
47164719
* @hw: pointer to the hardware structure
47174720
* @buf: buffer for command
47184721
* @buf_size: size of buffer in bytes
47194722
* @num_qs: number of queues being configured
47204723
* @oldport: origination lport
47214724
* @newport: destination lport
4725+
* @mode: cmd_type for move to use
47224726
* @cd: pointer to command details structure or NULL
47234727
*
47244728
* Move/Configure LAN Tx queue (0x0C32)
47254729
*
4726-
* There is a better AQ command to use for moving nodes, so only coding
4727-
* this one for configuring the node.
4730+
* Return: Zero on success, associated error code on failure.
47284731
*/
47294732
int
47304733
ice_aq_cfg_lan_txq(struct ice_hw *hw, struct ice_aqc_cfg_txqs_buf *buf,
47314734
u16 buf_size, u16 num_qs, u8 oldport, u8 newport,
4732-
struct ice_sq_cd *cd)
4735+
u8 mode, struct ice_sq_cd *cd)
47334736
{
47344737
struct ice_aqc_cfg_txqs *cmd;
47354738
struct libie_aq_desc desc;
@@ -4742,10 +4745,12 @@ ice_aq_cfg_lan_txq(struct ice_hw *hw, struct ice_aqc_cfg_txqs_buf *buf,
47424745
if (!buf)
47434746
return -EINVAL;
47444747

4745-
cmd->cmd_type = ICE_AQC_Q_CFG_TC_CHNG;
4748+
cmd->cmd_type = mode;
47464749
cmd->num_qs = num_qs;
47474750
cmd->port_num_chng = (oldport & ICE_AQC_Q_CFG_SRC_PRT_M);
47484751
cmd->port_num_chng |= FIELD_PREP(ICE_AQC_Q_CFG_DST_PRT_M, newport);
4752+
cmd->port_num_chng |= FIELD_PREP(ICE_AQC_Q_CFG_MODE_M,
4753+
ICE_AQC_Q_CFG_MODE_KEEP_OWN);
47494754
cmd->time_out = FIELD_PREP(ICE_AQC_Q_CFG_TIMEOUT_M, 5);
47504755
cmd->blocked_cgds = 0;
47514756

drivers/net/ethernet/intel/ice/ice_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ ice_ena_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u16 q_handle,
270270
int
271271
ice_aq_cfg_lan_txq(struct ice_hw *hw, struct ice_aqc_cfg_txqs_buf *buf,
272272
u16 buf_size, u16 num_qs, u8 oldport, u8 newport,
273-
struct ice_sq_cd *cd);
273+
u8 mode, struct ice_sq_cd *cd);
274274
int ice_replay_vsi(struct ice_hw *hw, u16 vsi_handle);
275275
void ice_replay_post(struct ice_hw *hw);
276276
struct ice_q_ctx *

0 commit comments

Comments
 (0)