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

Kconfig: remove VLANS_PORTXX_VID_PTP

Use VLANS_PORTXX_VID instead of VLANS_PORTXX_VID and VLANS_PORTXX_VID_PTP
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 60b14e88
This diff is collapsed.
...@@ -75,6 +75,8 @@ for port_i in {1..18}; do ...@@ -75,6 +75,8 @@ for port_i in {1..18}; do
echo " configured in PORT_VID. If PRIO_VAL is not -1," echo " configured in PORT_VID. If PRIO_VAL is not -1,"
echo " the value of priority provided to RTU is" echo " the value of priority provided to RTU is"
echo " overridden with the configured PRIO_VAL" echo " overridden with the configured PRIO_VAL"
echo " NOTE: providing a VID for this mode is not"
echo " supported in the dot-config"
echo " * VLAN tag : are admitted; if PRIO_VAL is not -1, the value of" echo " * VLAN tag : are admitted; if PRIO_VAL is not -1, the value of"
echo " priority provided to RTU is overridden with" echo " priority provided to RTU is overridden with"
echo " the configured PRIO_VAL" echo " the configured PRIO_VAL"
...@@ -134,22 +136,20 @@ for port_i in {1..18}; do ...@@ -134,22 +136,20 @@ for port_i in {1..18}; do
echo " -1 disables the priority overwrite. Valid values are from -1 to 7." echo " -1 disables the priority overwrite. Valid values are from -1 to 7."
echo "" echo ""
echo "config VLANS_PORT"$port_0i"_VID" echo "config VLANS_PORT"$port_0i"_VID"
echo " int \"Port "$port_i" VID\"" echo " string \"Port "$port_i" VID\""
echo " default 0" echo " default \"\""
echo " range 0 4094"
echo " depends on VLANS_PORT"$port_0i"_MODE_ACCESS || VLANS_PORT"$port_0i"_MODE_UNQUALIFIED"
echo " help" echo " help"
echo " VID value used when tagging frames or to override VID passed to RTU" echo " This value based on the port's mode is used as:"
echo "" echo " --MODE_ACCESS - (mandatory) use as VID for tagging incoming frames and notify"
echo "config VLANS_PORT"$port_0i"_VID_PTP" echo " the PPSI which VLAN shall it use for synchronization; only one VLAN"
echo " string \"Port "$port_i" VIDs for PTP\"" echo " number shall be used in this mode"
echo " default \"0\" if VLANS_PORT"$port_0i"_MODE_ACCESS || VLANS_PORT"$port_0i"_MODE_TRUNK" echo " --MODE_TRUNK - (optional) notify the PPSI which VLAN shall it use for"
echo " default \"\" if VLANS_PORT"$port_0i"_MODE_UNQUALIFIED" echo " synchronization; semicolon separated list is allowed"
echo " depends on VLANS_PORT"$port_0i"_MODE_ACCESS || VLANS_PORT"$port_0i"_MODE_TRUNK \\" echo " --MODE_DISABLED - (optional) notify the PPSI which VLANs shall it use for"
echo " || VLANS_PORT"$port_0i"_MODE_UNQUALIFIED" echo " synchronization; semicolon separated list is allowed"
echo " help" echo " --MODE_UNQUALIFIED - (optional) notify the PPSI which VLANs shall it use for"
echo " Semicolon separated list describing which vlans shall be assigned to" echo " synchronization; semicolon separated list is allowed;"
echo " a PTP instance on a particular port" echo " The range of a valid VID is 0 to 4094"
echo "" echo ""
done done
......
...@@ -79,16 +79,23 @@ for i_zero in {01..18};do ...@@ -79,16 +79,23 @@ for i_zero in {01..18};do
unset port_mode_access; unset port_mode_access;
unset port_mode_trunk; unset port_mode_trunk;
unset port_mode_unqualified; unset port_mode_unqualified;
unset port_mode_disabled;
# check port mode # check port mode
port_mode_access=$(eval "echo \$CONFIG_VLANS_PORT"$i_zero"_MODE_ACCESS") 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_trunk=$(eval "echo \$CONFIG_VLANS_PORT"$i_zero"_MODE_TRUNK")
port_mode_unqualified=$(eval "echo \$CONFIG_VLANS_PORT"$i_zero"_MODE_UNQUALIFIED") port_mode_unqualified=$(eval "echo \$CONFIG_VLANS_PORT"$i_zero"_MODE_UNQUALIFIED")
port_mode_disabled=$(eval "echo \$CONFIG_VLANS_PORT"$i_zero"_MODE_DISABLED")
# check port mode # check port mode
if [ "$port_mode_access" = "y" ] \ if [ "$port_mode_access" = "y" ]; then
|| [ "$port_mode_trunk" = "y" ] \ ppsi_vlans=$(eval "echo \$CONFIG_VLANS_PORT"$i_zero"_VID")
echo "vlan $ppsi_vlans" >> $OUTPUT_FILE
fi
if [ "$port_mode_trunk" = "y" ] \
|| [ "$port_mode_disabled" = "y" ] \
|| [ "$port_mode_unqualified" = "y" ]; then || [ "$port_mode_unqualified" = "y" ]; then
ppsi_vlans=$(eval "echo \$CONFIG_VLANS_PORT"$i_zero"_VID_PTP") ppsi_vlans=$(eval "echo \$CONFIG_VLANS_PORT"$i_zero"_VID")
if [ -n "$ppsi_vlans" ]; then if [ -n "$ppsi_vlans" ]; then
mod_vlans=${ppsi_vlans//;/,} mod_vlans=${ppsi_vlans//;/,}
echo "vlan $mod_vlans" >> $OUTPUT_FILE echo "vlan $mod_vlans" >> $OUTPUT_FILE
......
...@@ -1032,12 +1032,14 @@ static int read_dot_config(char *dot_config_file) ...@@ -1032,12 +1032,14 @@ static int read_dot_config(char *dot_config_file)
printf("Found %s=%s\n", buff, val_ch); printf("Found %s=%s\n", buff, val_ch);
set_p_prio(port - 1, val_ch); set_p_prio(port - 1, val_ch);
} }
sprintf(buff, "VLANS_PORT%02d_VID", port); if (mode == QMODE_ACCESS) {
val_ch = libwr_cfg_get(buff); sprintf(buff, "VLANS_PORT%02d_VID", port);
if (val_ch) { val_ch = libwr_cfg_get(buff);
if (wrs_msg_level >= LOG_DEBUG) if (val_ch) {
printf("Found %s=%s\n", buff, val_ch); if (wrs_msg_level >= LOG_DEBUG)
set_p_vid(port - 1, val_ch); printf("Found %s=%s\n", buff, val_ch);
set_p_vid(port - 1, val_ch);
}
} }
} }
......
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