Commit f86b16d8 authored by Adam Wujek's avatar Adam Wujek 💬

userspace/tools: add read VLAN configuration from dot-config in wrs_vlans

Changes:
--add "--file|-f" parameter to read VLAN configuration from dot-config
--"--debug" can take parameter
--print VLAN configuration to be applied if debug enabled
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 474fe4bf
......@@ -1409,8 +1409,13 @@ The following option flags are supported:
@node wrs_vlans
@section wrs_vlans
The @i{wrs_vlans} shell tool can be used to setup VLANs in the switch. The
configuration is divided into two parts:
The @i{wrs_vlans} shell tool can be used to setup VLANs in the switch.
The configuration can be read from the @t{dot-config} file pointed by @t{-f} or
@t{--file} parameter (for @t{dot-config} details please check the
@ref{Configuration Items that Apply at Build Time})
Additionally the configuration can be specified using parameters below.
The configuration is divided into two parts:
@table @code
......
This diff is collapsed.
......@@ -58,6 +58,32 @@
#define OPT_RTU_DROP 23
#define OPT_RTU_PRIO 24
#define OPT_RTU_DEL 25
#define OPT_FILE_READ 'f'
#define PORT_PRIO_MIN 0
#define PORT_PRIO_MAX 7
#define PORT_VID_MIN 0
#define PORT_VID_MAX 4095
#define RTU_VID_MIN 0
#define RTU_VID_MAX 4095
#define RTU_FID_MIN 0
#define RTU_FID_MAX 4095
#define RTU_PRIO_MIN 0
#define RTU_PRIO_MAX 7
#define RTU_PMASK_MIN 0
#define RTU_PMASK_MAX ((1 << NPORTS) - 1)
/* struct for ranges of VLAN sets used in dot-config */
struct vlan_sets {
char *name;
int min;
int max;
};
struct s_port_vlans
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment