diff --git a/Kconfig b/Kconfig index aefecbf49a7b01d39c0ea50b62bc99da4f796311..0396a34c502fd7e4d207631dab5b61afeae2c6b3 100644 --- a/Kconfig +++ b/Kconfig @@ -300,11 +300,11 @@ config PORT01_PARAMS default "name=wri1,proto=raw,tx=223896,rx=226310,role=slave,fiber=0" if TIME_BC default "name=wri1,proto=raw,tx=223896,rx=226310,role=master,fiber=0" help - This item, and the following ones, are used to assign the + This item, and the following ones, are used to assign the tx and rx constant delays (likely from calibration), protocol type (raw or udp), - port roles and type of fiber (number referring to the corresponding - FIBERXX_PARAMS) for each of the ports. Please refer to - the user manual for more information. + port roles, type of fiber (number referring to the corresponding + FIBERXX_PARAMS) and vlan configuration of PPSi for each of the ports. + Please refer to the user manual for more information. "role" can be one of the following: - master - configure port as a master - slave - configure port as a slave @@ -314,6 +314,9 @@ 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" diff --git a/doc/wrs-user-manual.in b/doc/wrs-user-manual.in index 2f45ef68897920c18e831519a932cc978fcd7f48..f8e1fe55b1a5b2da341c15a6b5c9f44ce184c4b5 100644 --- a/doc/wrs-user-manual.in +++ b/doc/wrs-user-manual.in @@ -647,6 +647,9 @@ 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. diff --git a/userspace/rootfs_override/wr/bin/assembly_ppsi_conf.sh b/userspace/rootfs_override/wr/bin/assembly_ppsi_conf.sh index 036f982bf3954861929860f5bde76ec4c61bf5ba..09f0bcb83ca3433ef1e95798588dd2388620e4ae 100755 --- a/userspace/rootfs_override/wr/bin/assembly_ppsi_conf.sh +++ b/userspace/rootfs_override/wr/bin/assembly_ppsi_conf.sh @@ -25,6 +25,7 @@ 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 @@ -36,13 +37,19 @@ for i_zero in {01..18};do do # split pairs IFS='=' read param value <<< "$pair" - case $param in + case "$param" in "name") p_name="$value";; "proto") p_proto="$value";; "role") p_role="$value";; + "ppsi_vlans") + p_ppsi_vlans="$value";; + "rx"|"tx"|"fiber") + continue;; + *) + echo "Invalid parameter $param in CONFIG_PORT"$i_zero"_PARAMS" ;; esac done @@ -66,8 +73,13 @@ for i_zero in {01..18};do if [ -n "$p_role" ]; then echo "role $p_role" >> $OUTPUT_FILE fi - #hardcode whiterabbit as extension + #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 + fi # separate ports echo "" >> $OUTPUT_FILE