From f8d6ba647e0ef4f1c18302bfb4bebb040f2df95c Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sun, 8 Sep 2019 18:49:42 +0200 Subject: ethernet: T1637: support VLAN {ingress,egress}-qos-mapping --- src/conf_mode/interface-ethernet.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/conf_mode/interface-ethernet.py b/src/conf_mode/interface-ethernet.py index 4aed13a62..c20e551d6 100755 --- a/src/conf_mode/interface-ethernet.py +++ b/src/conf_mode/interface-ethernet.py @@ -282,7 +282,12 @@ def apply(eth): # create VLAN interfaces (vif) for vif in eth['vif']: - vlan = e.add_vlan(vif['id']) + # QoS priority mapping can only be set during interface creation + # so we delete the interface first if required. + if vif['egress_qos_changed'] or vif['ingress_qos_changed']: + e.del_vlan(vif['id']) + + vlan = e.add_vlan(vif['id'], ingress_qos=vif['ingress_qos'], egress_qos=vif['egress_qos']) apply_vlan_config(vlan, vif) return None -- cgit v1.2.3