Checks
Context | Check | Description |
---|---|---|
ci/Intel-compilation | success | Compilation OK |
ci/checkpatch | success | coding style OK |
Commit Message
Qi Zhang
June 9, 2020, 11:59 a.m. UTC
Needs to update the VSI handle to the last remaining VSI using the rule for ICE_FWD_TO_VSI. Otherwise it may have error for deleting the rule. Signed-off-by: Haiyue Wang <haiyue.wang@intel.com> Signed-off-by: Paul M. Stillwell Jr <paul.m.stillwell.jr@intel.com> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> --- drivers/net/ice/base/ice_switch.c | 1 + 1 file changed, 1 insertion(+)
Comments
On 6/9/2020 12:59 PM, Qi Zhang wrote: > Needs to update the VSI handle to the last remaining VSI using the > rule for ICE_FWD_TO_VSI. Otherwise it may have error for deleting the > rule. The reason of the patch is not clear, it looks to "prevent an error for deleting the rule", but can you please give more detail? Why it cause the error, what rule are we talking about, when this happens, what happens if it gives error, why setting to the last remaining VSI helps? Thanks > > Signed-off-by: Haiyue Wang <haiyue.wang@intel.com> > Signed-off-by: Paul M. Stillwell Jr <paul.m.stillwell.jr@intel.com> > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> > --- > drivers/net/ice/base/ice_switch.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c > index f379a5f5d..01dcace55 100644 > --- a/drivers/net/ice/base/ice_switch.c > +++ b/drivers/net/ice/base/ice_switch.c > @@ -7491,6 +7491,7 @@ ice_adv_rem_update_vsi_list(struct ice_hw *hw, u16 vsi_handle, > ice_get_hw_vsi_num(hw, rem_vsi_handle); > fm_list->rule_info.sw_act.fwd_id.hw_vsi_id = > ice_get_hw_vsi_num(hw, rem_vsi_handle); > + fm_list->rule_info.sw_act.vsi_handle = rem_vsi_handle; > > /* Update the previous switch rule of "MAC forward to VSI" to > * "MAC fwd to VSI list" >
> -----Original Message----- > From: Yigit, Ferruh <ferruh.yigit@intel.com> > Sent: Friday, June 12, 2020 02:41 > To: Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, Qiming <qiming.yang@intel.com> > Cc: Ye, Xiaolong <xiaolong.ye@intel.com>; dev@dpdk.org; Wang, Haiyue <haiyue.wang@intel.com>; > Stillwell Jr, Paul M <paul.m.stillwell.jr@intel.com> > Subject: Re: [dpdk-dev] [PATCH v2 34/52] net/ice/base: update the vsi handle to remaining VSI > > On 6/9/2020 12:59 PM, Qi Zhang wrote: > > Needs to update the VSI handle to the last remaining VSI using the > > rule for ICE_FWD_TO_VSI. Otherwise it may have error for deleting the > > rule. > > The reason of the patch is not clear, it looks to "prevent an error for deleting > the rule", but can you please give more detail? > Why it cause the error, what rule are we talking about, when this happens, what > happens if it gives error, why setting to the last remaining VSI helps? > Thing should be simple, it needs to update the VSI handle which is active, the original code just used the first VSI handle always. If this VSI is removed, and left another latter added VSI, it should use the latter added VSI handle which means 'the remaining'. And the 'remaining' is the word in the VSI code context, so use it here to means 'the active'. > Thanks > > > > > Signed-off-by: Haiyue Wang <haiyue.wang@intel.com> > > Signed-off-by: Paul M. Stillwell Jr <paul.m.stillwell.jr@intel.com> > > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> > > --- > > drivers/net/ice/base/ice_switch.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c > > index f379a5f5d..01dcace55 100644 > > --- a/drivers/net/ice/base/ice_switch.c > > +++ b/drivers/net/ice/base/ice_switch.c > > @@ -7491,6 +7491,7 @@ ice_adv_rem_update_vsi_list(struct ice_hw *hw, u16 vsi_handle, > > ice_get_hw_vsi_num(hw, rem_vsi_handle); > > fm_list->rule_info.sw_act.fwd_id.hw_vsi_id = > > ice_get_hw_vsi_num(hw, rem_vsi_handle); > > + fm_list->rule_info.sw_act.vsi_handle = rem_vsi_handle; > > > > /* Update the previous switch rule of "MAC forward to VSI" to > > * "MAC fwd to VSI list" > >
diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index f379a5f5d..01dcace55 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -7491,6 +7491,7 @@ ice_adv_rem_update_vsi_list(struct ice_hw *hw, u16 vsi_handle, ice_get_hw_vsi_num(hw, rem_vsi_handle); fm_list->rule_info.sw_act.fwd_id.hw_vsi_id = ice_get_hw_vsi_num(hw, rem_vsi_handle); + fm_list->rule_info.sw_act.vsi_handle = rem_vsi_handle; /* Update the previous switch rule of "MAC forward to VSI" to * "MAC fwd to VSI list"