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
echo " configured in PORT_VID. If PRIO_VAL is not -1,"
echo " the value of priority provided to RTU is"
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 " priority provided to RTU is overridden with"
echo " the configured PRIO_VAL"
......@@ -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 ""
echo "config VLANS_PORT"$port_0i"_VID"
echo " int \"Port "$port_i" VID\""
echo " default 0"
echo " range 0 4094"
echo " depends on VLANS_PORT"$port_0i"_MODE_ACCESS || VLANS_PORT"$port_0i"_MODE_UNQUALIFIED"
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_PORT"$port_0i"_MODE_ACCESS || VLANS_PORT"$port_0i"_MODE_TRUNK"
echo " default \"\" if VLANS_PORT"$port_0i"_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 " string \"Port "$port_i" VID\""
echo " default \"\""
echo " help"
echo " Semicolon separated list describing which vlans shall be assigned to"
echo " a PTP instance on a particular port"
echo " This value based on the port's mode is used as:"
echo " --MODE_ACCESS - (mandatory) use as VID for tagging incoming frames and notify"
echo " the PPSI which VLAN shall it use for synchronization; only one VLAN"
echo " number shall be used in this mode"
echo " --MODE_TRUNK - (optional) notify the PPSI which VLAN shall it use for"
echo " synchronization; semicolon separated list is allowed"
echo " --MODE_DISABLED - (optional) notify the PPSI which VLANs shall it use for"
echo " synchronization; semicolon separated list is allowed"
echo " --MODE_UNQUALIFIED - (optional) notify the PPSI which VLANs shall it use for"
echo " synchronization; semicolon separated list is allowed;"
echo " The range of a valid VID is 0 to 4094"
echo ""
done
......
......@@ -79,16 +79,23 @@ for i_zero in {01..18};do
unset port_mode_access;
unset port_mode_trunk;
unset port_mode_unqualified;
unset port_mode_disabled;
# 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")
port_mode_disabled=$(eval "echo \$CONFIG_VLANS_PORT"$i_zero"_MODE_DISABLED")
# check port mode
if [ "$port_mode_access" = "y" ] \
|| [ "$port_mode_trunk" = "y" ] \
if [ "$port_mode_access" = "y" ]; then
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
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
mod_vlans=${ppsi_vlans//;/,}
echo "vlan $mod_vlans" >> $OUTPUT_FILE
......
......@@ -1032,6 +1032,7 @@ static int read_dot_config(char *dot_config_file)
printf("Found %s=%s\n", buff, val_ch);
set_p_prio(port - 1, val_ch);
}
if (mode == QMODE_ACCESS) {
sprintf(buff, "VLANS_PORT%02d_VID", port);
val_ch = libwr_cfg_get(buff);
if (val_ch) {
......@@ -1040,6 +1041,7 @@ static int read_dot_config(char *dot_config_file)
set_p_vid(port - 1, val_ch);
}
}
}
/* If VLANS_VLAN0000 is empty => ports mask is not provided for VLAN0
* then add to VLAN0 ports that are not ACCESS nor TRUNK */
......
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