Skip to contentSkip to conversation

ice: block LAN in case of VF to VF offload

PATCH In review Michal Swiatkowski 3 participants 3 messages Apr 27, 2023 – May 3, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 0d08a441fb1a ("ice: ndo_setup_tc implementation for PF")
---
 drivers/net/ethernet/intel/ice/ice_tc_lib.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_tc_lib.c +2 -1
index 76f29a5bf8d7..d1a31f236d26 100644
@@ -693,17 +693,18 @@ ice_eswitch_add_tc_fltr(struct ice_vsi *vsi, struct ice_tc_flower_fltr *fltr)
 	 * results into order of switch rule evaluation.
 	 */
 	rule_info.priority = 7;
+	rule_info.flags_info.act_valid = true;
 
 	if (fltr->direction == ICE_ESWITCH_FLTR_INGRESS) {
 		rule_info.sw_act.flag |= ICE_FLTR_RX;
 		rule_info.sw_act.src = hw->pf_id;
 		rule_info.rx = true;
+		rule_info.flags_info.act = ICE_SINGLE_ACT_LB_ENABLE;
 	} else {
 		rule_info.sw_act.flag |= ICE_FLTR_TX;
 		rule_info.sw_act.src = vsi->idx;
 		rule_info.rx = false;
 		rule_info.flags_info.act = ICE_SINGLE_ACT_LAN_ENABLE;
-		rule_info.flags_info.act_valid = true;
 	}
 
 	/* specify the cookie as filter_rule_id */
Signature · 1 line
2.39.2
Tested-by on v1 1/1
#1 lore raw
Quoted 10 lines

From: Intel-wired-lan <[email protected]> On Behalf Of Michal Swiatkowski
Sent: Thursday, April 27, 2023 10:27 AM
To: [email protected]
Cc: [email protected]; Szycik, Marcin <[email protected]>
Subject: [Intel-wired-lan] [PATCH net v1] 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.

Quoted 7 lines
Fixes 0d08a441fb1a ("ice: ndo_setup_tc implementation for PF")
---
 drivers/net/ethernet/intel/ice/ice_tc_lib.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)