mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
Add support for 802.1ad (QinQ tunneling)
Flow key handling changes: - Add VLAN header array in struct flow, to record multiple 802.1q VLAN headers. - Add dpif multi-VLAN capability probing. If datapath supports multi-VLAN, increase the maximum depth of nested OVS_KEY_ATTR_ENCAP. Refactor VLAN handling in dpif-xlate: - Introduce 'xvlan' to track VLAN stack during flow processing. - Input and output VLAN translation according to the xbundle type. Push VLAN action support: - Allow ethertype 0x88a8 in VLAN headers and push_vlan action. - Support push_vlan on dot1q packets. Use other_config:vlan-limit in table Open_vSwitch to limit maximum VLANs that can be matched. This allows us to preserve backwards compatibility. Add test cases for VLAN depth limit, Multi-VLAN actions and QinQ VLAN handling Co-authored-by: Thomas F Herbert <thomasfherbert@gmail.com> Signed-off-by: Thomas F Herbert <thomasfherbert@gmail.com> Co-authored-by: Xiao Liang <shaw.leon@gmail.com> Signed-off-by: Xiao Liang <shaw.leon@gmail.com> Signed-off-by: Eric Garver <e@erig.me> Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
@@ -68,7 +68,7 @@ struct vl_mff_map;
|
||||
OFPACT(SET_VLAN_VID, ofpact_vlan_vid, ofpact, "set_vlan_vid") \
|
||||
OFPACT(SET_VLAN_PCP, ofpact_vlan_pcp, ofpact, "set_vlan_pcp") \
|
||||
OFPACT(STRIP_VLAN, ofpact_null, ofpact, "strip_vlan") \
|
||||
OFPACT(PUSH_VLAN, ofpact_null, ofpact, "push_vlan") \
|
||||
OFPACT(PUSH_VLAN, ofpact_push_vlan, ofpact, "push_vlan") \
|
||||
OFPACT(SET_ETH_SRC, ofpact_mac, ofpact, "mod_dl_src") \
|
||||
OFPACT(SET_ETH_DST, ofpact_mac, ofpact, "mod_dl_dst") \
|
||||
OFPACT(SET_IPV4_SRC, ofpact_ipv4, ofpact, "mod_nw_src") \
|
||||
@@ -390,6 +390,14 @@ struct ofpact_vlan_pcp {
|
||||
bool flow_has_vlan; /* VLAN present at action validation time? */
|
||||
};
|
||||
|
||||
/* OFPACT_PUSH_VLAN.
|
||||
*
|
||||
* Used for OFPAT11_PUSH_VLAN. */
|
||||
struct ofpact_push_vlan {
|
||||
struct ofpact ofpact;
|
||||
ovs_be16 ethertype;
|
||||
};
|
||||
|
||||
/* OFPACT_SET_ETH_SRC, OFPACT_SET_ETH_DST.
|
||||
*
|
||||
* Used for OFPAT10_SET_DL_SRC, OFPAT10_SET_DL_DST. */
|
||||
|
Reference in New Issue
Block a user