From: Jakub Slepecki <jakub.slepecki@intel.com>
To: intel-wired-lan@lists.osuosl.org
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
przemyslaw.kitszel@intel.com, anthony.l.nguyen@intel.com,
michal.swiatkowski@linux.intel.com, jakub.slepecki@intel.com,
aleksandr.loktionov@intel.com
Subject: [PATCH iwl-next v4 1/7] ice: in dvm, use outer VLAN in MAC,VLAN lookup
Date: Wed, 4 Feb 2026 16:44:12 +0100 [thread overview]
Message-ID: <20260204154418.1285309-2-jakub.slepecki@intel.com> (raw)
In-Reply-To: <20260204154418.1285309-1-jakub.slepecki@intel.com>
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 v4.
No changes in v3.
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
next prev parent reply other threads:[~2026-02-04 15:44 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-04 15:44 [PATCH iwl-next v4 0/7] ice: in VEB, prevent "cross-vlan" traffic Jakub Slepecki
2026-02-04 15:44 ` Jakub Slepecki [this message]
2026-03-02 17:35 ` [Intel-wired-lan] [PATCH iwl-next v4 1/7] ice: in dvm, use outer VLAN in MAC, VLAN lookup Romanowski, Rafal
2026-02-04 15:44 ` [PATCH iwl-next v4 2/7] ice: allow creating mac,vlan filters along mac filters Jakub Slepecki
2026-03-02 17:36 ` [Intel-wired-lan] [PATCH iwl-next v4 2/7] ice: allow creating mac, vlan " Romanowski, Rafal
2026-02-04 15:44 ` [PATCH iwl-next v4 3/7] ice: allow overriding lan_en, lb_en in switch Jakub Slepecki
2026-03-02 17:37 ` [Intel-wired-lan] " Romanowski, Rafal
2026-02-04 15:44 ` [PATCH iwl-next v4 4/7] ice: update mac,vlan rules when toggling between VEB and VEPA Jakub Slepecki
2026-03-02 17:38 ` [Intel-wired-lan] [PATCH iwl-next v4 4/7] ice: update mac, vlan " Romanowski, Rafal
2026-02-04 15:44 ` [PATCH iwl-next v4 5/7] ice: add functions to query for vsi's pvids Jakub Slepecki
2026-03-02 17:39 ` [Intel-wired-lan] " Romanowski, Rafal
2026-02-04 15:44 ` [PATCH iwl-next v4 6/7] ice: add mac vlan to filter API Jakub Slepecki
2026-03-02 17:39 ` [Intel-wired-lan] " Romanowski, Rafal
2026-02-04 15:44 ` [PATCH iwl-next v4 7/7] ice: in VEB, prevent "cross-vlan" traffic from hitting loopback Jakub Slepecki
2026-03-02 17:40 ` [Intel-wired-lan] " Romanowski, Rafal
2026-02-27 13:51 ` [Intel-wired-lan] [PATCH iwl-next v4 0/7] ice: in VEB, prevent "cross-vlan" traffic Romanowski, Rafal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260204154418.1285309-2-jakub.slepecki@intel.com \
--to=jakub.slepecki@intel.com \
--cc=aleksandr.loktionov@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.swiatkowski@linux.intel.com \
--cc=netdev@vger.kernel.org \
--cc=przemyslaw.kitszel@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox