net/ice/base: remove VSI info from previous aggregator
remove the VSI info from previous aggregator after moving the VSI to a new aggregator. Signed-off-by: Victor Raj <victor.raj@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
This commit is contained in:
parent
3e39a7e6d5
commit
9ce0d19986
@ -1670,6 +1670,7 @@ struct ice_aqc_link_topo_addr {
|
|||||||
struct ice_aqc_get_link_topo {
|
struct ice_aqc_get_link_topo {
|
||||||
struct ice_aqc_link_topo_addr addr;
|
struct ice_aqc_link_topo_addr addr;
|
||||||
u8 node_part_num;
|
u8 node_part_num;
|
||||||
|
#define ICE_ACQ_GET_LINK_TOPO_NODE_NR_PCA9575 0x21
|
||||||
u8 rsvd[9];
|
u8 rsvd[9];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2841,8 +2841,8 @@ static enum ice_status
|
|||||||
ice_sched_assoc_vsi_to_agg(struct ice_port_info *pi, u32 agg_id,
|
ice_sched_assoc_vsi_to_agg(struct ice_port_info *pi, u32 agg_id,
|
||||||
u16 vsi_handle, ice_bitmap_t *tc_bitmap)
|
u16 vsi_handle, ice_bitmap_t *tc_bitmap)
|
||||||
{
|
{
|
||||||
struct ice_sched_agg_vsi_info *agg_vsi_info;
|
struct ice_sched_agg_vsi_info *agg_vsi_info, *old_agg_vsi_info = NULL;
|
||||||
struct ice_sched_agg_info *agg_info;
|
struct ice_sched_agg_info *agg_info, *old_agg_info;
|
||||||
enum ice_status status = ICE_SUCCESS;
|
enum ice_status status = ICE_SUCCESS;
|
||||||
struct ice_hw *hw = pi->hw;
|
struct ice_hw *hw = pi->hw;
|
||||||
u8 tc;
|
u8 tc;
|
||||||
@ -2852,6 +2852,20 @@ ice_sched_assoc_vsi_to_agg(struct ice_port_info *pi, u32 agg_id,
|
|||||||
agg_info = ice_get_agg_info(hw, agg_id);
|
agg_info = ice_get_agg_info(hw, agg_id);
|
||||||
if (!agg_info)
|
if (!agg_info)
|
||||||
return ICE_ERR_PARAM;
|
return ICE_ERR_PARAM;
|
||||||
|
/* If the vsi is already part of another aggregator then update
|
||||||
|
* its vsi info list
|
||||||
|
*/
|
||||||
|
old_agg_info = ice_get_vsi_agg_info(hw, vsi_handle);
|
||||||
|
if (old_agg_info && old_agg_info != agg_info) {
|
||||||
|
struct ice_sched_agg_vsi_info *vtmp;
|
||||||
|
|
||||||
|
LIST_FOR_EACH_ENTRY_SAFE(old_agg_vsi_info, vtmp,
|
||||||
|
&old_agg_info->agg_vsi_list,
|
||||||
|
ice_sched_agg_vsi_info, list_entry)
|
||||||
|
if (old_agg_vsi_info->vsi_handle == vsi_handle)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* check if entry already exist */
|
/* check if entry already exist */
|
||||||
agg_vsi_info = ice_get_agg_vsi_info(agg_info, vsi_handle);
|
agg_vsi_info = ice_get_agg_vsi_info(agg_info, vsi_handle);
|
||||||
if (!agg_vsi_info) {
|
if (!agg_vsi_info) {
|
||||||
@ -2876,6 +2890,12 @@ ice_sched_assoc_vsi_to_agg(struct ice_port_info *pi, u32 agg_id,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
ice_set_bit(tc, agg_vsi_info->tc_bitmap);
|
ice_set_bit(tc, agg_vsi_info->tc_bitmap);
|
||||||
|
if (old_agg_vsi_info)
|
||||||
|
ice_clear_bit(tc, old_agg_vsi_info->tc_bitmap);
|
||||||
|
}
|
||||||
|
if (old_agg_vsi_info && !old_agg_vsi_info->tc_bitmap[0]) {
|
||||||
|
LIST_DEL(&old_agg_vsi_info->list_entry);
|
||||||
|
ice_free(pi->hw, old_agg_vsi_info);
|
||||||
}
|
}
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user