From 74e0222eeb9e62f4d5073a5b3d9208678782a198 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Sun, 17 May 2020 20:39:44 +0200 Subject: vlandev: support setting ingress/egress QoS mappings It allows setting mappings for instance this way: """ config device option name 'vlan41' option type '8021q' option vid '41' option ifname 'eth1' list ingress_qos_mapping '1:2' list ingress_qos_mapping '2:5' list egress_qos_mapping '0:3' """ Signed-off-by: Pau Espin Pedrol Tested-by: Pedro --- system.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'system.h') diff --git a/system.h b/system.h index b377416..252fd92 100644 --- a/system.h +++ b/system.h @@ -21,6 +21,7 @@ #include "device.h" #include "interface-ip.h" #include "iprule.h" +#include "utils.h" enum tunnel_param { TUNNEL_ATTR_TYPE, @@ -158,9 +159,17 @@ enum vlan_proto { VLAN_PROTO_8021AD = 0x88A8 }; +struct vlan_qos_mapping { + struct vlist_simple_node node; /* entry in vlandev_config->{e,in}gress_qos_mapping_list */ + uint32_t from; + uint32_t to; +}; + struct vlandev_config { enum vlan_proto proto; uint16_t vid; + struct vlist_simple_tree ingress_qos_mapping_list; /* list of struct vlan_qos_mapping */ + struct vlist_simple_tree egress_qos_mapping_list; /* list of struct vlan_qos_mapping */ }; static inline int system_get_addr_family(unsigned int flags) -- cgit v1.2.1