From: Jacob Tanenbaum <[email protected]> documentation in OVN-NB in Logical_Switch_Port for Ethtype references incorrect values
"Supported values: 802.11q (default), 802.11ad." This should be 802.1q and 802.1ad. Correct this in the code and documentation. For now I logged as a warning that the incorrect value is used and maybe in the future the incorrect value could be removed. Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2023-December/052836.html Fixes: 50f4ea011622 ("Support 802.11ad EthType for localnet ports") Submitted-at: https://github.com/ovn-org/ovn/pull/229 Signed-off-by: Jacob Tanenbaum <[email protected]> Signed-off-by: Dumitru Ceara <[email protected]> --- controller/physical.c | 25 ++++++++++++++++++------- ovn-nb.xml | 2 +- tests/ovn.at | 2 +- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/controller/physical.c b/controller/physical.c index ba88e1d8b4..eda0854410 100644 --- a/controller/physical.c +++ b/controller/physical.c @@ -703,22 +703,33 @@ put_replace_chassis_mac_flows(const struct simap *ct_zones, } } -#define VLAN_80211AD_ETHTYPE 0x88a8 -#define VLAN_80211Q_ETHTYPE 0x8100 +#define VLAN_8021AD_ETHTYPE 0x88a8 +#define VLAN_8021Q_ETHTYPE 0x8100 static void ofpact_put_push_vlan(struct ofpbuf *ofpacts, const struct smap *options, int tag) { const char *ethtype_opt = options ? smap_get(options, "ethtype") : NULL; - int ethtype = VLAN_80211Q_ETHTYPE; + int ethtype = VLAN_8021Q_ETHTYPE; if (ethtype_opt) { - if (!strcasecmp(ethtype_opt, "802.11ad")) { - ethtype = VLAN_80211AD_ETHTYPE; - } else if (strcasecmp(ethtype_opt, "802.11q")) { + if (!strcasecmp(ethtype_opt, "802.11ad") + || !strcasecmp(ethtype_opt, "802.1ad")) { + ethtype = VLAN_8021AD_ETHTYPE; + } else if (!strcasecmp(ethtype_opt, "802.11q") + || !strcasecmp(ethtype_opt, "802.1q")) { + ethtype = VLAN_8021Q_ETHTYPE; + } else { static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 1); VLOG_WARN_RL(&rl, "Unknown port ethtype: %s", ethtype_opt); - } + } + if (!strcasecmp(ethtype_opt, "802.11ad") + || !strcasecmp(ethtype_opt, "802.11q")) { + static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 1); + VLOG_WARN_RL(&rl, "Using incorrect value ethtype: %s for either " + "802.1q or 802.1ad please correct this value", + ethtype_opt); + } } struct ofpact_push_vlan *push_vlan; diff --git a/ovn-nb.xml b/ovn-nb.xml index 46ff735a96..b2913bdd7a 100644 --- a/ovn-nb.xml +++ b/ovn-nb.xml @@ -1124,7 +1124,7 @@ <column name="options" key="ethtype"> Optional. VLAN EtherType field value for encapsulating VLAN - headers. Supported values: 802.11q (default), 802.11ad. + headers. Supported values: 802.1q (default), 802.1ad. </column> <column name="options" key="localnet_learn_fdb" diff --git a/tests/ovn.at b/tests/ovn.at index 49477058d7..d4ef3eae11 100644 --- a/tests/ovn.at +++ b/tests/ovn.at @@ -3885,7 +3885,7 @@ OVN_FOR_EACH_NORTHD([ AT_SETUP([VLAN transparency, passthru=true, multiple hosts, custom ethtype]) ovn_start -ethtype=802.11ad +ethtype=802.1ad check ovn-nbctl ls-add ls check ovn-nbctl --wait=sb add Logical-Switch ls other_config vlan-passthru=true -- 2.39.3 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
