* [Intel-wired-lan] [PATCH iwl-next v2 0/8] ice: in VEB, prevent "cross-vlan" traffic
@ 2025-11-25 8:34 Jakub Slepecki
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 1/8] ice: in dvm, use outer VLAN in MAC, VLAN lookup Jakub Slepecki
` (7 more replies)
0 siblings, 8 replies; 18+ messages in thread
From: Jakub Slepecki @ 2025-11-25 8:34 UTC (permalink / raw)
To: intel-wired-lan
Cc: linux-kernel, netdev, przemyslaw.kitszel, anthony.l.nguyen,
michal.swiatkowski, jakub.slepecki, aleksandr.loktionov
Currently, packets that match MAC address of a VF will be sent to loopback
even if they would cross VLAN boundaries. Effectively, this drops them.
In this patch series, we aim to address this behaviour by adding MAC,VLAN
to complement what MAC-only filters do to select packets for loopback.
To reproduce the issue have E810 connected to another adapter, then:
ip l set $pfa vf 0 vlan 4
ip l set $pfa vf 1 vlan 7
ip l set $pfb vf 0 trust on spoof off vlan 4
ip l set $pfb vf 1 trust on spoof off vlan 7
ip l set $vfa0 netns $netns0 up
ip l set $vfa1 netns $netns1 up
ip netns exec $netns0 ip a add 10.0.0.1/24 dev $vfa0
ip netns exec $netns1 ip a add 10.0.0.2/24 dev $vfa1
ip l add $br type bridge
ip l set $vfb0 master $br up
ip l set $vfb1 master $br up
ip l set $br up
Where $pfa is the E810 and $pfb is its link partner. Send the packets
between $vfa0 and $vfa1. We expect to see ICMP packets at the $br.
Instead, ARP is unable to resolve the 10.0.0.1 because the reply is
stuck in the internal switch.
Changes in v2:
- Use FIELD_GET et al. when handling fi.lb_en and fi.lan_en.
- Rename /LB_LAN/ s/_MASK/_M/ because one of uses would need to break
line.
- Close open parenthesis in ice_vsi_update_bridge_mode() description.
- Explain returns in ice_vsi_update_bridge_mode().
v1: https://lore.kernel.org/intel-wired-lan/20251120162813.37942-1-jakub.slepecki@intel.com/T/
Jakub Slepecki (7):
ice: in dvm, use outer VLAN in MAC,VLAN lookup
ice: allow creating mac,vlan filters along mac filters
ice: do not check for zero mac when creating mac filters
ice: allow overriding lan_en, lb_en in switch
ice: update mac,vlan rules when toggling between VEB and VEPA
ice: add functions to query for vsi's pvids
ice: in VEB, prevent "cross-vlan" traffic from hitting loopback
Michal Swiatkowski (1):
ice: add mac vlan to filter API
drivers/net/ethernet/intel/ice/ice_fltr.c | 104 +++++++++++++++++-
drivers/net/ethernet/intel/ice/ice_fltr.h | 10 +-
drivers/net/ethernet/intel/ice/ice_lib.c | 56 ++++++++++
drivers/net/ethernet/intel/ice/ice_lib.h | 2 +
drivers/net/ethernet/intel/ice/ice_main.c | 56 +++++++---
drivers/net/ethernet/intel/ice/ice_switch.c | 79 +++++++++----
drivers/net/ethernet/intel/ice/ice_switch.h | 13 ++-
drivers/net/ethernet/intel/ice/ice_vf_lib.c | 8 +-
.../net/ethernet/intel/ice/ice_vlan_mode.c | 12 ++
9 files changed, 295 insertions(+), 45 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH iwl-next v2 1/8] ice: in dvm, use outer VLAN in MAC, VLAN lookup
2025-11-25 8:34 [Intel-wired-lan] [PATCH iwl-next v2 0/8] ice: in VEB, prevent "cross-vlan" traffic Jakub Slepecki
@ 2025-11-25 8:34 ` Jakub Slepecki
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 2/8] ice: allow creating mac, vlan filters along mac filters Jakub Slepecki
` (6 subsequent siblings)
7 siblings, 0 replies; 18+ messages in thread
From: Jakub Slepecki @ 2025-11-25 8:34 UTC (permalink / raw)
To: intel-wired-lan
Cc: linux-kernel, netdev, przemyslaw.kitszel, anthony.l.nguyen,
michal.swiatkowski, jakub.slepecki, aleksandr.loktionov
In double VLAN mode (DVM), outer VLAN is located a word earlier in
the field vector compared to the single VLAN mode. We already modify
ICE_SW_LKUP_VLAN to use it but ICE_SW_LKUP_MAC_VLAN was left untouched,
causing the lookup to match any packet with one or no layer of Dot1q.
This change enables to fix cross-vlan loopback traffic using MAC,VLAN
lookups.
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Signed-off-by: Jakub Slepecki <jakub.slepecki@intel.com>
---
No changes in v2.
---
drivers/net/ethernet/intel/ice/ice_vlan_mode.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/net/ethernet/intel/ice/ice_vlan_mode.c b/drivers/net/ethernet/intel/ice/ice_vlan_mode.c
index fb526cb84776..68a7b05de44e 100644
--- a/drivers/net/ethernet/intel/ice/ice_vlan_mode.c
+++ b/drivers/net/ethernet/intel/ice/ice_vlan_mode.c
@@ -198,6 +198,7 @@ static bool ice_is_dvm_supported(struct ice_hw *hw)
#define ICE_SW_LKUP_VLAN_LOC_LKUP_IDX 1
#define ICE_SW_LKUP_VLAN_PKT_FLAGS_LKUP_IDX 2
#define ICE_SW_LKUP_PROMISC_VLAN_LOC_LKUP_IDX 2
+#define ICE_SW_LKUP_MAC_VLAN_LOC_LKUP_IDX 4
#define ICE_PKT_FLAGS_0_TO_15_FV_IDX 1
static struct ice_update_recipe_lkup_idx_params ice_dvm_dflt_recipes[] = {
{
@@ -234,6 +235,17 @@ static struct ice_update_recipe_lkup_idx_params ice_dvm_dflt_recipes[] = {
.mask_valid = false, /* use pre-existing mask */
.lkup_idx = ICE_SW_LKUP_PROMISC_VLAN_LOC_LKUP_IDX,
},
+ {
+ /* Similarly to ICE_SW_LKUP_VLAN, change to outer/single VLAN in
+ * DVM
+ */
+ .rid = ICE_SW_LKUP_MAC_VLAN,
+ .fv_idx = ICE_EXTERNAL_VLAN_ID_FV_IDX,
+ .ignore_valid = true,
+ .mask = 0,
+ .mask_valid = false,
+ .lkup_idx = ICE_SW_LKUP_MAC_VLAN_LOC_LKUP_IDX,
+ },
};
/**
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH iwl-next v2 2/8] ice: allow creating mac, vlan filters along mac filters
2025-11-25 8:34 [Intel-wired-lan] [PATCH iwl-next v2 0/8] ice: in VEB, prevent "cross-vlan" traffic Jakub Slepecki
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 1/8] ice: in dvm, use outer VLAN in MAC, VLAN lookup Jakub Slepecki
@ 2025-11-25 8:34 ` Jakub Slepecki
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 3/8] ice: do not check for zero mac when creating " Jakub Slepecki
` (5 subsequent siblings)
7 siblings, 0 replies; 18+ messages in thread
From: Jakub Slepecki @ 2025-11-25 8:34 UTC (permalink / raw)
To: intel-wired-lan
Cc: linux-kernel, netdev, przemyslaw.kitszel, anthony.l.nguyen,
michal.swiatkowski, jakub.slepecki, aleksandr.loktionov
Among other uses, MAC filters are currently used to forward loopback
traffic between VSIs. However, they only match destination MAC addresses
making them prone to mistakes when handling traffic within multiple
VLANs and especially across the boundaries.
This patch allows the driver to create MAC,VLAN filters in the same
flow as MAC-only filters completely interchangeably. This is intended
to be used to forward the loopback traffic only within the boundaries
of particular VLANs.
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Jakub Slepecki <jakub.slepecki@intel.com>
---
No changes in v2.
---
drivers/net/ethernet/intel/ice/ice_switch.c | 48 ++++++++++++++++-----
1 file changed, 38 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c
index 84848f0123e7..0275e2910c6b 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.c
+++ b/drivers/net/ethernet/intel/ice/ice_switch.c
@@ -3606,6 +3606,29 @@ bool ice_vlan_fltr_exist(struct ice_hw *hw, u16 vlan_id, u16 vsi_handle)
return false;
}
+/**
+ * ice_fltr_mac_address - Find MAC in filter
+ * @dst: output MAC address
+ * @info: information struct for the filter in question
+ *
+ * Return: 0 for success, %-ENXIO if no address was found in the filter
+ * information.
+ */
+static
+int ice_fltr_mac_address(u8 *dst, struct ice_fltr_info *info)
+{
+ switch (info->lkup_type) {
+ case ICE_SW_LKUP_MAC:
+ ether_addr_copy(dst, info->l_data.mac.mac_addr);
+ return 0;
+ case ICE_SW_LKUP_MAC_VLAN:
+ ether_addr_copy(dst, info->l_data.mac_vlan.mac_addr);
+ return 0;
+ default:
+ return -ENXIO;
+ }
+}
+
/**
* ice_add_mac - Add a MAC address based filter rule
* @hw: pointer to the hardware structure
@@ -3614,16 +3637,19 @@ bool ice_vlan_fltr_exist(struct ice_hw *hw, u16 vlan_id, u16 vsi_handle)
int ice_add_mac(struct ice_hw *hw, struct list_head *m_list)
{
struct ice_fltr_list_entry *m_list_itr;
- int status = 0;
+ int err;
if (!m_list || !hw)
return -EINVAL;
list_for_each_entry(m_list_itr, m_list, list_entry) {
- u8 *add = &m_list_itr->fltr_info.l_data.mac.mac_addr[0];
+ u8 addr[ETH_ALEN];
u16 vsi_handle;
u16 hw_vsi_id;
+ err = ice_fltr_mac_address(addr, &m_list_itr->fltr_info);
+ if (err || is_zero_ether_addr(addr))
+ return -EINVAL;
m_list_itr->fltr_info.flag = ICE_FLTR_TX;
vsi_handle = m_list_itr->fltr_info.vsi_handle;
if (!ice_is_vsi_valid(hw, vsi_handle))
@@ -3634,17 +3660,19 @@ int ice_add_mac(struct ice_hw *hw, struct list_head *m_list)
if (m_list_itr->fltr_info.src_id != ICE_SRC_ID_VSI)
return -EINVAL;
m_list_itr->fltr_info.src = hw_vsi_id;
- if (m_list_itr->fltr_info.lkup_type != ICE_SW_LKUP_MAC ||
- is_zero_ether_addr(add))
+ if (m_list_itr->fltr_info.lkup_type != ICE_SW_LKUP_MAC &&
+ m_list_itr->fltr_info.lkup_type != ICE_SW_LKUP_MAC_VLAN)
return -EINVAL;
- m_list_itr->status = ice_add_rule_internal(hw, ICE_SW_LKUP_MAC,
- m_list_itr);
+ m_list_itr->status =
+ ice_add_rule_internal(hw,
+ m_list_itr->fltr_info.lkup_type,
+ m_list_itr);
if (m_list_itr->status)
return m_list_itr->status;
}
- return status;
+ return 0;
}
/**
@@ -4055,7 +4083,7 @@ int ice_remove_mac(struct ice_hw *hw, struct list_head *m_list)
enum ice_sw_lkup_type l_type = list_itr->fltr_info.lkup_type;
u16 vsi_handle;
- if (l_type != ICE_SW_LKUP_MAC)
+ if (l_type != ICE_SW_LKUP_MAC && l_type != ICE_SW_LKUP_MAC_VLAN)
return -EINVAL;
vsi_handle = list_itr->fltr_info.vsi_handle;
@@ -4066,7 +4094,7 @@ int ice_remove_mac(struct ice_hw *hw, struct list_head *m_list)
ice_get_hw_vsi_num(hw, vsi_handle);
list_itr->status = ice_remove_rule_internal(hw,
- ICE_SW_LKUP_MAC,
+ l_type,
list_itr);
if (list_itr->status)
return list_itr->status;
@@ -4507,6 +4535,7 @@ ice_remove_vsi_lkup_fltr(struct ice_hw *hw, u16 vsi_handle,
switch (lkup) {
case ICE_SW_LKUP_MAC:
+ case ICE_SW_LKUP_MAC_VLAN:
ice_remove_mac(hw, &remove_list_head);
break;
case ICE_SW_LKUP_VLAN:
@@ -4516,7 +4545,6 @@ ice_remove_vsi_lkup_fltr(struct ice_hw *hw, u16 vsi_handle,
case ICE_SW_LKUP_PROMISC_VLAN:
ice_remove_promisc(hw, lkup, &remove_list_head);
break;
- case ICE_SW_LKUP_MAC_VLAN:
case ICE_SW_LKUP_ETHERTYPE:
case ICE_SW_LKUP_ETHERTYPE_MAC:
case ICE_SW_LKUP_DFLT:
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH iwl-next v2 3/8] ice: do not check for zero mac when creating mac filters
2025-11-25 8:34 [Intel-wired-lan] [PATCH iwl-next v2 0/8] ice: in VEB, prevent "cross-vlan" traffic Jakub Slepecki
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 1/8] ice: in dvm, use outer VLAN in MAC, VLAN lookup Jakub Slepecki
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 2/8] ice: allow creating mac, vlan filters along mac filters Jakub Slepecki
@ 2025-11-25 8:34 ` Jakub Slepecki
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 4/8] ice: allow overriding lan_en, lb_en in switch Jakub Slepecki
` (4 subsequent siblings)
7 siblings, 0 replies; 18+ messages in thread
From: Jakub Slepecki @ 2025-11-25 8:34 UTC (permalink / raw)
To: intel-wired-lan
Cc: linux-kernel, netdev, przemyslaw.kitszel, anthony.l.nguyen,
michal.swiatkowski, jakub.slepecki, aleksandr.loktionov
A zero MAC address was considered a special case while creating a new
MAC filter. There is no particular reason for that other than the fact
that the union containing it was assumed to be zeroed out. Now, address
is pulled out of the union by ice_fltr_mac_address which checks all of
the previously assumed zero-address cases and returns an error if they
are hit.
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Signed-off-by: Jakub Slepecki <jakub.slepecki@intel.com>
---
No changes in v2.
---
drivers/net/ethernet/intel/ice/ice_switch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c
index 0275e2910c6b..04e5d653efce 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.c
+++ b/drivers/net/ethernet/intel/ice/ice_switch.c
@@ -3648,7 +3648,7 @@ int ice_add_mac(struct ice_hw *hw, struct list_head *m_list)
u16 hw_vsi_id;
err = ice_fltr_mac_address(addr, &m_list_itr->fltr_info);
- if (err || is_zero_ether_addr(addr))
+ if (err)
return -EINVAL;
m_list_itr->fltr_info.flag = ICE_FLTR_TX;
vsi_handle = m_list_itr->fltr_info.vsi_handle;
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH iwl-next v2 4/8] ice: allow overriding lan_en, lb_en in switch
2025-11-25 8:34 [Intel-wired-lan] [PATCH iwl-next v2 0/8] ice: in VEB, prevent "cross-vlan" traffic Jakub Slepecki
` (2 preceding siblings ...)
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 3/8] ice: do not check for zero mac when creating " Jakub Slepecki
@ 2025-11-25 8:34 ` Jakub Slepecki
2025-11-25 8:59 ` Loktionov, Aleksandr
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 5/8] ice: update mac, vlan rules when toggling between VEB and VEPA Jakub Slepecki
` (3 subsequent siblings)
7 siblings, 1 reply; 18+ messages in thread
From: Jakub Slepecki @ 2025-11-25 8:34 UTC (permalink / raw)
To: intel-wired-lan
Cc: linux-kernel, netdev, przemyslaw.kitszel, anthony.l.nguyen,
michal.swiatkowski, jakub.slepecki, aleksandr.loktionov
Currently, lan_en and lb_en are determined based on switching mode,
destination MAC, and the lookup type, action type and flags of the rule
in question. This gives little to no options for the user (such as
ice_fltr.c) to enforce rules to behave in a specific way.
Such functionality is needed to work with pairs of rules, for example,
when handling MAC forward to LAN together with MAC,VLAN forward to
loopback rules pair. This case could not be easily deduced in a context
of a single filter without adding a specialized flag.
Instead of adding a specialized flag to mark special scenario rules,
we add a slightly more generic flag to the lan_en and lb_en themselves
for the ice_fltr.c to request specific destination flags later on, for
example, to override value:
struct ice_fltr_info fi;
fi.lb_en = ICE_FLTR_INFO_LB_LAN_FORCE_ENABLED;
fi.lan_en = ICE_FLTR_INFO_LB_LAN_FORCE_DISABLED;
Signed-off-by: Jakub Slepecki <jakub.slepecki@intel.com>
---
Dropping reviewed-by from Michał due to changes.
Changes in v2:
- Use FIELD_GET et al. when handling fi.lb_en and fi.lan_en.
- Rename /LB_LAN/s/_MASK/_M/ because one of uses would need to break
line.
---
drivers/net/ethernet/intel/ice/ice_switch.c | 21 +++++++++++++--------
drivers/net/ethernet/intel/ice/ice_switch.h | 8 ++++++++
2 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c
index 04e5d653efce..b3f5cda1571e 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.c
+++ b/drivers/net/ethernet/intel/ice/ice_switch.c
@@ -2538,8 +2538,9 @@ int ice_get_initial_sw_cfg(struct ice_hw *hw)
*/
static void ice_fill_sw_info(struct ice_hw *hw, struct ice_fltr_info *fi)
{
- fi->lb_en = false;
- fi->lan_en = false;
+ bool lan_en = false;
+ bool lb_en = false;
+
if ((fi->flag & ICE_FLTR_TX) &&
(fi->fltr_act == ICE_FWD_TO_VSI ||
fi->fltr_act == ICE_FWD_TO_VSI_LIST ||
@@ -2549,7 +2550,7 @@ static void ice_fill_sw_info(struct ice_hw *hw, struct ice_fltr_info *fi)
* packets to the internal switch that will be dropped.
*/
if (fi->lkup_type != ICE_SW_LKUP_VLAN)
- fi->lb_en = true;
+ lb_en = true;
/* Set lan_en to TRUE if
* 1. The switch is a VEB AND
@@ -2578,14 +2579,18 @@ static void ice_fill_sw_info(struct ice_hw *hw, struct ice_fltr_info *fi)
!is_unicast_ether_addr(fi->l_data.mac.mac_addr)) ||
(fi->lkup_type == ICE_SW_LKUP_MAC_VLAN &&
!is_unicast_ether_addr(fi->l_data.mac.mac_addr)))
- fi->lan_en = true;
+ lan_en = true;
} else {
- fi->lan_en = true;
+ lan_en = true;
}
}
if (fi->flag & ICE_FLTR_TX_ONLY)
- fi->lan_en = false;
+ lan_en = false;
+ if (!FIELD_GET(ICE_FLTR_INFO_LB_LAN_FORCE_M, fi->lb_en))
+ FIELD_MODIFY(ICE_FLTR_INFO_LB_LAN_VALUE_M, &fi->lb_en, lb_en);
+ if (!FIELD_GET(ICE_FLTR_INFO_LB_LAN_FORCE_M, fi->lan_en))
+ FIELD_MODIFY(ICE_FLTR_INFO_LB_LAN_VALUE_M, &fi->lan_en, lan_en);
}
/**
@@ -2669,9 +2674,9 @@ ice_fill_sw_rule(struct ice_hw *hw, struct ice_fltr_info *f_info,
return;
}
- if (f_info->lb_en)
+ if (FIELD_GET(ICE_FLTR_INFO_LB_LAN_VALUE_M, f_info->lb_en))
act |= ICE_SINGLE_ACT_LB_ENABLE;
- if (f_info->lan_en)
+ if (FIELD_GET(ICE_FLTR_INFO_LB_LAN_VALUE_M, f_info->lan_en))
act |= ICE_SINGLE_ACT_LAN_ENABLE;
switch (f_info->lkup_type) {
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.h b/drivers/net/ethernet/intel/ice/ice_switch.h
index 671d7a5f359f..b694c131ad58 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.h
+++ b/drivers/net/ethernet/intel/ice/ice_switch.h
@@ -72,6 +72,14 @@ enum ice_src_id {
ICE_SRC_ID_LPORT,
};
+#define ICE_FLTR_INFO_LB_LAN_VALUE_M BIT(0)
+#define ICE_FLTR_INFO_LB_LAN_FORCE_M BIT(1)
+#define ICE_FLTR_INFO_LB_LAN_FORCE_ENABLED \
+ (FIELD_PREP_CONST(ICE_FLTR_INFO_LB_LAN_VALUE_M, true) | \
+ FIELD_PREP_CONST(ICE_FLTR_INFO_LB_LAN_FORCE_M, true))
+#define ICE_FLTR_INFO_LB_LAN_FORCE_DISABLED \
+ (FIELD_PREP_CONST(ICE_FLTR_INFO_LB_LAN_FORCE_M, true))
+
struct ice_fltr_info {
/* Look up information: how to look up packet */
enum ice_sw_lkup_type lkup_type;
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH iwl-next v2 5/8] ice: update mac, vlan rules when toggling between VEB and VEPA
2025-11-25 8:34 [Intel-wired-lan] [PATCH iwl-next v2 0/8] ice: in VEB, prevent "cross-vlan" traffic Jakub Slepecki
` (3 preceding siblings ...)
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 4/8] ice: allow overriding lan_en, lb_en in switch Jakub Slepecki
@ 2025-11-25 8:34 ` Jakub Slepecki
2025-11-25 8:52 ` Loktionov, Aleksandr
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 6/8] ice: add functions to query for vsi's pvids Jakub Slepecki
` (2 subsequent siblings)
7 siblings, 1 reply; 18+ messages in thread
From: Jakub Slepecki @ 2025-11-25 8:34 UTC (permalink / raw)
To: intel-wired-lan
Cc: linux-kernel, netdev, przemyslaw.kitszel, anthony.l.nguyen,
michal.swiatkowski, jakub.slepecki, aleksandr.loktionov
When changing into VEPA mode MAC rules are modified to forward all traffic
to the wire instead of allowing some packets to go into the loopback.
MAC,VLAN rules may and will also be used to forward loopback traffic
in VEB, so when we switch to VEPA, we want them to behave similarly to
MAC-only rules.
ice_vsi_update_bridge_mode() will now attempt a rollback of switch
filters in case an update fails. If the rollback also fails, we will
now return the rollback error instead of the initial error.
Signed-off-by: Jakub Slepecki <jakub.slepecki@intel.com>
---
Testing hints:
MAC,VLAN rules are created only if entire series is applied.
The easiest way to test that rules were adjusted is to run traffic
and observe what packets are sent to LAN. VEPA is expected to behave
same as before the series. VEB is expected to (a) behave like VEPA
if loopback traffic would cross VLANs, or (b) behave as before.
Traffic from/to external hosts is expected to remain unchanged.
Dropping reviewed-by Michał due to changes.
Changes in v2:
- Close open parenthesis in ice_vsi_update_bridge_mode() description.
- Explain returns in ice_vsi_update_bridge_mode().
---
drivers/net/ethernet/intel/ice/ice_main.c | 48 +++++++++++++++++----
drivers/net/ethernet/intel/ice/ice_switch.c | 8 ++--
drivers/net/ethernet/intel/ice/ice_switch.h | 3 +-
3 files changed, 46 insertions(+), 13 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 0b6175ade40d..921ed2b6c0aa 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -8104,8 +8104,16 @@ static int ice_vsi_update_bridge_mode(struct ice_vsi *vsi, u16 bmode)
*
* Sets the bridge mode (VEB/VEPA) of the switch to which the netdev (VSI) is
* hooked up to. Iterates through the PF VSI list and sets the loopback mode (if
- * not already set for all VSIs connected to this switch. And also update the
+ * not already set for all VSIs connected to this switch). And also update the
* unicast switch filter rules for the corresponding switch of the netdev.
+ *
+ * Return:
+ * * %0 if mode was set, propagated to VSIs, and changes to filters were all
+ * successful,
+ * * %-EINVAL if requested netlink attributes or bridge mode were invalid,
+ * * otherwise an error from VSI update, filter rollback, or filter update is
+ * forwarded. This may include %-EINVAL. See ice_vsi_update_bridge_mode() and
+ * ice_update_sw_rule_bridge_mode().
*/
static int
ice_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh,
@@ -8115,8 +8123,8 @@ ice_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh,
struct ice_pf *pf = ice_netdev_to_pf(dev);
struct nlattr *attr, *br_spec;
struct ice_hw *hw = &pf->hw;
+ int rem, v, rb_err, err = 0;
struct ice_sw *pf_sw;
- int rem, v, err = 0;
pf_sw = pf->first_sw;
/* find the attribute in the netlink message */
@@ -8126,6 +8134,7 @@ ice_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh,
nla_for_each_nested_type(attr, IFLA_BRIDGE_MODE, br_spec, rem) {
__u16 mode = nla_get_u16(attr);
+ u8 old_evb_veb = hw->evb_veb;
if (mode != BRIDGE_MODE_VEPA && mode != BRIDGE_MODE_VEB)
return -EINVAL;
@@ -8147,17 +8156,38 @@ ice_bridge_setlink(struct net_device *dev, struct nlmsghdr *nlh,
/* Update the unicast switch filter rules for the corresponding
* switch of the netdev
*/
- err = ice_update_sw_rule_bridge_mode(hw);
+ err = ice_update_sw_rule_bridge_mode(hw, ICE_SW_LKUP_MAC);
+ if (err) {
+ /* evb_veb is expected to be already reverted in error
+ * path because of the potential rollback.
+ */
+ hw->evb_veb = old_evb_veb;
+ goto err_without_rollback;
+ }
+ err = ice_update_sw_rule_bridge_mode(hw, ICE_SW_LKUP_MAC_VLAN);
if (err) {
- netdev_err(dev, "switch rule update failed, mode = %d err %d aq_err %s\n",
- mode, err,
+ /* ice_update_sw_rule_bridge_mode looks this up, so we
+ * must revert it before attempting a rollback.
+ */
+ hw->evb_veb = old_evb_veb;
+ goto err_rollback_mac;
+ }
+ pf_sw->bridge_mode = mode;
+ continue;
+
+err_rollback_mac:
+ rb_err = ice_update_sw_rule_bridge_mode(hw, ICE_SW_LKUP_MAC);
+ if (rb_err) {
+ netdev_err(dev, "switch rule update failed, mode = %d err %d; rollback failed, err %d aq_err %s\n",
+ mode, err, rb_err,
libie_aq_str(hw->adminq.sq_last_status));
- /* revert hw->evb_veb */
- hw->evb_veb = (pf_sw->bridge_mode == BRIDGE_MODE_VEB);
- return err;
+ return rb_err;
}
- pf_sw->bridge_mode = mode;
+err_without_rollback:
+ netdev_err(dev, "switch rule update failed, mode = %d err %d aq_err %s\n",
+ mode, err, libie_aq_str(hw->adminq.sq_last_status));
+ return err;
}
return 0;
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c
index b3f5cda1571e..e0ff9a0882d5 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.c
+++ b/drivers/net/ethernet/intel/ice/ice_switch.c
@@ -3065,10 +3065,12 @@ ice_update_pkt_fwd_rule(struct ice_hw *hw, struct ice_fltr_info *f_info)
/**
* ice_update_sw_rule_bridge_mode
* @hw: pointer to the HW struct
+ * @lkup: recipe/lookup type to update
*
* Updates unicast switch filter rules based on VEB/VEPA mode
*/
-int ice_update_sw_rule_bridge_mode(struct ice_hw *hw)
+int ice_update_sw_rule_bridge_mode(struct ice_hw *hw,
+ enum ice_sw_lkup_type lkup)
{
struct ice_switch_info *sw = hw->switch_info;
struct ice_fltr_mgmt_list_entry *fm_entry;
@@ -3076,8 +3078,8 @@ int ice_update_sw_rule_bridge_mode(struct ice_hw *hw)
struct mutex *rule_lock; /* Lock to protect filter rule list */
int status = 0;
- rule_lock = &sw->recp_list[ICE_SW_LKUP_MAC].filt_rule_lock;
- rule_head = &sw->recp_list[ICE_SW_LKUP_MAC].filt_rules;
+ rule_lock = &sw->recp_list[lkup].filt_rule_lock;
+ rule_head = &sw->recp_list[lkup].filt_rules;
mutex_lock(rule_lock);
list_for_each_entry(fm_entry, rule_head, list_entry) {
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.h b/drivers/net/ethernet/intel/ice/ice_switch.h
index b694c131ad58..f1917e15b26c 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.h
+++ b/drivers/net/ethernet/intel/ice/ice_switch.h
@@ -361,7 +361,8 @@ int
ice_add_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
u16 lkups_cnt, struct ice_adv_rule_info *rinfo,
struct ice_rule_query_data *added_entry);
-int ice_update_sw_rule_bridge_mode(struct ice_hw *hw);
+int ice_update_sw_rule_bridge_mode(struct ice_hw *hw,
+ enum ice_sw_lkup_type lkup);
int ice_add_vlan(struct ice_hw *hw, struct list_head *m_list);
int ice_remove_vlan(struct ice_hw *hw, struct list_head *v_list);
int ice_add_mac(struct ice_hw *hw, struct list_head *m_lst);
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH iwl-next v2 6/8] ice: add functions to query for vsi's pvids
2025-11-25 8:34 [Intel-wired-lan] [PATCH iwl-next v2 0/8] ice: in VEB, prevent "cross-vlan" traffic Jakub Slepecki
` (4 preceding siblings ...)
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 5/8] ice: update mac, vlan rules when toggling between VEB and VEPA Jakub Slepecki
@ 2025-11-25 8:34 ` Jakub Slepecki
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 7/8] ice: add mac vlan to filter API Jakub Slepecki
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 8/8] ice: in VEB, prevent "cross-vlan" traffic from hitting loopback Jakub Slepecki
7 siblings, 0 replies; 18+ messages in thread
From: Jakub Slepecki @ 2025-11-25 8:34 UTC (permalink / raw)
To: intel-wired-lan
Cc: linux-kernel, netdev, przemyslaw.kitszel, anthony.l.nguyen,
michal.swiatkowski, jakub.slepecki, aleksandr.loktionov
PVID information is set across two structs and several members depending
primarily on DVM support and VSI type. This commit adds function that
guess whether PVID is set and where and allow to access raw VLAN ID set.
This is intended to be used later on to decide what MAC{,VLAN} filters
to set for a VSI.
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Jakub Slepecki <jakub.slepecki@intel.com>
---
No changes in v2.
---
drivers/net/ethernet/intel/ice/ice_lib.c | 56 ++++++++++++++++++++++++
drivers/net/ethernet/intel/ice/ice_lib.h | 2 +
2 files changed, 58 insertions(+)
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index 44f3c2bab308..55ba043f8f5e 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -4059,3 +4059,59 @@ void ice_vsi_update_l2tsel(struct ice_vsi *vsi, enum ice_l2tsel l2tsel)
wr32(hw, qrx_context_offset, regval);
}
}
+
+/**
+ * ice_vsi_has_outer_pvid - check if VSI has outer Port VLAN ID assigned
+ * @info: props of VSI in question
+ *
+ * Return: true if VSI has outer PVID, false otherwise.
+ */
+static bool
+ice_vsi_has_outer_pvid(const struct ice_aqc_vsi_props *info)
+{
+ return info->outer_vlan_flags & ICE_AQ_VSI_OUTER_VLAN_PORT_BASED_INSERT;
+}
+
+/**
+ * ice_vsi_has_inner_pvid - check if VSI has inner Port VLAN ID assigned
+ * @info: props of VSI in question
+ *
+ * Return: true if VSI has inner PVID, false otherwise.
+ */
+static bool
+ice_vsi_has_inner_pvid(const struct ice_aqc_vsi_props *info)
+{
+ return info->inner_vlan_flags & ICE_AQ_VSI_INNER_VLAN_INSERT_PVID;
+}
+
+/**
+ * ice_vsi_has_pvid - check if VSI has Port VLAN ID assigned
+ * @vsi: VSI in question
+ *
+ * Return: true if VSI has either outer or inner PVID, false otherwise.
+ */
+bool
+ice_vsi_has_pvid(struct ice_vsi *vsi)
+{
+ return ice_vsi_has_outer_pvid(&vsi->info) ||
+ ice_vsi_has_inner_pvid(&vsi->info);
+}
+
+/**
+ * ice_vsi_pvid - retrieve VSI's Port VLAN ID
+ * @vsi: VSI in question
+ *
+ * Return: VSI's PVID; it is valid only if ice_vsi_has_pvid is true.
+ */
+u16
+ice_vsi_pvid(struct ice_vsi *vsi)
+{
+ __le16 vlan_info = 0;
+
+ if (ice_vsi_has_outer_pvid(&vsi->info))
+ vlan_info = vsi->info.port_based_outer_vlan;
+ else if (ice_vsi_has_inner_pvid(&vsi->info))
+ vlan_info = vsi->info.port_based_inner_vlan;
+
+ return le16_to_cpu(vlan_info) & VLAN_VID_MASK;
+}
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.h b/drivers/net/ethernet/intel/ice/ice_lib.h
index 2cb1eb98b9da..c28c69963946 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.h
+++ b/drivers/net/ethernet/intel/ice/ice_lib.h
@@ -124,4 +124,6 @@ void ice_clear_feature_support(struct ice_pf *pf, enum ice_feature f);
void ice_init_feature_support(struct ice_pf *pf);
bool ice_vsi_is_rx_queue_active(struct ice_vsi *vsi);
void ice_vsi_update_l2tsel(struct ice_vsi *vsi, enum ice_l2tsel l2tsel);
+bool ice_vsi_has_pvid(struct ice_vsi *vsi);
+u16 ice_vsi_pvid(struct ice_vsi *vsi);
#endif /* !_ICE_LIB_H_ */
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH iwl-next v2 7/8] ice: add mac vlan to filter API
2025-11-25 8:34 [Intel-wired-lan] [PATCH iwl-next v2 0/8] ice: in VEB, prevent "cross-vlan" traffic Jakub Slepecki
` (5 preceding siblings ...)
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 6/8] ice: add functions to query for vsi's pvids Jakub Slepecki
@ 2025-11-25 8:34 ` Jakub Slepecki
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 8/8] ice: in VEB, prevent "cross-vlan" traffic from hitting loopback Jakub Slepecki
7 siblings, 0 replies; 18+ messages in thread
From: Jakub Slepecki @ 2025-11-25 8:34 UTC (permalink / raw)
To: intel-wired-lan
Cc: linux-kernel, netdev, przemyslaw.kitszel, anthony.l.nguyen,
michal.swiatkowski, jakub.slepecki, aleksandr.loktionov
From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Allow mac vlan filters to be managed by filters API in ice driver.
Together with mac-only filters they will be used to forward traffic
intended for loopback in VEB mode.
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Jakub Slepecki <jakub.slepecki@intel.com>
---
No changes in v2.
---
drivers/net/ethernet/intel/ice/ice_fltr.c | 33 +++++++++++++++++++++++
drivers/net/ethernet/intel/ice/ice_fltr.h | 4 +++
2 files changed, 37 insertions(+)
diff --git a/drivers/net/ethernet/intel/ice/ice_fltr.c b/drivers/net/ethernet/intel/ice/ice_fltr.c
index aff7a141c30d..96a4e4b1b3fc 100644
--- a/drivers/net/ethernet/intel/ice/ice_fltr.c
+++ b/drivers/net/ethernet/intel/ice/ice_fltr.c
@@ -240,6 +240,39 @@ ice_fltr_add_mac_to_list(struct ice_vsi *vsi, struct list_head *list,
list);
}
+/**
+ * ice_fltr_add_mac_vlan_to_list - add MAC VLAN filter info to
+ * existing list
+ * @vsi: pointer to VSI struct
+ * @list: list to add filter info to
+ * @mac: MAC address to add
+ * @vlan_id: VLAN id to add
+ * @action: filter action
+ *
+ * Return:
+ * * 0 if entry for filter was added, or
+ * * %-ENOMEM if entry could not be allocated.
+ */
+int
+ice_fltr_add_mac_vlan_to_list(struct ice_vsi *vsi, struct list_head *list,
+ const u8 *mac, u16 vlan_id,
+ enum ice_sw_fwd_act_type action)
+{
+ struct ice_fltr_info info = {};
+
+ info.flag = ICE_FLTR_TX;
+ info.src_id = ICE_SRC_ID_VSI;
+ info.lkup_type = ICE_SW_LKUP_MAC_VLAN;
+ info.fltr_act = action;
+ info.vsi_handle = vsi->idx;
+
+ info.l_data.mac_vlan.vlan_id = vlan_id;
+ ether_addr_copy(info.l_data.mac_vlan.mac_addr, mac);
+
+ return ice_fltr_add_entry_to_list(ice_pf_to_dev(vsi->back), &info,
+ list);
+}
+
/**
* ice_fltr_add_vlan_to_list - add VLAN filter info to exsisting list
* @vsi: pointer to VSI struct
diff --git a/drivers/net/ethernet/intel/ice/ice_fltr.h b/drivers/net/ethernet/intel/ice/ice_fltr.h
index 0f3dbc308eec..fb9ffb39be50 100644
--- a/drivers/net/ethernet/intel/ice/ice_fltr.h
+++ b/drivers/net/ethernet/intel/ice/ice_fltr.h
@@ -23,6 +23,10 @@ int
ice_fltr_add_mac_to_list(struct ice_vsi *vsi, struct list_head *list,
const u8 *mac, enum ice_sw_fwd_act_type action);
int
+ice_fltr_add_mac_vlan_to_list(struct ice_vsi *vsi, struct list_head *list,
+ const u8 *mac, u16 vlan_id,
+ enum ice_sw_fwd_act_type action);
+int
ice_fltr_add_mac(struct ice_vsi *vsi, const u8 *mac,
enum ice_sw_fwd_act_type action);
int
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [Intel-wired-lan] [PATCH iwl-next v2 8/8] ice: in VEB, prevent "cross-vlan" traffic from hitting loopback
2025-11-25 8:34 [Intel-wired-lan] [PATCH iwl-next v2 0/8] ice: in VEB, prevent "cross-vlan" traffic Jakub Slepecki
` (6 preceding siblings ...)
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 7/8] ice: add mac vlan to filter API Jakub Slepecki
@ 2025-11-25 8:34 ` Jakub Slepecki
7 siblings, 0 replies; 18+ messages in thread
From: Jakub Slepecki @ 2025-11-25 8:34 UTC (permalink / raw)
To: intel-wired-lan
Cc: linux-kernel, netdev, przemyslaw.kitszel, anthony.l.nguyen,
michal.swiatkowski, jakub.slepecki, aleksandr.loktionov
In Virtual Ethernet Bridge (VEB) mode, we use MAC filters to forward
traffic between two VFs. We also use VLAN filters to prune potential
destinations, so that they don't cross VLANs. In case a VF in VLAN X
sends a packet to a MAC address matching another VF but in VLAN Y, both
these filters will be hit. Packet will be sent to loopback-only to VF
in VLAN Y, but VLAN filter will prune its VSI from the destination list
leaving the packet stranded in the internal switch and thus dropped.
Since there is no destination for the packet in the VLAN X, it should
instead be sent to the wire.
To fix this, we introduce MAC,VLAN filters in place of MAC-only filters
if VSI is part of any VLAN. We consider VSI part of a VLAN if it has a
PVID set, or if it has a specific VLAN filter and does not have a VLAN
0 filter.
This approach does not attempt to fix interactions with upper devices.
If an upper vlan device requests a separate MAC address filter resulting
in a call to __dev_uc_sync, the VSI will start receiving all packets
destined for this MAC and not just within the VLAN. I don't see a
straight-forward way to resolve this: information about MAC and VLAN
filters coming from kernel to driver is disconnected from one another
and from the device that requests it. It could be worked around by,
for example, tracking all upper devices with netdev notifications and
adjusting the filters there. The scope of this patch is hence limited
to VF traffic.
Following situations were considered for VLAN filters additions, removal,
or changes:
1. ice changes VF's vlan
2. VF is reset and rebuilt
3. vlan device attaches above a PF or a VF
And same for MAC filters:
4. PF's MAC is changed
5. PF changes MAC of a VF
6. VF's MAC is changed
7. ndo_set_rx_mode et al
When VLAN is assigned to a VF in (1), the affected VF is reset and
rebuild. This makes (1) the same as (2). We end up with two cases
where VLAN filters are added: (2) and (3).
To correctly handle (1-2), we move the VLAN filters initialization
before the MAC filters initialization, since MAC filters now depend
on VLAN filters presence. These two handle PVID (or lack of thereof)
and because they are always associated with a reset, we don't need to
consider updating MAC and MAC,VLAN filters afterwards.
In (3), we will always have a lower device that is expected to receive
all packets for its MAC regardless of VLAN tag. Because of the caveat
described above, we will do the same for each MAC address associated with
the interface regardless of VLANs. The result is we only have MAC-only
filters in this case.
When we create MAC filters in (4-7) we now check for existing VLAN
filters and depending on PVID and VLAN 0 presence we decide to create,
respectively, a MAC and MAC,VLAN filter pair, or a MAC filter. This is
done implicitly when requesting to remove old MAC and add new MAC,
so no change is required to this flow.
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Jakub Slepecki <jakub.slepecki@intel.com>
---
No changes in v2.
---
drivers/net/ethernet/intel/ice/ice_fltr.c | 71 +++++++++++++++++++--
drivers/net/ethernet/intel/ice/ice_fltr.h | 6 +-
drivers/net/ethernet/intel/ice/ice_main.c | 8 +--
drivers/net/ethernet/intel/ice/ice_switch.c | 2 +-
drivers/net/ethernet/intel/ice/ice_switch.h | 2 +
drivers/net/ethernet/intel/ice/ice_vf_lib.c | 8 +--
6 files changed, 83 insertions(+), 14 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_fltr.c b/drivers/net/ethernet/intel/ice/ice_fltr.c
index 96a4e4b1b3fc..c0fc1bced167 100644
--- a/drivers/net/ethernet/intel/ice/ice_fltr.c
+++ b/drivers/net/ethernet/intel/ice/ice_fltr.c
@@ -3,6 +3,7 @@
#include "ice.h"
#include "ice_fltr.h"
+#include "ice_lib.h"
/**
* ice_fltr_free_list - free filter lists helper
@@ -221,10 +222,12 @@ void ice_fltr_remove_all(struct ice_vsi *vsi)
* @list: list to add filter info to
* @mac: MAC address to add
* @action: filter action
+ * @external: force the filter to enable lan destination
*/
int
ice_fltr_add_mac_to_list(struct ice_vsi *vsi, struct list_head *list,
- const u8 *mac, enum ice_sw_fwd_act_type action)
+ const u8 *mac, enum ice_sw_fwd_act_type action,
+ bool external)
{
struct ice_fltr_info info = { 0 };
@@ -233,6 +236,10 @@ ice_fltr_add_mac_to_list(struct ice_vsi *vsi, struct list_head *list,
info.lkup_type = ICE_SW_LKUP_MAC;
info.fltr_act = action;
info.vsi_handle = vsi->idx;
+ if (external) {
+ info.lb_en = ICE_FLTR_INFO_LB_LAN_FORCE_ENABLED;
+ info.lan_en = ICE_FLTR_INFO_LB_LAN_FORCE_ENABLED;
+ }
ether_addr_copy(info.l_data.mac.mac_addr, mac);
@@ -273,6 +280,62 @@ ice_fltr_add_mac_vlan_to_list(struct ice_vsi *vsi, struct list_head *list,
list);
}
+/**
+ * ice_fltr_add_macs_to_list - add MAC and MAC,VLAN filters info to an existing
+ * list
+ * @vsi: pointer to VSI struct
+ * @list: list to add filter info to
+ * @mac: MAC address to add
+ * @action: filter action
+ *
+ * Return:
+ * * 0 on success, or
+ * * %-ENOMEM if entry for filter could not be allocated.
+ */
+int
+ice_fltr_add_macs_to_list(struct ice_vsi *vsi, struct list_head *list,
+ const u8 *mac, enum ice_sw_fwd_act_type action)
+{
+ if (is_multicast_ether_addr(mac)) {
+ /* There is no point in doing the same gymnastics as below
+ * because multicast addresses are sent to both lan and lb then
+ * pruned as necessary.
+ */
+ return ice_fltr_add_mac_to_list(vsi, list, mac, action, false);
+ } else if (ice_vsi_has_pvid(vsi)) {
+ u16 pvid = ice_vsi_pvid(vsi);
+ int ret;
+
+ ret = ice_fltr_add_mac_to_list(vsi, list, mac, action, true);
+ if (ret)
+ return ret;
+
+ return ice_fltr_add_mac_vlan_to_list(vsi, list, mac, pvid,
+ action);
+ } else if (vsi->num_vlan != ice_vsi_num_non_zero_vlans(vsi)) {
+ /* If VSI has VLAN 0 filters, then the interface is prepared to
+ * receive untagged packets. As of now, we simply don't have
+ * heuristics to decide which MAC is and is not part of which
+ * VLAN so we put them all in the same bucket.
+ */
+ return ice_fltr_add_mac_to_list(vsi, list, mac, action, false);
+ }
+
+ /* This branch is a.s. dead. There are three cases that may happen:
+ *
+ * - no vlans in sight; this is the VLAN 0 branch,
+ * - VF is assigned PVID; this is ice_vsi_has_pvid branch,
+ * - PF or VF is under vlan device; this is the VLAN 0 branch.
+ *
+ * This is where you would implement support for multiple VLANs but
+ * without the VLAN 0. This could happen if vlan upper device is
+ * assigned a MAC that is unique compared to lower ice device that is
+ * forced to accept any VLAN. This would imply MAC-only filter for one
+ * MAC address (PF) and MAC,VLAN+MAC filters for another (vlan).
+ */
+ return ice_fltr_add_mac_to_list(vsi, list, mac, action, false);
+}
+
/**
* ice_fltr_add_vlan_to_list - add VLAN filter info to exsisting list
* @vsi: pointer to VSI struct
@@ -343,7 +406,7 @@ ice_fltr_prepare_mac(struct ice_vsi *vsi, const u8 *mac,
LIST_HEAD(tmp_list);
int result;
- if (ice_fltr_add_mac_to_list(vsi, &tmp_list, mac, action)) {
+ if (ice_fltr_add_macs_to_list(vsi, &tmp_list, mac, action)) {
ice_fltr_free_list(ice_pf_to_dev(vsi->back), &tmp_list);
return -ENOMEM;
}
@@ -371,8 +434,8 @@ ice_fltr_prepare_mac_and_broadcast(struct ice_vsi *vsi, const u8 *mac,
int result;
eth_broadcast_addr(broadcast);
- if (ice_fltr_add_mac_to_list(vsi, &tmp_list, mac, action) ||
- ice_fltr_add_mac_to_list(vsi, &tmp_list, broadcast, action)) {
+ if (ice_fltr_add_macs_to_list(vsi, &tmp_list, mac, action) ||
+ ice_fltr_add_macs_to_list(vsi, &tmp_list, broadcast, action)) {
ice_fltr_free_list(ice_pf_to_dev(vsi->back), &tmp_list);
return -ENOMEM;
}
diff --git a/drivers/net/ethernet/intel/ice/ice_fltr.h b/drivers/net/ethernet/intel/ice/ice_fltr.h
index fb9ffb39be50..ed3371b0a71f 100644
--- a/drivers/net/ethernet/intel/ice/ice_fltr.h
+++ b/drivers/net/ethernet/intel/ice/ice_fltr.h
@@ -21,12 +21,16 @@ ice_fltr_set_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,
u16 vid);
int
ice_fltr_add_mac_to_list(struct ice_vsi *vsi, struct list_head *list,
- const u8 *mac, enum ice_sw_fwd_act_type action);
+ const u8 *mac, enum ice_sw_fwd_act_type action,
+ bool external);
int
ice_fltr_add_mac_vlan_to_list(struct ice_vsi *vsi, struct list_head *list,
const u8 *mac, u16 vlan_id,
enum ice_sw_fwd_act_type action);
int
+ice_fltr_add_macs_to_list(struct ice_vsi *vsi, struct list_head *list,
+ const u8 *mac, enum ice_sw_fwd_act_type action);
+int
ice_fltr_add_mac(struct ice_vsi *vsi, const u8 *mac,
enum ice_sw_fwd_act_type action);
int
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 921ed2b6c0aa..60d5e23d0d1a 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -212,8 +212,8 @@ static int ice_add_mac_to_sync_list(struct net_device *netdev, const u8 *addr)
struct ice_netdev_priv *np = netdev_priv(netdev);
struct ice_vsi *vsi = np->vsi;
- if (ice_fltr_add_mac_to_list(vsi, &vsi->tmp_sync_list, addr,
- ICE_FWD_TO_VSI))
+ if (ice_fltr_add_macs_to_list(vsi, &vsi->tmp_sync_list, addr,
+ ICE_FWD_TO_VSI))
return -EINVAL;
return 0;
@@ -242,8 +242,8 @@ static int ice_add_mac_to_unsync_list(struct net_device *netdev, const u8 *addr)
if (ether_addr_equal(addr, netdev->dev_addr))
return 0;
- if (ice_fltr_add_mac_to_list(vsi, &vsi->tmp_unsync_list, addr,
- ICE_FWD_TO_VSI))
+ if (ice_fltr_add_macs_to_list(vsi, &vsi->tmp_unsync_list, addr,
+ ICE_FWD_TO_VSI))
return -EINVAL;
return 0;
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c
index e0ff9a0882d5..c1418fd490cc 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.c
+++ b/drivers/net/ethernet/intel/ice/ice_switch.c
@@ -4016,7 +4016,7 @@ ice_cfg_dflt_vsi(struct ice_port_info *pi, u16 vsi_handle, bool set,
* @fm_entry: filter entry to inspect
* @vsi_handle: VSI handle to compare with filter info
*/
-static bool
+bool
ice_vsi_uses_fltr(struct ice_fltr_mgmt_list_entry *fm_entry, u16 vsi_handle)
{
return ((fm_entry->fltr_info.fltr_act == ICE_FWD_TO_VSI &&
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.h b/drivers/net/ethernet/intel/ice/ice_switch.h
index f1917e15b26c..a65c74c30b2e 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.h
+++ b/drivers/net/ethernet/intel/ice/ice_switch.h
@@ -341,6 +341,8 @@ ice_update_vsi(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi_ctx,
bool ice_is_vsi_valid(struct ice_hw *hw, u16 vsi_handle);
struct ice_vsi_ctx *ice_get_vsi_ctx(struct ice_hw *hw, u16 vsi_handle);
void ice_clear_all_vsi_ctx(struct ice_hw *hw);
+bool ice_vsi_uses_fltr(struct ice_fltr_mgmt_list_entry *fm_entry,
+ u16 vsi_handle);
/* Switch config */
int ice_get_initial_sw_cfg(struct ice_hw *hw);
diff --git a/drivers/net/ethernet/intel/ice/ice_vf_lib.c b/drivers/net/ethernet/intel/ice/ice_vf_lib.c
index de9e81ccee66..1031ce20bb60 100644
--- a/drivers/net/ethernet/intel/ice/ice_vf_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_vf_lib.c
@@ -501,14 +501,14 @@ static void ice_vf_rebuild_host_cfg(struct ice_vf *vf)
ice_vf_set_host_trust_cfg(vf);
- if (ice_vf_rebuild_host_mac_cfg(vf))
- dev_err(dev, "failed to rebuild default MAC configuration for VF %d\n",
- vf->vf_id);
-
if (ice_vf_rebuild_host_vlan_cfg(vf, vsi))
dev_err(dev, "failed to rebuild VLAN configuration for VF %u\n",
vf->vf_id);
+ if (ice_vf_rebuild_host_mac_cfg(vf))
+ dev_err(dev, "failed to rebuild default MAC configuration for VF %d\n",
+ vf->vf_id);
+
if (ice_vf_rebuild_host_tx_rate_cfg(vf))
dev_err(dev, "failed to rebuild Tx rate limiting configuration for VF %u\n",
vf->vf_id);
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-next v2 5/8] ice: update mac, vlan rules when toggling between VEB and VEPA
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 5/8] ice: update mac, vlan rules when toggling between VEB and VEPA Jakub Slepecki
@ 2025-11-25 8:52 ` Loktionov, Aleksandr
2025-11-28 8:29 ` Jakub Slepecki
0 siblings, 1 reply; 18+ messages in thread
From: Loktionov, Aleksandr @ 2025-11-25 8:52 UTC (permalink / raw)
To: Slepecki, Jakub, intel-wired-lan@lists.osuosl.org
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Kitszel, Przemyslaw, Nguyen, Anthony L,
michal.swiatkowski@linux.intel.com
> -----Original Message-----
> From: Slepecki, Jakub <jakub.slepecki@intel.com>
> Sent: Tuesday, November 25, 2025 9:35 AM
> To: intel-wired-lan@lists.osuosl.org
> Cc: linux-kernel@vger.kernel.org; netdev@vger.kernel.org; Kitszel,
> Przemyslaw <przemyslaw.kitszel@intel.com>; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; michal.swiatkowski@linux.intel.com; Slepecki,
> Jakub <jakub.slepecki@intel.com>; Loktionov, Aleksandr
> <aleksandr.loktionov@intel.com>
> Subject: [PATCH iwl-next v2 5/8] ice: update mac,vlan rules when toggling
> between VEB and VEPA
>
> When changing into VEPA mode MAC rules are modified to forward all traffic
> to the wire instead of allowing some packets to go into the loopback.
> MAC,VLAN rules may and will also be used to forward loopback traffic in VEB,
> so when we switch to VEPA, we want them to behave similarly to MAC-only
> rules.
>
> ice_vsi_update_bridge_mode() will now attempt a rollback of switch filters
> in case an update fails. If the rollback also fails, we will now return the
> rollback error instead of the initial error.
>
> Signed-off-by: Jakub Slepecki <jakub.slepecki@intel.com>
>
> ---
> Testing hints:
> MAC,VLAN rules are created only if entire series is applied.
> The easiest way to test that rules were adjusted is to run traffic
> and observe what packets are sent to LAN. VEPA is expected to behave
> same as before the series. VEB is expected to (a) behave like VEPA
> if loopback traffic would cross VLANs, or (b) behave as before.
> Traffic from/to external hosts is expected to remain unchanged.
>
Better to provide exact bash commands.
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> Dropping reviewed-by Michał due to changes.
>
> Changes in v2:
> - Close open parenthesis in ice_vsi_update_bridge_mode() description.
> - Explain returns in ice_vsi_update_bridge_mode().
> ---
> drivers/net/ethernet/intel/ice/ice_main.c | 48 +++++++++++++++++----
> drivers/net/ethernet/intel/ice/ice_switch.c | 8 ++--
> drivers/net/ethernet/intel/ice/ice_switch.h | 3 +-
> 3 files changed, 46 insertions(+), 13 deletions(-)
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-next v2 4/8] ice: allow overriding lan_en, lb_en in switch
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 4/8] ice: allow overriding lan_en, lb_en in switch Jakub Slepecki
@ 2025-11-25 8:59 ` Loktionov, Aleksandr
2025-11-28 11:55 ` Jakub Slepecki
0 siblings, 1 reply; 18+ messages in thread
From: Loktionov, Aleksandr @ 2025-11-25 8:59 UTC (permalink / raw)
To: Slepecki, Jakub, intel-wired-lan@lists.osuosl.org
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Kitszel, Przemyslaw, Nguyen, Anthony L,
michal.swiatkowski@linux.intel.com
> -----Original Message-----
> From: Slepecki, Jakub <jakub.slepecki@intel.com>
> Sent: Tuesday, November 25, 2025 9:35 AM
> To: intel-wired-lan@lists.osuosl.org
> Cc: linux-kernel@vger.kernel.org; netdev@vger.kernel.org; Kitszel,
> Przemyslaw <przemyslaw.kitszel@intel.com>; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; michal.swiatkowski@linux.intel.com; Slepecki,
> Jakub <jakub.slepecki@intel.com>; Loktionov, Aleksandr
> <aleksandr.loktionov@intel.com>
> Subject: [PATCH iwl-next v2 4/8] ice: allow overriding lan_en, lb_en in
> switch
>
> Currently, lan_en and lb_en are determined based on switching mode,
> destination MAC, and the lookup type, action type and flags of the rule in
> question. This gives little to no options for the user (such as
> ice_fltr.c) to enforce rules to behave in a specific way.
>
> Such functionality is needed to work with pairs of rules, for example, when
> handling MAC forward to LAN together with MAC,VLAN forward to loopback rules
> pair. This case could not be easily deduced in a context of a single filter
> without adding a specialized flag.
>
> Instead of adding a specialized flag to mark special scenario rules, we add
> a slightly more generic flag to the lan_en and lb_en themselves for the
> ice_fltr.c to request specific destination flags later on, for example, to
> override value:
>
> struct ice_fltr_info fi;
> fi.lb_en = ICE_FLTR_INFO_LB_LAN_FORCE_ENABLED;
> fi.lan_en = ICE_FLTR_INFO_LB_LAN_FORCE_DISABLED;
>
> Signed-off-by: Jakub Slepecki <jakub.slepecki@intel.com>
>
> ---
> Dropping reviewed-by from Michał due to changes.
>
> Changes in v2:
> - Use FIELD_GET et al. when handling fi.lb_en and fi.lan_en.
> - Rename /LB_LAN/s/_MASK/_M/ because one of uses would need to break
> line.
> ---
...
> if (fi->flag & ICE_FLTR_TX_ONLY)
> - fi->lan_en = false;
> + lan_en = false;
> + if (!FIELD_GET(ICE_FLTR_INFO_LB_LAN_FORCE_M, fi->lb_en))
> + FIELD_MODIFY(ICE_FLTR_INFO_LB_LAN_VALUE_M, &fi->lb_en,
> lb_en);
> + if (!FIELD_GET(ICE_FLTR_INFO_LB_LAN_FORCE_M, fi->lan_en))
> + FIELD_MODIFY(ICE_FLTR_INFO_LB_LAN_VALUE_M, &fi->lan_en,
fi->lb_en and fi->lan_en are declared as bool in struct ice_fltr_info, but you are now treating them as bitfields using FIELD_GET and FIELD_MODIFY.
I realize it could be something like:
struct ice_fltr_info {
...
u8 lb_lan_flags; /* bitfield: value + force */
...
};
#define ICE_FLTR_INFO_LB_LAN_VALUE_M BIT(0)
#define ICE_FLTR_INFO_LB_LAN_FORCE_M BIT(1)
#define ICE_FLTR_INFO_LB_LAN_FORCE_ENABLED \
(FIELD_PREP_CONST(ICE_FLTR_INFO_LB_LAN_VALUE_M, 1) | \
FIELD_PREP_CONST(ICE_FLTR_INFO_LB_LAN_FORCE_M, 1))
#define ICE_FLTR_INFO_LB_LAN_FORCE_DISABLED \
(FIELD_PREP_CONST(ICE_FLTR_INFO_LB_LAN_FORCE_M, 1))
...
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-next v2 5/8] ice: update mac, vlan rules when toggling between VEB and VEPA
2025-11-25 8:52 ` Loktionov, Aleksandr
@ 2025-11-28 8:29 ` Jakub Slepecki
2025-11-28 8:36 ` Loktionov, Aleksandr
0 siblings, 1 reply; 18+ messages in thread
From: Jakub Slepecki @ 2025-11-28 8:29 UTC (permalink / raw)
To: Loktionov, Aleksandr, intel-wired-lan@lists.osuosl.org
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Kitszel, Przemyslaw, Nguyen, Anthony L,
michal.swiatkowski@linux.intel.com
On 2025-11-25 9:52, Loktionov, Aleksandr wrote:
> Better to provide exact bash commands.
All right, I'll review the commands in the 0/8 and see if I can expand
them for this context. I'll refer it here. I suppose I could add the
bridge(8) example for hwmode? Something like:
Testing hints:
MAC,VLAN rules are created only if entire series is applied.
The easiest way to test that rules were adjusted is to run traffic
and observe what packets are sent to LAN. VEPA is expected to behave
same as before the series. VEB is expected to (a) behave like VEPA
if loopback traffic would cross VLANs, or (b) behave as before.
Traffic from/to external hosts is expected to remain unchanged.
Refer to 0/8 for full network configuration. To change hwmode use:
bridge link set dev $pf hwmode {veb,vepa}
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
I'll drop it since you did not explicitly say it's fine to keep it.
Thanks!
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-next v2 5/8] ice: update mac, vlan rules when toggling between VEB and VEPA
2025-11-28 8:29 ` Jakub Slepecki
@ 2025-11-28 8:36 ` Loktionov, Aleksandr
2025-11-28 12:28 ` Jakub Slepecki
0 siblings, 1 reply; 18+ messages in thread
From: Loktionov, Aleksandr @ 2025-11-28 8:36 UTC (permalink / raw)
To: Slepecki, Jakub, intel-wired-lan@lists.osuosl.org
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Kitszel, Przemyslaw, Nguyen, Anthony L,
michal.swiatkowski@linux.intel.com
> -----Original Message-----
> From: Slepecki, Jakub <jakub.slepecki@intel.com>
> Sent: Friday, November 28, 2025 9:29 AM
> To: Loktionov, Aleksandr <aleksandr.loktionov@intel.com>; intel-wired-
> lan@lists.osuosl.org
> Cc: linux-kernel@vger.kernel.org; netdev@vger.kernel.org; Kitszel,
> Przemyslaw <przemyslaw.kitszel@intel.com>; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; michal.swiatkowski@linux.intel.com
> Subject: Re: [PATCH iwl-next v2 5/8] ice: update mac,vlan rules when
> toggling between VEB and VEPA
>
> On 2025-11-25 9:52, Loktionov, Aleksandr wrote:
> > Better to provide exact bash commands.
>
> All right, I'll review the commands in the 0/8 and see if I can expand them
> for this context. I'll refer it here. I suppose I could add the
> bridge(8) example for hwmode? Something like:
>
> Testing hints:
> MAC,VLAN rules are created only if entire series is applied.
> The easiest way to test that rules were adjusted is to run traffic
> and observe what packets are sent to LAN. VEPA is expected to
> behave
> same as before the series. VEB is expected to (a) behave like VEPA
> if loopback traffic would cross VLANs, or (b) behave as before.
> Traffic from/to external hosts is expected to remain unchanged.
>
> Refer to 0/8 for full network configuration. To change hwmode use:
>
> bridge link set dev $pf hwmode {veb,vepa}
>
> > Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
>
> I'll drop it since you did not explicitly say it's fine to keep it.
>
> Thanks!
Thanks for clarifying and for adding the testing hints.
The example with `bridge link set dev $pf hwmode {veb,vepa}` looks good and makes the intent clear. Adding the note that MAC/VLAN rules require the full series is helpful.
One small suggestion: please include prerequisites in the 0/8 cover letter (e.g., `iproute2` version and that commands need root privileges), so testers don’t miss that.
Otherwise, the instructions are fine from my side. Please keep my:
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Thanks!
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-next v2 4/8] ice: allow overriding lan_en, lb_en in switch
2025-11-25 8:59 ` Loktionov, Aleksandr
@ 2025-11-28 11:55 ` Jakub Slepecki
2025-12-01 7:37 ` Loktionov, Aleksandr
0 siblings, 1 reply; 18+ messages in thread
From: Jakub Slepecki @ 2025-11-28 11:55 UTC (permalink / raw)
To: Loktionov, Aleksandr, intel-wired-lan@lists.osuosl.org
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Kitszel, Przemyslaw, Nguyen, Anthony L,
michal.swiatkowski@linux.intel.com
On 2025-11-25 9:59, Loktionov, Aleksandr wrote:
>> if (fi->flag & ICE_FLTR_TX_ONLY)
>> - fi->lan_en = false;
>> + lan_en = false;
>> + if (!FIELD_GET(ICE_FLTR_INFO_LB_LAN_FORCE_M, fi->lb_en))
>> + FIELD_MODIFY(ICE_FLTR_INFO_LB_LAN_VALUE_M, &fi->lb_en, lb_en);
>> + if (!FIELD_GET(ICE_FLTR_INFO_LB_LAN_FORCE_M, fi->lan_en))
>> + FIELD_MODIFY(ICE_FLTR_INFO_LB_LAN_VALUE_M, &fi->lan_en, lan_en);
> fi->lb_en and fi->lan_en are declared as bool in struct ice_fltr_info,
> but you are now treating them as bitfields using FIELD_GET and
> FIELD_MODIFY.
I don't see what you mean here. Both members are u8 without a bit-field
declaration. Or do you mean they are used as bool or maybe the _en
suffix?
> I realize it could be something like:
> struct ice_fltr_info {
> ...
> u8 lb_lan_flags; /* bitfield: value + force */
> ...
> };
What I see from this sample is that you want me to: pack them, change
their name, and change their description. Is this correct?
I fully agree about the description. It's my mistake I left it as-is.
I'll update it according to the overall changes.
I don't think packing them is worth it. The memory gain is negligible
and the cost is primarily in readability and consistency: we've always
had two fields for these with clear responsibility for each, names
match with datasheet (both "lan en" and "lb en" will hit Table 7-12.),
and packing them would require twice as many constants.
Would the clarification in the description be enough to address your
concerns? Something like (please ignore bad line breaks):
struct ice_fltr_info {
...
/* Rule creation will populate VALUE bit of these members based on switch
* type if their FORCE bit is not set.
*/
u8 lb_en; /* VALUE bit: packet can be looped back */
u8 lan_en; /* VALUE bit: packet can be forwarded to uplink */
};
> #define ICE_FLTR_INFO_LB_LAN_VALUE_M BIT(0)
> #define ICE_FLTR_INFO_LB_LAN_FORCE_M BIT(1)
> #define ICE_FLTR_INFO_LB_LAN_FORCE_ENABLED \
> (FIELD_PREP_CONST(ICE_FLTR_INFO_LB_LAN_VALUE_M, 1) | \
> FIELD_PREP_CONST(ICE_FLTR_INFO_LB_LAN_FORCE_M, 1))
> #define ICE_FLTR_INFO_LB_LAN_FORCE_DISABLED \
> (FIELD_PREP_CONST(ICE_FLTR_INFO_LB_LAN_FORCE_M, 1))
Does this mean you want me to use {1,0} instead of {true,false}?
In ice_fill_sw_info() I'd prefer to keep them as boolean because they are
semantically correct: we're calculating defaults and then we apply them if
specific values are not forced elsewhere. Maybe a comment or docs change
would be more in place? In ICE_FLTR_INFO_LB_LAN_FORCE_{ENABLED,DISABLED},
I used boolean to stay consistent with the ice_fill_sw_info().
But it's not a strong preference. If it's preferable, I'll change it
to {1,0} across the patch.
Thanks!
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-next v2 5/8] ice: update mac, vlan rules when toggling between VEB and VEPA
2025-11-28 8:36 ` Loktionov, Aleksandr
@ 2025-11-28 12:28 ` Jakub Slepecki
2025-12-01 7:41 ` Loktionov, Aleksandr
0 siblings, 1 reply; 18+ messages in thread
From: Jakub Slepecki @ 2025-11-28 12:28 UTC (permalink / raw)
To: Loktionov, Aleksandr, intel-wired-lan@lists.osuosl.org
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Kitszel, Przemyslaw, Nguyen, Anthony L,
michal.swiatkowski@linux.intel.com
On 2025-11-28 9:36, Loktionov, Aleksandr wrote:
> One small suggestion: please include prerequisites in the 0/8 cover letter (e.g., `iproute2` version and that commands need root privileges), so testers don’t miss that.
Roger that; I plan to use following:
---
To reproduce the issue have a E810 ($pfa) connected to another adapter
($pfb), then:
# echo 2 >/sys/class/net/$pfa/device/sriov_numvfs
# ip l set $pfa vf 0 vlan 4
# ip l set $pfa vf 1 vlan 7
# ip l set $pfa_vf0 netns $pfa_vf0_netns up
# ip l set $pfa_vf1 netns $pfa_vf1_netns up
# ip netns exec $pfa_vf0_netns ip a add 10.0.0.1/24 dev $pfa_vf0
# ip netns exec $pfa_vf1_netns ip a add 10.0.0.2/24 dev $pfa_vf1
And for the $pfb:
# echo 2 >/sys/class/net/$pfb/device/sriov_numvfs
# ip l set $pfb vf 0 trust on spoof off vlan 4
# ip l set $pfb vf 1 trust on spoof off vlan 7
# ip l add $br type bridge
# ip l set $pfb_vf0 master $br up
# ip l set $pfb_vf1 master $br up
# ip l set $br up
We expect $pfa_vf0 to be able to reach $pfa_vf1 through the $br on
the link partner. Instead, ARP is unable to resolve 10.0.0.2/24.
ARP request is fine because it's broadcasted and bounces off $br, but
ARP reply is stuck in the internal switch because the destination MAC
matches $pfa_vf0 and filter restricts it to loopback.
In testing I used: ip utility, iproute2-6.1.0, libbpf 1.3.0
---
> Otherwise, the instructions are fine from my side. Please keep my:
>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
>
> Thanks!
Thanks!
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-next v2 4/8] ice: allow overriding lan_en, lb_en in switch
2025-11-28 11:55 ` Jakub Slepecki
@ 2025-12-01 7:37 ` Loktionov, Aleksandr
2025-12-02 13:54 ` Jakub Slepecki
0 siblings, 1 reply; 18+ messages in thread
From: Loktionov, Aleksandr @ 2025-12-01 7:37 UTC (permalink / raw)
To: Slepecki, Jakub, intel-wired-lan@lists.osuosl.org
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Kitszel, Przemyslaw, Nguyen, Anthony L,
michal.swiatkowski@linux.intel.com
> -----Original Message-----
> From: Slepecki, Jakub <jakub.slepecki@intel.com>
> Sent: Friday, November 28, 2025 12:56 PM
> To: Loktionov, Aleksandr <aleksandr.loktionov@intel.com>; intel-wired-
> lan@lists.osuosl.org
> Cc: linux-kernel@vger.kernel.org; netdev@vger.kernel.org; Kitszel,
> Przemyslaw <przemyslaw.kitszel@intel.com>; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; michal.swiatkowski@linux.intel.com
> Subject: Re: [PATCH iwl-next v2 4/8] ice: allow overriding lan_en,
> lb_en in switch
>
> On 2025-11-25 9:59, Loktionov, Aleksandr wrote:
> >> if (fi->flag & ICE_FLTR_TX_ONLY)
> >> - fi->lan_en = false;
> >> + lan_en = false;
> >> + if (!FIELD_GET(ICE_FLTR_INFO_LB_LAN_FORCE_M, fi->lb_en))
> >> + FIELD_MODIFY(ICE_FLTR_INFO_LB_LAN_VALUE_M, &fi->lb_en,
> lb_en);
> >> + if (!FIELD_GET(ICE_FLTR_INFO_LB_LAN_FORCE_M, fi->lan_en))
> >> + FIELD_MODIFY(ICE_FLTR_INFO_LB_LAN_VALUE_M, &fi->lan_en,
> lan_en);
> > fi->lb_en and fi->lan_en are declared as bool in struct
> ice_fltr_info,
> > but you are now treating them as bitfields using FIELD_GET and
> > FIELD_MODIFY.
>
> I don't see what you mean here. Both members are u8 without a bit-
> field declaration. Or do you mean they are used as bool or maybe the
> _en suffix?
>
> > I realize it could be something like:
> > struct ice_fltr_info {
> > ...
> > u8 lb_lan_flags; /* bitfield: value + force */
> > ...
> > };
>
> What I see from this sample is that you want me to: pack them, change
> their name, and change their description. Is this correct?
>
> I fully agree about the description. It's my mistake I left it as-is.
> I'll update it according to the overall changes.
>
> I don't think packing them is worth it. The memory gain is negligible
> and the cost is primarily in readability and consistency: we've always
> had two fields for these with clear responsibility for each, names
> match with datasheet (both "lan en" and "lb en" will hit Table 7-12.),
> and packing them would require twice as many constants.
>
> Would the clarification in the description be enough to address your
> concerns? Something like (please ignore bad line breaks):
>
> struct ice_fltr_info {
> ...
> /* Rule creation will populate VALUE bit of these members based
> on switch
> * type if their FORCE bit is not set.
> */
> u8 lb_en; /* VALUE bit: packet can be looped back */
> u8 lan_en; /* VALUE bit: packet can be forwarded to uplink
> */
> };
>
> > #define ICE_FLTR_INFO_LB_LAN_VALUE_M BIT(0)
> > #define ICE_FLTR_INFO_LB_LAN_FORCE_M BIT(1)
> > #define ICE_FLTR_INFO_LB_LAN_FORCE_ENABLED \
> > (FIELD_PREP_CONST(ICE_FLTR_INFO_LB_LAN_VALUE_M, 1) | \
> > FIELD_PREP_CONST(ICE_FLTR_INFO_LB_LAN_FORCE_M, 1)) #define
> > ICE_FLTR_INFO_LB_LAN_FORCE_DISABLED \
> > (FIELD_PREP_CONST(ICE_FLTR_INFO_LB_LAN_FORCE_M, 1))
>
> Does this mean you want me to use {1,0} instead of {true,false}?
>
> In ice_fill_sw_info() I'd prefer to keep them as boolean because they
> are semantically correct: we're calculating defaults and then we apply
> them if specific values are not forced elsewhere. Maybe a comment or
> docs change would be more in place? In
> ICE_FLTR_INFO_LB_LAN_FORCE_{ENABLED,DISABLED},
> I used boolean to stay consistent with the ice_fill_sw_info().
>
> But it's not a strong preference. If it's preferable, I'll change it
> to {1,0} across the patch.
>
> Thanks!
For u8 fields if they are used as u8 value (not bit fields) using FIELD_ macros not good.
What about compromise:
- Keep lan_en and lb_en as bool or u8 with clear comments.
- Do NOT use FIELD macros unless these fields are truly packed bitfields.
- If FORCE/ VALUE semantics are needed, either:
+Introduce a dedicated flags field with proper bitmask macros, OR
+Keep separate fields and handle FORCE logic explicitly in code without FIELD macros.
And handle FORCE logic explicitly:
if (!force_lb)
fi->lb_en = lb_en;
if (!force_lan)
fi->lan_en = lan_en;
?
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-next v2 5/8] ice: update mac, vlan rules when toggling between VEB and VEPA
2025-11-28 12:28 ` Jakub Slepecki
@ 2025-12-01 7:41 ` Loktionov, Aleksandr
0 siblings, 0 replies; 18+ messages in thread
From: Loktionov, Aleksandr @ 2025-12-01 7:41 UTC (permalink / raw)
To: Slepecki, Jakub, intel-wired-lan@lists.osuosl.org
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Kitszel, Przemyslaw, Nguyen, Anthony L,
michal.swiatkowski@linux.intel.com
> -----Original Message-----
> From: Slepecki, Jakub <jakub.slepecki@intel.com>
> Sent: Friday, November 28, 2025 1:29 PM
> To: Loktionov, Aleksandr <aleksandr.loktionov@intel.com>; intel-wired-
> lan@lists.osuosl.org
> Cc: linux-kernel@vger.kernel.org; netdev@vger.kernel.org; Kitszel,
> Przemyslaw <przemyslaw.kitszel@intel.com>; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; michal.swiatkowski@linux.intel.com
> Subject: Re: [PATCH iwl-next v2 5/8] ice: update mac,vlan rules when
> toggling between VEB and VEPA
>
> On 2025-11-28 9:36, Loktionov, Aleksandr wrote:
> > One small suggestion: please include prerequisites in the 0/8 cover
> letter (e.g., `iproute2` version and that commands need root
> privileges), so testers don’t miss that.
>
> Roger that; I plan to use following:
>
> ---
> To reproduce the issue have a E810 ($pfa) connected to another adapter
> ($pfb), then:
>
> # echo 2 >/sys/class/net/$pfa/device/sriov_numvfs
> # ip l set $pfa vf 0 vlan 4
> # ip l set $pfa vf 1 vlan 7
> # ip l set $pfa_vf0 netns $pfa_vf0_netns up
> # ip l set $pfa_vf1 netns $pfa_vf1_netns up
> # ip netns exec $pfa_vf0_netns ip a add 10.0.0.1/24 dev $pfa_vf0
> # ip netns exec $pfa_vf1_netns ip a add 10.0.0.2/24 dev $pfa_vf1
>
> And for the $pfb:
>
> # echo 2 >/sys/class/net/$pfb/device/sriov_numvfs
> # ip l set $pfb vf 0 trust on spoof off vlan 4
> # ip l set $pfb vf 1 trust on spoof off vlan 7
> # ip l add $br type bridge
> # ip l set $pfb_vf0 master $br up
> # ip l set $pfb_vf1 master $br up
> # ip l set $br up
>
> We expect $pfa_vf0 to be able to reach $pfa_vf1 through the $br on the
> link partner. Instead, ARP is unable to resolve 10.0.0.2/24.
> ARP request is fine because it's broadcasted and bounces off $br, but
> ARP reply is stuck in the internal switch because the destination MAC
> matches $pfa_vf0 and filter restricts it to loopback.
>
> In testing I used: ip utility, iproute2-6.1.0, libbpf 1.3.0
> ---
>
> > Otherwise, the instructions are fine from my side. Please keep my:
> >
> > Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
> >
> > Thanks!
>
> Thanks!
Good day Jakub,
Thanks for sharing the reproduction steps and clarifying the environment details.\
Including prerequisites like iproute2 version and root privileges in the cover letter is a good idea—it helps testers avoid subtle issues.
Reviewed-by stays valid from my side.
Best regards,
Alex
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Intel-wired-lan] [PATCH iwl-next v2 4/8] ice: allow overriding lan_en, lb_en in switch
2025-12-01 7:37 ` Loktionov, Aleksandr
@ 2025-12-02 13:54 ` Jakub Slepecki
0 siblings, 0 replies; 18+ messages in thread
From: Jakub Slepecki @ 2025-12-02 13:54 UTC (permalink / raw)
To: Loktionov, Aleksandr, intel-wired-lan@lists.osuosl.org
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
Kitszel, Przemyslaw, Nguyen, Anthony L,
michal.swiatkowski@linux.intel.com
On 2025-12-01 8:37, Loktionov, Aleksandr wrote:
> For u8 fields if they are used as u8 value (not bit fields) using FIELD_ macros not good.
> What about compromise:
> - Keep lan_en and lb_en as bool or u8 with clear comments.
> - Do NOT use FIELD macros unless these fields are truly packed bitfields.
After patch, lan_en and lb_en are always dealt with via FIELD_ macros.
The confusing part could be in ice_fill_sw_info():
+ bool lan_en = false;
+ bool lb_en = false;
Where throughout the function we decide on VALUE for each (stored as bool
lan_en and bool lb_en), and only then we apply it:
+ if (!FIELD_GET(ICE_FLTR_INFO_LB_LAN_FORCE_M, fi->lb_en))
+ FIELD_MODIFY(ICE_FLTR_INFO_LB_LAN_VALUE_M, &fi->lb_en, lb_en);
+ if (!FIELD_GET(ICE_FLTR_INFO_LB_LAN_FORCE_M, fi->lan_en))
+ FIELD_MODIFY(ICE_FLTR_INFO_LB_LAN_VALUE_M, &fi->lan_en, lan_en);
I could tweak names of the variables or maybe hold them as u8:
static void ice_fill_sw_info(struct ice_hw *hw, struct ice_fltr_info *fi)
{
u8 lan_en = fi->lan_en;
u8 lb_en = fi->lb_en;
...
FIELD_MODIFY(ICE_FLTR_INFO_LB_LAN_VALUE_M, &lb_en, true);
...
if (!FIELD_GET(ICE_FLTR_INFO_LB_LAN_FORCE_M, lb_en))
fi->lb_en = lb_en;
}
Or s/true/1/g per previous discussion.
This seems better at expressing the "tmp -> decide -> commit" than the
current version. See draft patch at the bottom.
> - If FORCE/ VALUE semantics are needed, either:
> +Introduce a dedicated flags field with proper bitmask macros, OR
I addressed this option in my previous response. Let's not exclude
it yet, but since there are still some alternatives I would prefer to
avoid it.
> +Keep separate fields and handle FORCE logic explicitly in code without FIELD macros.
>
> And handle FORCE logic explicitly:
>
> if (!force_lb)
> fi->lb_en = lb_en;
> if (!force_lan)
> fi->lan_en = lan_en;
>
> ?
I intend to force values in 8/8 in ice_fltr.c in
ice_fltr_add_macs_to_list(). Decision is made based on:
1. whether MAC is multicast or unicast,
2. whether VSI has PVID, and
3. whether VSI has VLAN 0.
There are also implicit conditions, because ice_fltr_add_macs_to_list()
is only called in particular cases after some expected changes in overall
driver state; compared to ice_fill_sw_info():
4. filter is being created,
5. filter is MAC or MAC,VLAN,
6. target is guaranteed to be a single VSI, and
7. VLAN filters are guaranteed to be already created.
I'm reluctant to move decision-making to ice_fill_sw_info(), because
of these implicit conditions (and possibly more; each would need to
be proven). Overall, I see two meaningful options (with some variants):
a. In ice_fill_sw_info(), reconstruct all needed information (1-3 from
*hw + *fi) and make the decision,
b. Before ice_fill_sw_info(), make the decision and store it, then use
the result in ice_fill_sw_info().
FORCE is (b). I chose it because it seemed to be overall cheapest
(LOC, memory use, number of operations) and (subjective) semantically
correct (ice_fltr.c is responsible for requesting filters for a VSI;
ice_fill_sw_info() is responsible for populating defaults).
We could also go all the way in the other direction:
struct ice_fltr_info {
...
bool lan_en;
bool force_lan_en;
bool lb_en;
bool force_lb_en;
};
? (or s/bool/u8/)
Current working draft:
-- >8 --
Subject: [PATCH iwl-next v2 4/8] ice: allow overriding lan_en, lb_en in switch
Currently, lan_en and lb_en are determined based on switching mode,
destination MAC, and the lookup type, action type and flags of the rule
in question. This gives little to no options for the user (such as
ice_fltr.c) to enforce rules to behave in a specific way.
Such functionality is needed to work with pairs of rules, for example,
when handling MAC forward to LAN together with MAC,VLAN forward to
loopback rules pair. This case could not be easily deduced in a context
of a single filter without adding a specialized flag.
Instead of adding a specialized flag to mark special scenario rules,
we add a slightly more generic flag to the lan_en and lb_en themselves
for the ice_fltr.c to request specific destination flags later on, for
example, to override value:
struct ice_fltr_info fi;
fi.lb_en = ICE_FLTR_INFO_LB_LAN_FORCE_ENABLED;
fi.lan_en = ICE_FLTR_INFO_LB_LAN_FORCE_DISABLED;
Signed-off-by: Jakub Slepecki <jakub.slepecki@intel.com>
---
drivers/net/ethernet/intel/ice/ice_switch.c | 27 ++++++++++++++-------
drivers/net/ethernet/intel/ice/ice_switch.h | 19 ++++++++++++---
2 files changed, 34 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c
index 04e5d653efce..3896edaa8652 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.c
+++ b/drivers/net/ethernet/intel/ice/ice_switch.c
@@ -2534,12 +2534,14 @@ int ice_get_initial_sw_cfg(struct ice_hw *hw)
*
* This helper function populates the lb_en and lan_en elements of the provided
* ice_fltr_info struct using the switch's type and characteristics of the
- * switch rule being configured.
+ * switch rule being configured. Elements are updated only if their FORCE bit
+ * is not set.
*/
static void ice_fill_sw_info(struct ice_hw *hw, struct ice_fltr_info *fi)
{
- fi->lb_en = false;
- fi->lan_en = false;
+ u8 lan_en = fi->lan_en;
+ u8 lb_en = fi->lb_en;
+
if ((fi->flag & ICE_FLTR_TX) &&
(fi->fltr_act == ICE_FWD_TO_VSI ||
fi->fltr_act == ICE_FWD_TO_VSI_LIST ||
@@ -2549,7 +2551,8 @@ static void ice_fill_sw_info(struct ice_hw *hw, struct ice_fltr_info *fi)
* packets to the internal switch that will be dropped.
*/
if (fi->lkup_type != ICE_SW_LKUP_VLAN)
- fi->lb_en = true;
+ FIELD_MODIFY(ICE_FLTR_INFO_LB_LAN_VALUE_M, &lb_en,
+ true);
/* Set lan_en to TRUE if
* 1. The switch is a VEB AND
@@ -2578,14 +2581,20 @@ static void ice_fill_sw_info(struct ice_hw *hw, struct ice_fltr_info *fi)
!is_unicast_ether_addr(fi->l_data.mac.mac_addr)) ||
(fi->lkup_type == ICE_SW_LKUP_MAC_VLAN &&
!is_unicast_ether_addr(fi->l_data.mac.mac_addr)))
- fi->lan_en = true;
+ FIELD_MODIFY(ICE_FLTR_INFO_LB_LAN_VALUE_M,
+ &lan_en, true);
} else {
- fi->lan_en = true;
+ FIELD_MODIFY(ICE_FLTR_INFO_LB_LAN_VALUE_M, &lan_en,
+ true);
}
}
if (fi->flag & ICE_FLTR_TX_ONLY)
- fi->lan_en = false;
+ FIELD_MODIFY(ICE_FLTR_INFO_LB_LAN_VALUE_M, &lan_en, false);
+ if (!FIELD_GET(ICE_FLTR_INFO_LB_LAN_FORCE_M, lb_en))
+ fi->lb_en = lb_en;
+ if (!FIELD_GET(ICE_FLTR_INFO_LB_LAN_FORCE_M, lan_en))
+ fi->lan_en = lan_en;
}
/**
@@ -2669,9 +2678,9 @@ ice_fill_sw_rule(struct ice_hw *hw, struct ice_fltr_info *f_info,
return;
}
- if (f_info->lb_en)
+ if (FIELD_GET(ICE_FLTR_INFO_LB_LAN_VALUE_M, f_info->lb_en))
act |= ICE_SINGLE_ACT_LB_ENABLE;
- if (f_info->lan_en)
+ if (FIELD_GET(ICE_FLTR_INFO_LB_LAN_VALUE_M, f_info->lan_en))
act |= ICE_SINGLE_ACT_LAN_ENABLE;
switch (f_info->lkup_type) {
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.h b/drivers/net/ethernet/intel/ice/ice_switch.h
index 671d7a5f359f..e421c562626c 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.h
+++ b/drivers/net/ethernet/intel/ice/ice_switch.h
@@ -72,6 +72,14 @@ enum ice_src_id {
ICE_SRC_ID_LPORT,
};
+#define ICE_FLTR_INFO_LB_LAN_VALUE_M BIT(0)
+#define ICE_FLTR_INFO_LB_LAN_FORCE_M BIT(1)
+#define ICE_FLTR_INFO_LB_LAN_FORCE_ENABLED \
+ (FIELD_PREP_CONST(ICE_FLTR_INFO_LB_LAN_VALUE_M, true) | \
+ FIELD_PREP_CONST(ICE_FLTR_INFO_LB_LAN_FORCE_M, true))
+#define ICE_FLTR_INFO_LB_LAN_FORCE_DISABLED \
+ (FIELD_PREP_CONST(ICE_FLTR_INFO_LB_LAN_FORCE_M, true))
+
struct ice_fltr_info {
/* Look up information: how to look up packet */
enum ice_sw_lkup_type lkup_type;
@@ -131,9 +139,14 @@ struct ice_fltr_info {
*/
u8 qgrp_size;
- /* Rule creations populate these indicators basing on the switch type */
- u8 lb_en; /* Indicate if packet can be looped back */
- u8 lan_en; /* Indicate if packet can be forwarded to the uplink */
+ /* Following members have two bits: VALUE and FORCE. Rule creation will
+ * populate VALUE bit of these members based on switch type, but only if
+ * their FORCE bit is not set.
+ *
+ * See ICE_FLTR_INFO_LB_LAN_VALUE_M and ICE_FLTR_INFO_LB_LAN_FORCE_M.
+ */
+ u8 lb_en; /* VALUE bit: packet can be looped back */
+ u8 lan_en; /* VALUE bit: packet can be forwarded to the uplink */
};
struct ice_update_recipe_lkup_idx_params {
--
2.43.0
^ permalink raw reply related [flat|nested] 18+ messages in thread
end of thread, other threads:[~2025-12-02 13:54 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-25 8:34 [Intel-wired-lan] [PATCH iwl-next v2 0/8] ice: in VEB, prevent "cross-vlan" traffic Jakub Slepecki
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 1/8] ice: in dvm, use outer VLAN in MAC, VLAN lookup Jakub Slepecki
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 2/8] ice: allow creating mac, vlan filters along mac filters Jakub Slepecki
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 3/8] ice: do not check for zero mac when creating " Jakub Slepecki
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 4/8] ice: allow overriding lan_en, lb_en in switch Jakub Slepecki
2025-11-25 8:59 ` Loktionov, Aleksandr
2025-11-28 11:55 ` Jakub Slepecki
2025-12-01 7:37 ` Loktionov, Aleksandr
2025-12-02 13:54 ` Jakub Slepecki
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 5/8] ice: update mac, vlan rules when toggling between VEB and VEPA Jakub Slepecki
2025-11-25 8:52 ` Loktionov, Aleksandr
2025-11-28 8:29 ` Jakub Slepecki
2025-11-28 8:36 ` Loktionov, Aleksandr
2025-11-28 12:28 ` Jakub Slepecki
2025-12-01 7:41 ` Loktionov, Aleksandr
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 6/8] ice: add functions to query for vsi's pvids Jakub Slepecki
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 7/8] ice: add mac vlan to filter API Jakub Slepecki
2025-11-25 8:34 ` [Intel-wired-lan] [PATCH iwl-next v2 8/8] ice: in VEB, prevent "cross-vlan" traffic from hitting loopback Jakub Slepecki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).