* [Intel-wired-lan] [PATCH net-next 1/2] ice: remove the VSI info from previous agg
@ 2021-06-14 21:46 Tony Nguyen
2021-06-14 21:46 ` [Intel-wired-lan] [PATCH net-next 2/2] ice: remove unnecessary VSI assignment Tony Nguyen
2021-06-21 22:02 ` [Intel-wired-lan] [PATCH net-next 1/2] ice: remove the VSI info from previous agg Brelinski, TonyX
0 siblings, 2 replies; 4+ messages in thread
From: Tony Nguyen @ 2021-06-14 21:46 UTC (permalink / raw)
To: intel-wired-lan
From: Victor Raj <victor.raj@intel.com>
Remove the VSI info from previous aggregator after moving the VSI to a
new aggregator.
Signed-off-by: Victor Raj <victor.raj@intel.com>
---
drivers/net/ethernet/intel/ice/ice_sched.c | 24 ++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_sched.c b/drivers/net/ethernet/intel/ice/ice_sched.c
index a17e24e54cf3..9f07b6641705 100644
--- a/drivers/net/ethernet/intel/ice/ice_sched.c
+++ b/drivers/net/ethernet/intel/ice/ice_sched.c
@@ -2745,8 +2745,8 @@ static enum ice_status
ice_sched_assoc_vsi_to_agg(struct ice_port_info *pi, u32 agg_id,
u16 vsi_handle, unsigned long *tc_bitmap)
{
- struct ice_sched_agg_vsi_info *agg_vsi_info;
- struct ice_sched_agg_info *agg_info;
+ struct ice_sched_agg_vsi_info *agg_vsi_info, *old_agg_vsi_info = NULL;
+ struct ice_sched_agg_info *agg_info, *old_agg_info;
enum ice_status status = 0;
struct ice_hw *hw = pi->hw;
u8 tc;
@@ -2756,6 +2756,20 @@ ice_sched_assoc_vsi_to_agg(struct ice_port_info *pi, u32 agg_id,
agg_info = ice_get_agg_info(hw, agg_id);
if (!agg_info)
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,
+ list_entry)
+ if (old_agg_vsi_info->vsi_handle == vsi_handle)
+ break;
+ }
+
/* check if entry already exist */
agg_vsi_info = ice_get_agg_vsi_info(agg_info, vsi_handle);
if (!agg_vsi_info) {
@@ -2780,6 +2794,12 @@ ice_sched_assoc_vsi_to_agg(struct ice_port_info *pi, u32 agg_id,
break;
set_bit(tc, agg_vsi_info->tc_bitmap);
+ if (old_agg_vsi_info)
+ 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);
+ devm_kfree(ice_hw_to_dev(pi->hw), old_agg_vsi_info);
}
return status;
}
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Intel-wired-lan] [PATCH net-next 2/2] ice: remove unnecessary VSI assignment
2021-06-14 21:46 [Intel-wired-lan] [PATCH net-next 1/2] ice: remove the VSI info from previous agg Tony Nguyen
@ 2021-06-14 21:46 ` Tony Nguyen
2021-06-21 22:05 ` Brelinski, TonyX
2021-06-21 22:02 ` [Intel-wired-lan] [PATCH net-next 1/2] ice: remove the VSI info from previous agg Brelinski, TonyX
1 sibling, 1 reply; 4+ messages in thread
From: Tony Nguyen @ 2021-06-14 21:46 UTC (permalink / raw)
To: intel-wired-lan
ice_get_vf_vsi() is being called twice for the same VSI. Remove the
unnecessary call/assignment.
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
index ccf5d117e008..699e0a842b85 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
@@ -1665,7 +1665,6 @@ bool ice_reset_vf(struct ice_vf *vf, bool is_vflr)
else
promisc_m = ICE_UCAST_PROMISC_BITS;
- vsi = ice_get_vf_vsi(vf);
if (ice_vf_clear_vsi_promisc(vf, vsi, promisc_m))
dev_err(dev, "disabling promiscuous mode failed\n");
}
--
2.20.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Intel-wired-lan] [PATCH net-next 1/2] ice: remove the VSI info from previous agg
2021-06-14 21:46 [Intel-wired-lan] [PATCH net-next 1/2] ice: remove the VSI info from previous agg Tony Nguyen
2021-06-14 21:46 ` [Intel-wired-lan] [PATCH net-next 2/2] ice: remove unnecessary VSI assignment Tony Nguyen
@ 2021-06-21 22:02 ` Brelinski, TonyX
1 sibling, 0 replies; 4+ messages in thread
From: Brelinski, TonyX @ 2021-06-21 22:02 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Tony Nguyen
> Sent: Monday, June 14, 2021 2:46 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH net-next 1/2] ice: remove the VSI info from
> previous agg
>
> From: Victor Raj <victor.raj@intel.com>
>
> Remove the VSI info from previous aggregator after moving the VSI to a new
> aggregator.
>
> Signed-off-by: Victor Raj <victor.raj@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_sched.c | 24 ++++++++++++++++++++--
> 1 file changed, 22 insertions(+), 2 deletions(-)
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com> (A Contingent Worker at Intel)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Intel-wired-lan] [PATCH net-next 2/2] ice: remove unnecessary VSI assignment
2021-06-14 21:46 ` [Intel-wired-lan] [PATCH net-next 2/2] ice: remove unnecessary VSI assignment Tony Nguyen
@ 2021-06-21 22:05 ` Brelinski, TonyX
0 siblings, 0 replies; 4+ messages in thread
From: Brelinski, TonyX @ 2021-06-21 22:05 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of
> Tony Nguyen
> Sent: Monday, June 14, 2021 2:46 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH net-next 2/2] ice: remove unnecessary VSI
> assignment
>
> ice_get_vf_vsi() is being called twice for the same VSI. Remove the
> unnecessary call/assignment.
>
> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 1 -
> 1 file changed, 1 deletion(-)
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com> (A Contingent Worker at Intel)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-21 22:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-14 21:46 [Intel-wired-lan] [PATCH net-next 1/2] ice: remove the VSI info from previous agg Tony Nguyen
2021-06-14 21:46 ` [Intel-wired-lan] [PATCH net-next 2/2] ice: remove unnecessary VSI assignment Tony Nguyen
2021-06-21 22:05 ` Brelinski, TonyX
2021-06-21 22:02 ` [Intel-wired-lan] [PATCH net-next 1/2] ice: remove the VSI info from previous agg Brelinski, TonyX
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.