Message ID | 20231024110929.19423-5-michal.swiatkowski@linux.intel.com (mailing list archive) |
---|---|
State | Awaiting Upstream |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | one by one port representors creation | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Guessing tree name failed - patch did not apply |
> -----Original Message----- > From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of > Michal Swiatkowski > Sent: Tuesday, October 24, 2023 4:39 PM > To: intel-wired-lan@lists.osuosl.org > Cc: Drewek, Wojciech <wojciech.drewek@intel.com>; Szycik, Marcin > <marcin.szycik@intel.com>; netdev@vger.kernel.org; Brandeburg, Jesse > <jesse.brandeburg@intel.com>; Kitszel, Przemyslaw > <przemyslaw.kitszel@intel.com>; Keller, Jacob E <jacob.e.keller@intel.com>; > Michal Swiatkowski <michal.swiatkowski@linux.intel.com>; Raczynski, Piotr > <piotr.raczynski@intel.com> > Subject: [Intel-wired-lan] [PATCH iwl-next v1 04/15] ice: track q_id in > representor > > Previously queue index of control plane VSI used by port representor was > always id of VF. If we want to allow adding port representors for different > devices we have to track queue index in the port representor structure. > > Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> > Reviewed-by: Piotr Raczynski <piotr.raczynski@intel.com> > Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> > Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> > --- > drivers/net/ethernet/intel/ice/ice_eswitch.c | 2 +- > drivers/net/ethernet/intel/ice/ice_repr.c | 1 + > drivers/net/ethernet/intel/ice/ice_repr.h | 1 + > 3 files changed, 3 insertions(+), 1 deletion(-) > Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@intel.com>
diff --git a/drivers/net/ethernet/intel/ice/ice_eswitch.c b/drivers/net/ethernet/intel/ice/ice_eswitch.c index a862681c0f64..119185564450 100644 --- a/drivers/net/ethernet/intel/ice/ice_eswitch.c +++ b/drivers/net/ethernet/intel/ice/ice_eswitch.c @@ -38,7 +38,7 @@ ice_eswitch_add_vf_sp_rule(struct ice_pf *pf, struct ice_vf *vf) rule_info.sw_act.vsi_handle = ctrl_vsi->idx; rule_info.sw_act.fltr_act = ICE_FWD_TO_Q; rule_info.sw_act.fwd_id.q_id = hw->func_caps.common_cap.rxq_first_id + - ctrl_vsi->rxq_map[vf->vf_id]; + ctrl_vsi->rxq_map[vf->repr->q_id]; rule_info.flags_info.act |= ICE_SINGLE_ACT_LB_ENABLE; rule_info.flags_info.act_valid = true; rule_info.tun_type = ICE_SW_TUN_AND_NON_TUN; diff --git a/drivers/net/ethernet/intel/ice/ice_repr.c b/drivers/net/ethernet/intel/ice/ice_repr.c index c686ac0935eb..a2dc216c964f 100644 --- a/drivers/net/ethernet/intel/ice/ice_repr.c +++ b/drivers/net/ethernet/intel/ice/ice_repr.c @@ -306,6 +306,7 @@ static int ice_repr_add(struct ice_vf *vf) repr->src_vsi = vsi; repr->vf = vf; + repr->q_id = vf->vf_id; vf->repr = repr; np = netdev_priv(repr->netdev); np->repr = repr; diff --git a/drivers/net/ethernet/intel/ice/ice_repr.h b/drivers/net/ethernet/intel/ice/ice_repr.h index e1ee2d2c1d2d..f350273b8874 100644 --- a/drivers/net/ethernet/intel/ice/ice_repr.h +++ b/drivers/net/ethernet/intel/ice/ice_repr.h @@ -13,6 +13,7 @@ struct ice_repr { struct net_device *netdev; struct metadata_dst *dst; struct ice_esw_br_port *br_port; + int q_id; #ifdef CONFIG_ICE_SWITCHDEV /* info about slow path rule */ struct ice_rule_query_data sp_rule;