Skip to contentSkip to conversation

net/ice: set flags while adding vsi

PATCH Applied Matthew Smith 3 participants 3 messages Mar 11, 2025 – Mar 13, 2025 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/ice: set flags while adding vsi

While adding a vsi for an ice PF, set the ICE_AQ_VSI_SW_FLAG_LOCAL_LB flag. This will prevent packets from being dropped when using a virtual MAC address with VRRP.

Also set the ICE_AQ_VSI_SW_FLAG_SRC_PRUNE flag to prevent transmitted packets from being looped back in some circumstances.

Fixes f9cf4f864150 ("net/ice: support device initialization")
---
 drivers/net/intel/ice/ice_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/intel/ice/ice_ethdev.c +4 -0
index 3cdfa16f77..21d3795954 100644
@@ -1696,6 +1696,10 @@ ice_setup_vsi(struct ice_pf *pf, enum ice_vsi_type type)
 		 * by ice_init_hw
 		 */
 		vsi_ctx.info.sw_id = hw->port_info->sw_id;
+		vsi_ctx.info.sw_flags = ICE_AQ_VSI_SW_FLAG_LOCAL_LB;
+		vsi_ctx.info.sw_flags |= ICE_AQ_VSI_SW_FLAG_SRC_PRUNE;
+		cfg = ICE_AQ_VSI_PROP_SW_VALID;
+		vsi_ctx.info.valid_sections |= rte_cpu_to_le_16(cfg);
 		vsi_ctx.info.sw_flags2 = ICE_AQ_VSI_SW_FLAG_LAN_ENA;
 		/* Allow all untagged or tagged packets */
 		vsi_ctx.info.inner_vlan_flags = ICE_AQ_VSI_INNER_VLAN_TX_MODE_ALL;
Signature · 1 line
2.34.1
Acked-by on v1 1/1
#1 lore raw
Quoted 29 lines · Matthew Smith

While adding a vsi for an ice PF, set the ICE_AQ_VSI_SW_FLAG_LOCAL_LB flag. This will prevent packets from being dropped when using a virtual MAC address with VRRP.

Also set the ICE_AQ_VSI_SW_FLAG_SRC_PRUNE flag to prevent transmitted packets from being looped back in some circumstances.

Fixes f9cf4f864150 ("net/ice: support device initialization")
---
  drivers/net/intel/ice/ice_ethdev.c | 4 ++++
  1 file changed, 4 insertions(+)
drivers/net/intel/ice/ice_ethdev.c +4 -0
index 3cdfa16f77..21d3795954 100644
@@ -1696,6 +1696,10 @@ ice_setup_vsi(struct ice_pf *pf, enum ice_vsi_type type)
  		 * by ice_init_hw
  		 */
  		vsi_ctx.info.sw_id = hw->port_info->sw_id;
+		vsi_ctx.info.sw_flags = ICE_AQ_VSI_SW_FLAG_LOCAL_LB;
+		vsi_ctx.info.sw_flags |= ICE_AQ_VSI_SW_FLAG_SRC_PRUNE;
+		cfg = ICE_AQ_VSI_PROP_SW_VALID;
+		vsi_ctx.info.valid_sections |= rte_cpu_to_le_16(cfg);
  		vsi_ctx.info.sw_flags2 = ICE_AQ_VSI_SW_FLAG_LAN_ENA;
  		/* Allow all untagged or tagged packets */
  		vsi_ctx.info.inner_vlan_flags = ICE_AQ_VSI_INNER_VLAN_TX_MODE_ALL;
Signature · 2 lines
Regards,
Vladimir
#2 lore raw
Quoted 17 lines · Vladimir
Quoted 14 lines · Matthew Smith

While adding a vsi for an ice PF, set the ICE_AQ_VSI_SW_FLAG_LOCAL_LB flag. This will prevent packets from being dropped when using a virtual MAC address with VRRP.

Also set the ICE_AQ_VSI_SW_FLAG_SRC_PRUNE flag to prevent transmitted packets from being looped back in some circumstances.

Fixes f9cf4f864150 ("net/ice: support device initialization")
---
  drivers/net/intel/ice/ice_ethdev.c | 4 ++++
  1 file changed, 4 insertions(+)

Applied to dpdk-next-net-intel with title "net/ice: fix dropped packets when using VRRP" and put [email protected] on CC, since it's a bug fix.

Thanks,
/Bruce