diff options
author | Pau Espin Pedrol <pespin.shar@gmail.com> | 2020-05-17 20:39:44 +0200 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2020-05-21 20:08:48 +0200 |
commit | 74e0222eeb9e62f4d5073a5b3d9208678782a198 (patch) | |
tree | 7198184cf4410dd5d1a3f41a32782dafa4ea3037 /system.h | |
parent | cfccdc22ca6d8f28d70a2546a495c9ead4bbb765 (diff) |
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 <pespin.shar@gmail.com>
Tested-by: Pedro <pedrowrt@cas.cat>
Diffstat (limited to 'system.h')
-rw-r--r-- | system.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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) |