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

[BUG: 1575] rootfs: add new parameters to CONFIG_PORTXX_PARAMS

DONE: Kconfig, assembly_ppsi_conf.sh
TODO: SNMP, DOCs, HAL?

Redefine options CONFIG_PORTXX_PARAMS in dot-config
--role={master,slave,auto,none}, keep non-wr for compatibility
--ext={WR}:{HR}, HR for future, if no ext defined use WR as default
--add extra option to disable/enable triggering errors in SNMP
--add option for delay mechanism (dm)
  p2p or e2e
  e2e default
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent c8e46bbb
...@@ -391,8 +391,8 @@ menu "Port Timing Configuration" ...@@ -391,8 +391,8 @@ menu "Port Timing Configuration"
config PORT01_PARAMS config PORT01_PARAMS
string "Parameters for port 1" string "Parameters for port 1"
default "name=wri1,proto=raw,tx=223897,rx=226273,role=slave,fiber=0" if TIME_BC default "name=wri1,proto=raw,tx=223897,rx=226273,role=slave,ext=WR,dm=e2e,monitor=y,fiber=0" if TIME_BC
default "name=wri1,proto=raw,tx=223897,rx=226273,role=master,fiber=0" default "name=wri1,proto=raw,tx=223897,rx=226273,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
help help
This item, and the following ones, are used to assign the tx and rx This item, and the following ones, are used to assign the tx and rx
constant delays (likely from calibration), protocol type (raw or udp), constant delays (likely from calibration), protocol type (raw or udp),
...@@ -404,109 +404,118 @@ config PORT01_PARAMS ...@@ -404,109 +404,118 @@ config PORT01_PARAMS
- slave - configure port as a slave - slave - configure port as a slave
- auto - when a port is connected to master behave as a slave, - auto - when a port is connected to master behave as a slave,
otherwise behave as master otherwise behave as master
- non-wr - don't report problems with this port via SNMP like SFP - non-wr - (obsolete) don't report problems with this port via SNMP
not in DB, copper SFP connected, non 1GB SFP etc. like SFP not in DB, copper SFP connected, non 1GB SFP
etc.
- none - disable White Rabbit and PTP on a port - none - disable White Rabbit and PTP on a port
"ext" (extension) can be one of the following:
- WR - use White Rabbit as an extension on this port (default)
- none - no extension on this port
"dm" (delay mechanism) can be one of the following:
- e2e - end to end (default)
- p2p - peer to peer
"monitor" option to disable ("n") or enable ("y") triggering errors in SNMP on a port; "y" by default
config PORT02_PARAMS config PORT02_PARAMS
string "Parameters for port 2" string "Parameters for port 2"
default "name=wri2,proto=raw,tx=224037,rx=226377,role=master,fiber=0" default "name=wri2,proto=raw,tx=224037,rx=226377,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
help help
Please check the help of PORT01_PARAMS Please check the help of PORT01_PARAMS
config PORT03_PARAMS config PORT03_PARAMS
string "Parameters for port 3" string "Parameters for port 3"
default "name=wri3,proto=raw,tx=224142,rx=226638,role=master,fiber=0" default "name=wri3,proto=raw,tx=224142,rx=226638,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
help help
Please check the help of PORT01_PARAMS Please check the help of PORT01_PARAMS
config PORT04_PARAMS config PORT04_PARAMS
string "Parameters for port 4" string "Parameters for port 4"
default "name=wri4,proto=raw,tx=224313,rx=226471,role=master,fiber=0" default "name=wri4,proto=raw,tx=224313,rx=226471,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
help help
Please check the help of PORT01_PARAMS Please check the help of PORT01_PARAMS
config PORT05_PARAMS config PORT05_PARAMS
string "Parameters for port 5" string "Parameters for port 5"
default "name=wri5,proto=raw,tx=224455,rx=227679,role=master,fiber=0" default "name=wri5,proto=raw,tx=224455,rx=227679,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
help help
Please check the help of PORT01_PARAMS Please check the help of PORT01_PARAMS
config PORT06_PARAMS config PORT06_PARAMS
string "Parameters for port 6" string "Parameters for port 6"
default "name=wri6,proto=raw,tx=224603,rx=227891,role=master,fiber=0" default "name=wri6,proto=raw,tx=224603,rx=227891,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
help help
Please check the help of PORT01_PARAMS Please check the help of PORT01_PARAMS
config PORT07_PARAMS config PORT07_PARAMS
string "Parameters for port 7" string "Parameters for port 7"
default "name=wri7,proto=raw,tx=224761,rx=228055,role=master,fiber=0" default "name=wri7,proto=raw,tx=224761,rx=228055,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
help help
Please check the help of PORT01_PARAMS Please check the help of PORT01_PARAMS
config PORT08_PARAMS config PORT08_PARAMS
string "Parameters for port 8" string "Parameters for port 8"
default "name=wri8,proto=raw,tx=224898,rx=228178,role=master,fiber=0" default "name=wri8,proto=raw,tx=224898,rx=228178,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
help help
Please check the help of PORT01_PARAMS Please check the help of PORT01_PARAMS
config PORT09_PARAMS config PORT09_PARAMS
string "Parameters for port 9" string "Parameters for port 9"
default "name=wri9,proto=raw,tx=225069,rx=228277,role=master,fiber=0" default "name=wri9,proto=raw,tx=225069,rx=228277,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
help help
Please check the help of PORT01_PARAMS Please check the help of PORT01_PARAMS
config PORT10_PARAMS config PORT10_PARAMS
string "Parameters for port 10" string "Parameters for port 10"
default "name=wri10,proto=raw,tx=225245,rx=228435,role=master,fiber=0" default "name=wri10,proto=raw,tx=225245,rx=228435,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
help help
Please check the help of PORT01_PARAMS Please check the help of PORT01_PARAMS
config PORT11_PARAMS config PORT11_PARAMS
string "Parameters for port 11" string "Parameters for port 11"
default "name=wri11,proto=raw,tx=225463,rx=228963,role=master,fiber=0" default "name=wri11,proto=raw,tx=225463,rx=228963,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
help help
Please check the help of PORT01_PARAMS Please check the help of PORT01_PARAMS
config PORT12_PARAMS config PORT12_PARAMS
string "Parameters for port 12" string "Parameters for port 12"
default "name=wri12,proto=raw,tx=225645,rx=229107,role=master,fiber=0" default "name=wri12,proto=raw,tx=225645,rx=229107,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
help help
Please check the help of PORT01_PARAMS Please check the help of PORT01_PARAMS
config PORT13_PARAMS config PORT13_PARAMS
string "Parameters for port 13" string "Parameters for port 13"
default "name=wri13,proto=raw,tx=225801,rx=229225,role=master,fiber=0" default "name=wri13,proto=raw,tx=225801,rx=229225,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
help help
Please check the help of PORT01_PARAMS Please check the help of PORT01_PARAMS
config PORT14_PARAMS config PORT14_PARAMS
string "Parameters for port 14" string "Parameters for port 14"
default "name=wri14,proto=raw,tx=225983,rx=229463,role=master,fiber=0" default "name=wri14,proto=raw,tx=225983,rx=229463,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
help help
Please check the help of PORT01_PARAMS Please check the help of PORT01_PARAMS
config PORT15_PARAMS config PORT15_PARAMS
string "Parameters for port 15" string "Parameters for port 15"
default "name=wri15,proto=raw,tx=226208,rx=229850,role=master,fiber=0" default "name=wri15,proto=raw,tx=226208,rx=229850,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
help help
Please check the help of PORT01_PARAMS Please check the help of PORT01_PARAMS
config PORT16_PARAMS config PORT16_PARAMS
string "Parameters for port 16" string "Parameters for port 16"
default "name=wri16,proto=raw,tx=226393,rx=229907,role=master,fiber=0" default "name=wri16,proto=raw,tx=226393,rx=229907,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
help help
Please check the help of PORT01_PARAMS Please check the help of PORT01_PARAMS
config PORT17_PARAMS config PORT17_PARAMS
string "Parameters for port 17" string "Parameters for port 17"
default "name=wri17,proto=raw,tx=226594,rx=230106,role=master,fiber=0" default "name=wri17,proto=raw,tx=226594,rx=230106,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
help help
Please check the help of PORT01_PARAMS Please check the help of PORT01_PARAMS
config PORT18_PARAMS config PORT18_PARAMS
string "Parameters for port 18" string "Parameters for port 18"
default "name=wri18,proto=raw,tx=226737,rx=230273,role=master,fiber=0" default "name=wri18,proto=raw,tx=226737,rx=230273,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
help help
Please check the help of PORT01_PARAMS Please check the help of PORT01_PARAMS
......
...@@ -43,24 +43,24 @@ CONFIG_WRS_LOG_LEVEL_OTHER="" ...@@ -43,24 +43,24 @@ CONFIG_WRS_LOG_LEVEL_OTHER=""
# #
# Port Timing Configuration # Port Timing Configuration
# #
CONFIG_PORT01_PARAMS="name=wri1,proto=raw,tx=223897,rx=226273,role=slave,fiber=0" CONFIG_PORT01_PARAMS="name=wri1,proto=raw,tx=223897,rx=226273,role=slave,ext=WR,dm=e2e,monitor=y,fiber=0"
CONFIG_PORT02_PARAMS="name=wri2,proto=raw,tx=224037,rx=226377,role=master,fiber=0" CONFIG_PORT02_PARAMS="name=wri2,proto=raw,tx=224037,rx=226377,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
CONFIG_PORT03_PARAMS="name=wri3,proto=raw,tx=224142,rx=226638,role=master,fiber=0" CONFIG_PORT03_PARAMS="name=wri3,proto=raw,tx=224142,rx=226638,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
CONFIG_PORT04_PARAMS="name=wri4,proto=raw,tx=224313,rx=226471,role=master,fiber=0" CONFIG_PORT04_PARAMS="name=wri4,proto=raw,tx=224313,rx=226471,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
CONFIG_PORT05_PARAMS="name=wri5,proto=raw,tx=224455,rx=227679,role=master,fiber=0" CONFIG_PORT05_PARAMS="name=wri5,proto=raw,tx=224455,rx=227679,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
CONFIG_PORT06_PARAMS="name=wri6,proto=raw,tx=224603,rx=227891,role=master,fiber=0" CONFIG_PORT06_PARAMS="name=wri6,proto=raw,tx=224603,rx=227891,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
CONFIG_PORT07_PARAMS="name=wri7,proto=raw,tx=224761,rx=228055,role=master,fiber=0" CONFIG_PORT07_PARAMS="name=wri7,proto=raw,tx=224761,rx=228055,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
CONFIG_PORT08_PARAMS="name=wri8,proto=raw,tx=224898,rx=228178,role=master,fiber=0" CONFIG_PORT08_PARAMS="name=wri8,proto=raw,tx=224898,rx=228178,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
CONFIG_PORT09_PARAMS="name=wri9,proto=raw,tx=225069,rx=228277,role=master,fiber=0" CONFIG_PORT09_PARAMS="name=wri9,proto=raw,tx=225069,rx=228277,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
CONFIG_PORT10_PARAMS="name=wri10,proto=raw,tx=225245,rx=228435,role=master,fiber=0" CONFIG_PORT10_PARAMS="name=wri10,proto=raw,tx=225245,rx=228435,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
CONFIG_PORT11_PARAMS="name=wri11,proto=raw,tx=225463,rx=228963,role=master,fiber=0" CONFIG_PORT11_PARAMS="name=wri11,proto=raw,tx=225463,rx=228963,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
CONFIG_PORT12_PARAMS="name=wri12,proto=raw,tx=225645,rx=229107,role=master,fiber=0" CONFIG_PORT12_PARAMS="name=wri12,proto=raw,tx=225645,rx=229107,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
CONFIG_PORT13_PARAMS="name=wri13,proto=raw,tx=225801,rx=229225,role=master,fiber=0" CONFIG_PORT13_PARAMS="name=wri13,proto=raw,tx=225801,rx=229225,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
CONFIG_PORT14_PARAMS="name=wri14,proto=raw,tx=225983,rx=229463,role=master,fiber=0" CONFIG_PORT14_PARAMS="name=wri14,proto=raw,tx=225983,rx=229463,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
CONFIG_PORT15_PARAMS="name=wri15,proto=raw,tx=226208,rx=229850,role=master,fiber=0" CONFIG_PORT15_PARAMS="name=wri15,proto=raw,tx=226208,rx=229850,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
CONFIG_PORT16_PARAMS="name=wri16,proto=raw,tx=226393,rx=229907,role=master,fiber=0" CONFIG_PORT16_PARAMS="name=wri16,proto=raw,tx=226393,rx=229907,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
CONFIG_PORT17_PARAMS="name=wri17,proto=raw,tx=226594,rx=230106,role=master,fiber=0" CONFIG_PORT17_PARAMS="name=wri17,proto=raw,tx=226594,rx=230106,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
CONFIG_PORT18_PARAMS="name=wri18,proto=raw,tx=226737,rx=230273,role=master,fiber=0" CONFIG_PORT18_PARAMS="name=wri18,proto=raw,tx=226737,rx=230273,role=master,ext=WR,dm=e2e,monitor=y,fiber=0"
# #
# SFP and Media Timing Configuration # SFP and Media Timing Configuration
......
...@@ -76,6 +76,10 @@ for i_zero in {01..18};do ...@@ -76,6 +76,10 @@ 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_ext
# delay mechanism
unset p_dm
unset p_monitor
# 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
...@@ -94,6 +98,13 @@ for i_zero in {01..18};do ...@@ -94,6 +98,13 @@ for i_zero in {01..18};do
p_proto="$value";; p_proto="$value";;
"role") "role")
p_role="$value";; p_role="$value";;
"ext")
p_ext="$value";;
"dm")
p_dm="$value";;
"monitor")
# read by SNMP directly from the config
continue;;
"rx"|"tx"|"fiber") "rx"|"tx"|"fiber")
continue;; continue;;
*) *)
...@@ -117,12 +128,38 @@ for i_zero in {01..18};do ...@@ -117,12 +128,38 @@ for i_zero in {01..18};do
else else
echo "port wri$i-raw" >> $OUTPUT_FILE echo "port wri$i-raw" >> $OUTPUT_FILE
fi fi
echo "iface wri$i" >> $OUTPUT_FILE echo "iface wri$i" >> $OUTPUT_FILE
if [ -n "$p_role" ]; then if [ -n "$p_role" ]; then
echo "role $p_role" >> $OUTPUT_FILE echo "role $p_role" >> $OUTPUT_FILE
else
echo "$0: Role not defined in CONFIG_PORT"$i_zero"_PARAMS"
fi
if [ "${p_ext,,}" = "wr" ]; then # lower case
echo "extension whiterabbit" >> $OUTPUT_FILE
# add HA one day...
# elif [ "${p_ext,,}" = "ha" ]; then # lower case
# echo "extension whiterabbit" >> $OUTPUT_FILE
elif [ "${p_ext,,}" = "none" ]; then # lower case
# do nothing
echo "# no extension" >> $OUTPUT_FILE
elif [ -n "$p_ext" ]; then
echo "$0: Invalid parameter ext=\"$p_ext\" in CONFIG_PORT"$i_zero"_PARAMS"
else
# default
echo "extension whiterabbit" >> $OUTPUT_FILE
fi
if [ "${p_dm,,}" = "p2p" ]; then # lower case
echo "mechanism p2p" >> $OUTPUT_FILE
elif [ "${p_dm,,}" = "e2e" ]; then # lower case
# do nothing
true
elif [ -n "$p_dm" ]; then
echo "$0: Invalid parameter dm=\"$p_dm\" in CONFIG_PORT"$i_zero"_PARAMS"
fi fi
#hardcode whiterabbit as extension even for non-wr
echo "extension whiterabbit" >> $OUTPUT_FILE
# add vlans # add vlans
if [ "$CONFIG_VLANS_ENABLE" = "y" ]; then if [ "$CONFIG_VLANS_ENABLE" = "y" ]; then
......
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