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