public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v1 0/2] virtchnl/ice: add IEEE 802.1ah (0x88E7) VLAN ethertype support
@ 2026-03-18  8:07 Aleksandr Loktionov
  2026-03-18  8:07 ` [PATCH net-next v1 1/2] virtchnl: add VIRTCHNL_VLAN_ETHERTYPE_88E7 support Aleksandr Loktionov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Aleksandr Loktionov @ 2026-03-18  8:07 UTC (permalink / raw)
  To: intel-wired-lan, anthony.l.nguyen, aleksandr.loktionov; +Cc: netdev

IEEE 802.1ah (Provider Backbone Bridging) defines the Backbone Service
Tag (B-TAG) with ethertype 0x88E7. In environments that combine Provider
Backbone Bridging with virtualisation, VFs may receive or transmit frames
carrying a B-TAG and need to install matching VLAN filters on the PF.

The existing virtchnl VLAN v2 capability handshake (via
VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS) has dedicated bitmask entries for
each supported ethertype (0x8100, 0x88A8, 0x9100) but lacked one for
0x88E7, making it impossible for a VF driver to advertise or negotiate
B-TAG support.

This series adds the missing capability flag and wires up the three
software-path checks in the ice PF driver that guard VLAN filter
installation:

  Patch 1 adds VIRTCHNL_VLAN_ETHERTYPE_88E7 = BIT(3) to the shared
  virtchnl_vlan_support enum in include/linux/avf/virtchnl.h.

  Patch 2 updates ice's TC TPID validation, VSI VLAN filter validation,
  and the bidirectional virtchnl VLAN v2 translation functions to
  accept/translate ETH_P_8021AH (0x88E7).

No hardware offload changes, no datapath modifications.

Tested on E810 with an iavf VF requesting 0x88E7-tagged VLAN filters:
  Verified that a TC flower rule matching on VLAN TPID 0x88E7 is now
  accepted and offloaded by the driver without returning -EINVAL:

    tc qdisc add dev $VF clsact
    tc filter add dev $VF ingress protocol 802.1Q flower \
        vlan_ethtype 0x88e7 action pass
    # (previously: Error: Failed to offload TC filter - vlan_type was 0)

  Also verified VF transparent passthrough of triple-tagged frames with
  0x88E7 as middle and innermost tag using scapy on a back-to-back E810
  pair (kernel 6.19.0-rc8+, FW 4.91, ICE Triple VLAN Comms DDP 1.3.88.88).

Aleksandr Loktionov (2):
  virtchnl: add VIRTCHNL_VLAN_ETHERTYPE_88E7 support
  ice: add 0x88E7 handling to SW validation paths

 drivers/net/ethernet/intel/ice/ice_tc_lib.c       | 1 +
 drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.c | 3 ++-
 drivers/net/ethernet/intel/ice/virt/virtchnl.c    | 6 ++++++
 include/linux/avf/virtchnl.h                      | 1 +
 4 files changed, 10 insertions(+), 1 deletion(-)

-- 
2.52.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH net-next v1 1/2] virtchnl: add VIRTCHNL_VLAN_ETHERTYPE_88E7 support
  2026-03-18  8:07 [PATCH net-next v1 0/2] virtchnl/ice: add IEEE 802.1ah (0x88E7) VLAN ethertype support Aleksandr Loktionov
@ 2026-03-18  8:07 ` Aleksandr Loktionov
  2026-03-18  8:07 ` [PATCH net-next v1 2/2] ice: add 0x88E7 handling to SW validation paths Aleksandr Loktionov
  2026-03-19 17:11 ` [PATCH net-next v1 0/2] virtchnl/ice: add IEEE 802.1ah (0x88E7) VLAN ethertype support Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Aleksandr Loktionov @ 2026-03-18  8:07 UTC (permalink / raw)
  To: intel-wired-lan, anthony.l.nguyen, aleksandr.loktionov; +Cc: netdev

IEEE 802.1ah (Provider Backbone Bridging) uses ethertype 0x88E7 as the
Backbone Service Tag (B-TAG). Some deployments stack 802.1ah on top of
existing QinQ or single-tagged VLAN infrastructure, creating scenarios
where a VF needs to negotiate support for the 0x88E7 ethertype with the
PF in order to install correct VLAN filters.

Add VIRTCHNL_VLAN_ETHERTYPE_88E7 = BIT(3) to the virtchnl_vlan_support
capability bitmask so that VF drivers can advertise and negotiate 0x88E7
VLAN ethertype support through the existing VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS
handshake.

The new bit follows the established BIT(N) pattern of the enum and does
not conflict with any existing flag.

Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
---
 include/linux/avf/virtchnl.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/avf/virtchnl.h b/include/linux/avf/virtchnl.h
index 11bdab5..511c882 100644
--- a/include/linux/avf/virtchnl.h
+++ b/include/linux/avf/virtchnl.h
@@ -636,6 +636,7 @@ enum virtchnl_vlan_support {
 	VIRTCHNL_VLAN_ETHERTYPE_8100 =		BIT(0),
 	VIRTCHNL_VLAN_ETHERTYPE_88A8 =		BIT(1),
 	VIRTCHNL_VLAN_ETHERTYPE_9100 =		BIT(2),
+	VIRTCHNL_VLAN_ETHERTYPE_88E7 =		BIT(3),
 	VIRTCHNL_VLAN_TAG_LOCATION_L2TAG1 =	BIT(8),
 	VIRTCHNL_VLAN_TAG_LOCATION_L2TAG2 =	BIT(9),
 	VIRTCHNL_VLAN_TAG_LOCATION_L2TAG2_2 =	BIT(10),
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH net-next v1 2/2] ice: add 0x88E7 handling to SW validation paths
  2026-03-18  8:07 [PATCH net-next v1 0/2] virtchnl/ice: add IEEE 802.1ah (0x88E7) VLAN ethertype support Aleksandr Loktionov
  2026-03-18  8:07 ` [PATCH net-next v1 1/2] virtchnl: add VIRTCHNL_VLAN_ETHERTYPE_88E7 support Aleksandr Loktionov
@ 2026-03-18  8:07 ` Aleksandr Loktionov
  2026-03-19 17:11 ` [PATCH net-next v1 0/2] virtchnl/ice: add IEEE 802.1ah (0x88E7) VLAN ethertype support Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Aleksandr Loktionov @ 2026-03-18  8:07 UTC (permalink / raw)
  To: intel-wired-lan, anthony.l.nguyen, aleksandr.loktionov; +Cc: netdev

The virtchnl v2 VLAN capability handshake now includes the new
VIRTCHNL_VLAN_ETHERTYPE_88E7 flag for IEEE 802.1ah B-TAG support.
Wire up the corresponding software-path handling in ice so the PF
correctly accepts and translates 0x88E7 (ETH_P_8021AH) VLAN filters
requested by VFs.

Three software-only changes, no hardware offload path affected:

 - ice_check_supported_vlan_tpid() (ice_tc_lib.c): accept ETH_P_8021AH
   in the TC VLAN TPID validation switch so 0x88E7-tagged flower filters
   are not rejected early.

 - validate_vlan() (ice_vsi_vlan_lib.c): allow ETH_P_8021AH as a valid
   TPID when adding VLAN filters to a VSI, consistent with the other
   accepted dot1q/dot1ad/QinQ1 TPIDs.

 - ice_vc_validate_vlan_tpid() / ice_vc_get_tpid() (virt/virtchnl.c):
   bidirectional translation between ETH_P_8021AH and
   VIRTCHNL_VLAN_ETHERTYPE_88E7 in the virtchnl VLAN v2 filter path.

This does not add 0x88E7 hardware offload capability, does not change
outer-tag programming, and does not alter any datapath.

Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
---
 drivers/net/ethernet/intel/ice/ice_tc_lib.c       | 1 +
 drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.c | 3 ++-
 drivers/net/ethernet/intel/ice/virt/virtchnl.c    | 6 ++++++
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_tc_lib.c b/drivers/net/ethernet/intel/ice/ice_tc_lib.c
index d20357c..4560e55 100644
--- a/drivers/net/ethernet/intel/ice/ice_tc_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_tc_lib.c
@@ -174,6 +174,7 @@ static u16 ice_check_supported_vlan_tpid(u16 vlan_tpid)
 	case ETH_P_8021Q:
 	case ETH_P_8021AD:
 	case ETH_P_QINQ1:
+	case ETH_P_8021AH:
 		return vlan_tpid;
 	default:
 		return 0;
diff --git a/drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.c b/drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.c
index 5498496..b67272e 100644
--- a/drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_vsi_vlan_lib.c
@@ -24,7 +24,8 @@ static void print_invalid_tpid(struct ice_vsi *vsi, u16 tpid)
 static bool validate_vlan(struct ice_vsi *vsi, struct ice_vlan *vlan)
 {
 	if (vlan->tpid != ETH_P_8021Q && vlan->tpid != ETH_P_8021AD &&
-	    vlan->tpid != ETH_P_QINQ1 && (vlan->tpid || vlan->vid)) {
+	    vlan->tpid != ETH_P_QINQ1 && vlan->tpid != ETH_P_8021AH &&
+	    (vlan->tpid || vlan->vid)) {
 		print_invalid_tpid(vsi, vlan->tpid);
 		return false;
 	}
diff --git a/drivers/net/ethernet/intel/ice/virt/virtchnl.c b/drivers/net/ethernet/intel/ice/virt/virtchnl.c
index ca8018e..06d2f9b 100644
--- a/drivers/net/ethernet/intel/ice/virt/virtchnl.c
+++ b/drivers/net/ethernet/intel/ice/virt/virtchnl.c
@@ -1702,6 +1702,9 @@ static bool ice_vc_validate_vlan_tpid(u16 filtering_caps, u16 tpid)
 	case ETH_P_QINQ1:
 		vlan_ethertype = VIRTCHNL_VLAN_ETHERTYPE_9100;
 		break;
+	case ETH_P_8021AH:
+		vlan_ethertype = VIRTCHNL_VLAN_ETHERTYPE_88E7;
+		break;
 	}
 
 	if (!(filtering_caps & vlan_ethertype))
@@ -2136,6 +2139,9 @@ static int ice_vc_get_tpid(u32 ethertype_setting, u16 *tpid)
 	case VIRTCHNL_VLAN_ETHERTYPE_9100:
 		*tpid = ETH_P_QINQ1;
 		break;
+	case VIRTCHNL_VLAN_ETHERTYPE_88E7:
+		*tpid = ETH_P_8021AH;
+		break;
 	default:
 		*tpid = 0;
 		return -EINVAL;
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next v1 0/2] virtchnl/ice: add IEEE 802.1ah (0x88E7) VLAN ethertype support
  2026-03-18  8:07 [PATCH net-next v1 0/2] virtchnl/ice: add IEEE 802.1ah (0x88E7) VLAN ethertype support Aleksandr Loktionov
  2026-03-18  8:07 ` [PATCH net-next v1 1/2] virtchnl: add VIRTCHNL_VLAN_ETHERTYPE_88E7 support Aleksandr Loktionov
  2026-03-18  8:07 ` [PATCH net-next v1 2/2] ice: add 0x88E7 handling to SW validation paths Aleksandr Loktionov
@ 2026-03-19 17:11 ` Simon Horman
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2026-03-19 17:11 UTC (permalink / raw)
  To: Aleksandr Loktionov; +Cc: intel-wired-lan, anthony.l.nguyen, netdev

On Wed, Mar 18, 2026 at 09:07:34AM +0100, Aleksandr Loktionov wrote:
> IEEE 802.1ah (Provider Backbone Bridging) defines the Backbone Service
> Tag (B-TAG) with ethertype 0x88E7. In environments that combine Provider
> Backbone Bridging with virtualisation, VFs may receive or transmit frames
> carrying a B-TAG and need to install matching VLAN filters on the PF.
> 
> The existing virtchnl VLAN v2 capability handshake (via
> VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS) has dedicated bitmask entries for
> each supported ethertype (0x8100, 0x88A8, 0x9100) but lacked one for
> 0x88E7, making it impossible for a VF driver to advertise or negotiate
> B-TAG support.
> 
> This series adds the missing capability flag and wires up the three
> software-path checks in the ice PF driver that guard VLAN filter
> installation:
> 
>   Patch 1 adds VIRTCHNL_VLAN_ETHERTYPE_88E7 = BIT(3) to the shared
>   virtchnl_vlan_support enum in include/linux/avf/virtchnl.h.
> 
>   Patch 2 updates ice's TC TPID validation, VSI VLAN filter validation,
>   and the bidirectional virtchnl VLAN v2 translation functions to
>   accept/translate ETH_P_8021AH (0x88E7).
> 
> No hardware offload changes, no datapath modifications.
> 
> Tested on E810 with an iavf VF requesting 0x88E7-tagged VLAN filters:
>   Verified that a TC flower rule matching on VLAN TPID 0x88E7 is now
>   accepted and offloaded by the driver without returning -EINVAL:
> 
>     tc qdisc add dev $VF clsact
>     tc filter add dev $VF ingress protocol 802.1Q flower \
>         vlan_ethtype 0x88e7 action pass
>     # (previously: Error: Failed to offload TC filter - vlan_type was 0)
> 
>   Also verified VF transparent passthrough of triple-tagged frames with
>   0x88E7 as middle and innermost tag using scapy on a back-to-back E810
>   pair (kernel 6.19.0-rc8+, FW 4.91, ICE Triple VLAN Comms DDP 1.3.88.88).
> 
> Aleksandr Loktionov (2):
>   virtchnl: add VIRTCHNL_VLAN_ETHERTYPE_88E7 support
>   ice: add 0x88E7 handling to SW validation paths

For the series:

Reviewed-by: Simon Horman <horms@kernel.org>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-19 17:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-18  8:07 [PATCH net-next v1 0/2] virtchnl/ice: add IEEE 802.1ah (0x88E7) VLAN ethertype support Aleksandr Loktionov
2026-03-18  8:07 ` [PATCH net-next v1 1/2] virtchnl: add VIRTCHNL_VLAN_ETHERTYPE_88E7 support Aleksandr Loktionov
2026-03-18  8:07 ` [PATCH net-next v1 2/2] ice: add 0x88E7 handling to SW validation paths Aleksandr Loktionov
2026-03-19 17:11 ` [PATCH net-next v1 0/2] virtchnl/ice: add IEEE 802.1ah (0x88E7) VLAN ethertype support Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox