Skip to content

Commit 7c37bf9

Browse files
Michal Swiatkowskianguy11
authored andcommitted
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 <[email protected]> Reviewed-by: Piotr Raczynski <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Signed-off-by: Michal Swiatkowski <[email protected]> Tested-by: Sujai Buvaneswaran <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent ff21a4e commit 7c37bf9

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ ice_eswitch_add_vf_sp_rule(struct ice_pf *pf, struct ice_vf *vf)
3838
rule_info.sw_act.vsi_handle = ctrl_vsi->idx;
3939
rule_info.sw_act.fltr_act = ICE_FWD_TO_Q;
4040
rule_info.sw_act.fwd_id.q_id = hw->func_caps.common_cap.rxq_first_id +
41-
ctrl_vsi->rxq_map[vf->vf_id];
41+
ctrl_vsi->rxq_map[vf->repr->q_id];
4242
rule_info.flags_info.act |= ICE_SINGLE_ACT_LB_ENABLE;
4343
rule_info.flags_info.act_valid = true;
4444
rule_info.tun_type = ICE_SW_TUN_AND_NON_TUN;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ static int ice_repr_add(struct ice_vf *vf)
306306

307307
repr->src_vsi = vsi;
308308
repr->vf = vf;
309+
repr->q_id = vf->vf_id;
309310
vf->repr = repr;
310311
np = netdev_priv(repr->netdev);
311312
np->repr = repr;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ struct ice_repr {
1313
struct net_device *netdev;
1414
struct metadata_dst *dst;
1515
struct ice_esw_br_port *br_port;
16+
int q_id;
1617
#ifdef CONFIG_ICE_SWITCHDEV
1718
/* info about slow path rule */
1819
struct ice_rule_query_data sp_rule;

0 commit comments

Comments
 (0)