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

Kconfig: move ppsi VLANs configuration to VLANs section

Move ppsi VLAN configuration from PORTXX_PARAMS(ppsi_vlans) to
VLANS_PORTXX_VID_PTP
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent cd5364d4
......@@ -315,9 +315,6 @@ config PORT01_PARAMS
not in DB, copper SFP connected, non 1GB SFP etc.
- none - disable White Rabbit and PTP on a portdisable White Rabbit
on a port, keep PTP
ppsi_vlans - colon separated list describing which vlans shall be
assigned to the particular ppsi instance
config PORT02_PARAMS
string "Parameters for port 2"
......
This diff is collapsed.
......@@ -648,9 +648,6 @@ value is changed by the web interface, proper action is taken.
(@t{CONFIG_FIBERXX_PARAMS})
should be used for a fiber connected to
a particular port
@item @t{ppsi_vlans} -- colon separated list describing which
vlans shall be assigned to the
particular ppsi instance
@end itemize
Most likely the default values work for you.
......@@ -879,6 +876,11 @@ value is changed by the web interface, proper action is taken.
VID takes values 0..4094.
For details please refer to the @ref{VLANs Configuration}
@item CONFIG_VLANS_PORTXX_VID_PTP
Semicolon separated list describing which vlans shall be assigned to
a PTP instance on a particular port
@item CONFIG_VLANS_VLANXXXX
Provide the configuration for VLAN from the range 0000-4094.
......@@ -1206,21 +1208,24 @@ To configure the switch in the way descibed in the
following config options:
@smallexample
CONFIG_PORT01_PARAMS="name=wri1,proto=raw,tx=0,rx=0,role=slave,fiber=0,ppsi_vlans=1"
CONFIG_PORT02_PARAMS="name=wri2,proto=raw,tx=0,rx=0,role=master,fiber=0,ppsi_vlans=2"
CONFIG_PORT03_PARAMS="name=wri3,proto=raw,tx=0,rx=0,role=master,fiber=0,ppsi_vlans=2"
CONFIG_PORT01_PARAMS="name=wri1,proto=raw,tx=0,rx=0,role=slave,fiber=0"
CONFIG_PORT02_PARAMS="name=wri2,proto=raw,tx=0,rx=0,role=master,fiber=0"
CONFIG_PORT03_PARAMS="name=wri3,proto=raw,tx=0,rx=0,role=master,fiber=0"
CONFIG_VLANS_ENABLE=y
CONFIG_VLANS_PORT01_MODE_ACCESS=y
CONFIG_VLANS_PORT01_UNTAG_ALL=y
CONFIG_VLANS_PORT01_PRIO=4
CONFIG_VLANS_PORT01_VID=1
CONFIG_VLANS_PORT01_VID_PTP="1"
CONFIG_VLANS_PORT02_MODE_TRUNK=y
CONFIG_VLANS_PORT02_PRIO=-1
CONFIG_VLANS_PORT02_VID_PTP="2"
CONFIG_VLANS_PORT03_MODE_ACCESS=y
CONFIG_VLANS_PORT03_UNTAG_ALL=y
CONFIG_VLANS_PORT03_PRIO=7
CONFIG_VLANS_PORT03_VID=2
CONFIG_VLANS_PORT03_VID_PTP="2"
CONFIG_VLANS_ENABLE_SET1=y
CONFIG_VLANS_VLAN0001="fid=1,prio=4,drop=no,ports=1"
......
......@@ -141,6 +141,16 @@ for port_i in {1..18}; do
echo " help"
echo " VID value used when tagging frames or to override VID passed to RTU"
echo ""
echo "config VLANS_PORT"$port_0i"_VID_PTP"
echo " string \"Port "$port_i" VIDs for PTP\""
echo " default \"0\" if VLANS_PORT01_MODE_ACCESS || VLANS_PORT01_MODE_TRUNK"
echo " default \"\" if VLANS_PORT01_MODE_UNQUALIFIED"
echo " depends on VLANS_PORT"$port_0i"_MODE_ACCESS || VLANS_PORT"$port_0i"_MODE_TRUNK \\"
echo " || VLANS_PORT"$port_0i"_MODE_UNQUALIFIED"
echo " help"
echo " Semicolon separated list describing which vlans shall be assigned to"
echo " a PTP instance on a particular port"
echo ""
done
......@@ -197,7 +207,7 @@ for set_i in {1..3}; do
echo " --If \"drop\" is set to \"y\", all frames belonging to this VID are"
echo " dropped (note that frame can belong to a VID as a consequence of"
echo " per-port Endpoint configuration); can take values \"y\" and \"n\""
echo " --\"ports\" is a list of ports separated with a semicolon sign(\";\");"
echo " --\"ports\" is a list of ports separated with a semicolon sign (\";\");"
echo " ports ranges are supported (with a minus sign)"
else
# for the rest just refer to the first VLAN in the menu
......
......@@ -25,7 +25,6 @@ for i_zero in {01..18};do
unset p_name
unset p_proto
unset p_role
unset p_ppsi_vlans
# parse parameters
param_line=$(eval "echo \$CONFIG_PORT"$i_zero"_PARAMS")
IFS_OLD=$IFS
......@@ -44,8 +43,6 @@ for i_zero in {01..18};do
p_proto="$value";;
"role")
p_role="$value";;
"ppsi_vlans")
p_ppsi_vlans="$value";;
"rx"|"tx"|"fiber")
continue;;
*)
......@@ -75,10 +72,28 @@ for i_zero in {01..18};do
fi
#hardcode whiterabbit as extension even for non-wr
echo "extension whiterabbit" >> $OUTPUT_FILE
# add vlans
if [ -n "$p_ppsi_vlans" ]; then
mod_vlans=${p_ppsi_vlans//:/,}
echo "vlan $mod_vlans" >> $OUTPUT_FILE
if [ "$CONFIG_VLANS_ENABLE" = "y" ]; then
unset ppsi_vlans;
unset port_mode_access;
unset port_mode_trunk;
unset port_mode_unqualified;
# check port mode
port_mode_access=$(eval "echo \$CONFIG_VLANS_PORT"$i_zero"_MODE_ACCESS")
port_mode_trunk=$(eval "echo \$CONFIG_VLANS_PORT"$i_zero"_MODE_TRUNK")
port_mode_unqualified=$(eval "echo \$CONFIG_VLANS_PORT"$i_zero"_MODE_UNQUALIFIED")
# check port mode
if [ "$port_mode_access" = "y" ] \
|| [ "$port_mode_trunk" = "y" ] \
|| [ "$port_mode_unqualified" = "y" ]; then
ppsi_vlans=$(eval "echo \$CONFIG_VLANS_PORT"$i_zero"_VID_PTP")
if [ -n "$ppsi_vlans" ]; then
mod_vlans=${ppsi_vlans//;/,}
echo "vlan $mod_vlans" >> $OUTPUT_FILE
fi
fi
fi
# separate ports
......
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