Skip to content

Commit 9f699b7

Browse files
Michal Swiatkowskidavem330
authored andcommitted
ice: block LAN in case of VF to VF offload
VF to VF traffic shouldn't go outside. To enforce it, set only the loopback enable bit in case of all ingress type rules added via the tc tool. Fixes: 0d08a44 ("ice: ndo_setup_tc implementation for PF") Reported-by: Sujai Buvaneswaran <Sujai.Buvaneswaran@intel.com> Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Tested-by: George Kuruvinakunnel <george.kuruvinakunnel@intel.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Reviewed-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 120a56b commit 9f699b7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -693,17 +693,18 @@ ice_eswitch_add_tc_fltr(struct ice_vsi *vsi, struct ice_tc_flower_fltr *fltr)
693693
* results into order of switch rule evaluation.
694694
*/
695695
rule_info.priority = 7;
696+
rule_info.flags_info.act_valid = true;
696697

697698
if (fltr->direction == ICE_ESWITCH_FLTR_INGRESS) {
698699
rule_info.sw_act.flag |= ICE_FLTR_RX;
699700
rule_info.sw_act.src = hw->pf_id;
700701
rule_info.rx = true;
702+
rule_info.flags_info.act = ICE_SINGLE_ACT_LB_ENABLE;
701703
} else {
702704
rule_info.sw_act.flag |= ICE_FLTR_TX;
703705
rule_info.sw_act.src = vsi->idx;
704706
rule_info.rx = false;
705707
rule_info.flags_info.act = ICE_SINGLE_ACT_LAN_ENABLE;
706-
rule_info.flags_info.act_valid = true;
707708
}
708709

709710
/* specify the cookie as filter_rule_id */

0 commit comments

Comments
 (0)