White Rabbit Switch - Software issueshttps://ohwr.org/project/wr-switch-sw/issues2024-03-19T14:01:11Zhttps://ohwr.org/project/wr-switch-sw/issues/304wrong behaviour of BMCA with redundant links (PASSIVE)2024-03-19T14:01:11ZAdam Wujekwrong behaviour of BMCA with redundant links (PASSIVE)When there are redundant links, in master WRS link shall be in master mode while it goes to passive.
Related to https://ohwr.org/project/ppsi/issues/52v7.0https://ohwr.org/project/wr-switch-sw/issues/299MAC aging2024-03-06T22:59:03ZEnkhbold OchirsurenMAC agingWR switches keep the learnt MAC addresses beyond the aging time (default is 300 seconds).
It was observed during the address caching capacity and learning rate tests of RFC 2889 benchmarking using the Xenabay traffic analyzer. If 'aging time' is chosen as address reset condition, then test is failed (even at the relative low frame rate of 20 frame/s). In this case, the RTU table keeps many dynamic entries, which have aging value of '0'. This behavior is observed in all software versions including v4.2, v5.0.1 v6.0 and v6.1.
Attempts to remove them manually with 'rtu_stat remove all <port> 1' also failed (trials done only on v6.1).
Example of 'rtu_stat' output (and this is special/rare case with duplicate entries) is given below:
```
MAC Dst.ports FID Type Age [s]
----------------------------------------------------------------------------------
...
02:f4:bc:00:05:00 2 0 DYNAMIC (hash 138:2) 359
02:f4:bc:00:05:00 2 0 DYNAMIC (hash 138:2) 0
02:f4:bc:00:05:01 2 0 DYNAMIC (hash 119:2) 359
02:f4:bc:00:05:01 2 0 DYNAMIC (hash 119:2) 0
02:f4:bc:00:05:02 2 0 DYNAMIC (hash 17a:2) 359
02:f4:bc:00:05:02 2 0 DYNAMIC (hash 17a:2) 0
```
As example of how MAC aging affects the RFC 2889 tests, the results of the address caching capacity test are attached (software = v6.1, frame size = 512 bytes, learning rate = 20 frame/s):
- xena2889-report-20231023-194401.pdf: test failed, "aging time = 350 seconds' is chosen for the address learning reset condition. Here, switch starts to forward test packets (100, 1074) properly, no flooding. At iteration with the critical number of packets (1561) it floods, and then it remains to flood in all further iterations with lowering number of the test packets (1317, 1195, ..., 1075, 1074). Test is failed, because the switch floods even with the same number of packets (1074), with which no flooding has happened in previous iteration.
- xena2889-report-20231023-195822.pdf: same test, but passed, "switching test ports" is chosen for the reset condition. In this setup, test runs as expected: switch forwards the test packets (100, 1074, #1561, 1317, 1439) properly in all iterations except those with critical/high number of packets (1561).
[xena2889-report-20231023-194401.pdf](/uploads/440043e33930c3d6d68b428543b9290e/xena2889-report-20231023-194401.pdf)
[xena2889-report-20231023-195822.pdf](/uploads/5b0638b1fbe175199eb5905bb5029e47/xena2889-report-20231023-195822.pdf)https://ohwr.org/project/wr-switch-sw/issues/298unable to establish link between two WRS2024-03-06T23:00:31ZAdam Wujekunable to establish link between two WRSUnable to establish link between two WRS:
* after 863 restarts (WRS v6.0.1)
* after 28
* after 381
* 5 errors out of 4153
Probably restart of HAL does help. Unplug/plug fiber/SFP does not help.https://ohwr.org/project/wr-switch-sw/issues/297Pll does not lock (with 60 seconds timeout)2024-01-31T22:56:57ZAdam WujekPll does not lock (with 60 seconds timeout)It can happen sometimes that the PLL does not lock. This issue will collect the restart statistics from different tests. The tests were done with 60 seconds timeout. If the timeout is set to 15seconds (default), In practice such timeout will not happen.
* 2 errors out of 863
* 2 errors out of 4153v7.0https://ohwr.org/project/wr-switch-sw/issues/296logMinDelayReqInterval is not updated with the value from the received relay_...2024-01-31T22:28:05ZAdam WujeklogMinDelayReqInterval is not updated with the value from the received relay_response framesee https://ohwr.org/project/ppsi/issues/49v7.0https://ohwr.org/project/wr-switch-sw/issues/294in PPSI (HA) replace "Coherency" to "Coherent" in configuration options2024-01-31T22:28:08ZAdam Wujekin PPSI (HA) replace "Coherency" to "Coherent" in configuration optionsIt looks like IEEE1588-2019 is wrong, since in the Table I.1 "PTP attribute values for options" it mentions about:
* L1SyncBasicPortDS.txCoherencyIsRequired
* L1SyncBasicPortDS.rxCoherencyIsRequired
* L1SyncBasicPortDS.congruencyIsRequired
But such are not members of L1SyncBasicPortDS data set. They should be replaced with (Coherency -> Coherent and congruency -> congruent):
* L1SyncBasicPortDS.txCoherentIsRequired
* L1SyncBasicPortDS.rxCoherentIsRequired
* L1SyncBasicPortDS.congruentIsRequired
Related to https://ohwr.org/project/ppsi/issues/47v7.0https://ohwr.org/project/wr-switch-sw/issues/293wrsw_vlan does not show MAC addresses2023-09-01T23:12:30ZMaciej Lipinskiwrsw_vlan does not show MAC addressesThere seems to be bug introduced in v6.1. When using
`wrsw_vlans --plist`
the MAC addresses are not displayed
![image](/uploads/d74b17ccb2ed59cbd2d0c1600fbe6019/image.png)
This works well no WR switches with v6.0.1:
![image](/uploads/ec5ce209a4368cdb4710494d414dee31/image.png)v6.1.1Adam WujekAdam Wujekhttps://ohwr.org/project/wr-switch-sw/issues/288delock on GM not reported in syslog2024-01-31T22:28:53ZMaciej Lipinskidelock on GM not reported in syslogIt seems that the delock event is not always captured in the syslog, see attached [syslog](/uploads/e1fec0e8948b1b074e6697a0784dbe74/syslog)v7.0Adam WujekAdam Wujekhttps://ohwr.org/project/wr-switch-sw/issues/287'wr_mon -e' for GM produces empty/blank outout2024-01-31T22:28:57ZMaciej Lipinski'wr_mon -e' for GM produces empty/blank outoutWhen 'wr_mon -e is executed on a WRS that is a GM, it produces empty lines. It should either
- provide info relevant for GM, or
- info that it gives no info for GMv7.0Adam WujekAdam Wujekhttps://ohwr.org/project/wr-switch-sw/issues/286webinterface: dashboard -> system monitor wrongly shows off status2023-05-23T14:23:38ZMaciej Lipinskiwebinterface: dashboard -> system monitor wrongly shows off statusAdam WujekAdam Wujekhttps://ohwr.org/project/wr-switch-sw/issues/283If a WRS configured as GM is not locked to 100MHz/PPS all ports are down2023-04-27T01:51:29ZAdam WujekIf a WRS configured as GM is not locked to 100MHz/PPS all ports are downIf a WRS configured as GM is not locked to 100MHz/PPS all ports are down and their LEDs are blinking.
HAL prints to log following errors for all LPDC ports (1-12):
`hald: Info (/wr/bin/wrsw_hal):Port X: tx phase measurement timeout expired, retrying`
Related to #281https://ohwr.org/project/wr-switch-sw/issues/282WRS stays in FR when configured as GM and any port is configured as slave2023-04-27T01:45:23ZAdam WujekWRS stays in FR when configured as GM and any port is configured as slaveWRS stays in FR when configured as GM and any port is configured as slave.
```
WR time (TAI) : 1970-01-01 00:19:40.008231 Leap seconds: 9
Switch time (UTC): 1970-01-01 00:19:31.005769 TAI-UTC : +9.002462
PLL mode: FR PLL locking state: LOCKED
----- HAL ---|---------------------------------- PPSI --------------------------------------------------------
Iface| Freq |Inst| Name | Config | MAC of peer port | PTP/EXT/PDETECT States | Pro | VLANs
------+------+----+--------------+------------+-------------------+------------------------------+-----+------
*wri1 | | 0 |wri1-1-wr-raw |slave | 00:00:00:00:00:00 | DISABLED /IDLE /NONE | R-W |
*wri2 | | 1 |wri2-1-wr-raw |master | 00:00:00:00:00:00 | DISABLED /IDLE /NONE | R-W |
*wri3 | | 2 |wri3-1-wr-raw |master | 00:00:00:00:00:00 | DISABLED /IDLE /NONE | R-W |
*wri4 | | 3 |wri4-1-wr-raw |master | 00:00:00:00:00:00 | DISABLED /IDLE /NONE | R-W |
*wri5 | | 4 |wri5-1-wr-raw |master | 00:00:00:00:00:00 | DISABLED /IDLE /NONE | R-W |
*wri6 | | 5 |wri6-1-wr-raw |master | 00:00:00:00:00:00 | DISABLED /IDLE /NONE | R-W |
*wri7 | | 6 |wri7-1-wr-raw |master | 00:00:00:00:00:00 | DISABLED /IDLE /NONE | R-W |
*wri8 | | 7 |wri8-1-wr-raw |master | 00:00:00:00:00:00 | DISABLED /IDLE /NONE | R-W |
*wri9 | | 8 |wri9-1-wr-raw |master | 00:00:00:00:00:00 | DISABLED /IDLE /NONE | R-W |
*wri10| | 9 |wri10-1-wr-raw|master | 00:00:00:00:00:00 | DISABLED /IDLE /NONE | R-W |
*wri11| | 10 |wri11-1-wr-raw|master | 00:00:00:00:00:00 | DISABLED /IDLE /NONE | R-W |
*wri12| | 11 |wri12-1-wr-raw|master | 00:00:00:00:00:00 | DISABLED /IDLE /NONE | R-W |
*wri13| | 12 |wri13-1-wr-raw|master | 00:00:00:00:00:00 | DISABLED /IDLE /NONE | R-W |
*wri14| | 13 |wri14-1-wr-raw|master | 00:00:00:00:00:00 | DISABLED /IDLE /NONE | R-W |
*wri15| | 14 |wri15-1-wr-raw|master | 00:00:00:00:00:00 | DISABLED /IDLE /NONE | R-W |
*wri16| | 15 |wri16-1-wr-raw|master | 00:00:00:00:00:00 | DISABLED /IDLE /NONE | R-W |
*wri17| | 16 |wri17-1-wr-raw|master | 00:00:00:00:00:00 | DISABLED /IDLE /NONE | R-W |
*wri18| | -- | | | | | |
Pro - Protocol mapping: V-Ethernet over VLAN; U-UDP; R-Ethernet
-------------------------------- Temperatures ---------------------------------
FPGA: 24.31 PLL: 50.69 PSL: 50.94 PSR: 52.44
```
[wrs_gm_dot-config.txt](/uploads/3c5b2955036e6e6bf32bafebbfed2af0/wrs_gm_dot-config.txt)https://ohwr.org/project/wr-switch-sw/issues/281Tx phase measurement timeout expired, when in GM and not locked2023-04-27T01:51:30ZAdam WujekTx phase measurement timeout expired, when in GM and not lockedHAL prints to log following errors for all LPDC ports (1-12) when WRS configured as GM, but unable to lock to 10MHz and PPS:
```hald: Info (/wr/bin/wrsw_hal):Port X: tx phase measurement timeout expired, retrying ```https://ohwr.org/project/wr-switch-sw/issues/280WR Switch cannot be used without diganostics errors with all ports configured...2023-05-30T00:02:25ZMaciej LipinskiWR Switch cannot be used without diganostics errors with all ports configured as nonWR Switch cannot be easily used as a fully non-WR switch, it will complain.
How to reproduce: disable PTP on all the portshttps://ohwr.org/project/wr-switch-sw/issues/277Jumbo frames dropped after a particular rate2024-01-31T22:30:25ZMaciej LipinskiJumbo frames dropped after a particular rateMost likely HDL issue, see https://ohwr.org/project/wr-switch-hdl/issues/41v7.0https://ohwr.org/project/wr-switch-sw/issues/276endpoint configuration in webinterface does not work2023-05-04T16:06:18ZAdam Wujekendpoint configuration in webinterface does not workAdvanced Mode -> Endpoint Configuration does not display current configuration.https://ohwr.org/project/wr-switch-sw/issues/269Build errors on ubuntu 22.04 LTS2024-03-19T14:01:11ZAdam WujekBuild errors on ubuntu 22.04 LTSThere are build errors during compilation of the buildroot. Errors are in m4 and gcc packages.
For m4:
```
>>> host-m4 1.4.17 Building
PATH="/build/buildroot-2016.02/output/host/bin:/build/buildroot-2016.02/output/host/sbin:/build/buildroot-2016.02/output/host/usr/bin:/build/buildroot-2016.02/output/host/usr/sbin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/sbin" PKG_CONFIG="/build/buildroot-2016.02/output/host/usr/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_LIBDIR="/build/buildroot-2016.02/output/host/usr/lib/pkgconfig" /usr/bin/make -C /build/buildroot-2016.02/output/build/host-m4-1.4.17/
make[1]: Entering directory '/build/buildroot-2016.02/output/build/host-m4-1.4.17'
/usr/bin/make all-recursive
make[2]: Entering directory '/build/buildroot-2016.02/output/build/host-m4-1.4.17'
Making all in .
make[3]: Entering directory '/build/buildroot-2016.02/output/build/host-m4-1.4.17'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/build/buildroot-2016.02/output/build/host-m4-1.4.17'
Making all in examples
make[3]: Entering directory '/build/buildroot-2016.02/output/build/host-m4-1.4.17/examples'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/build/buildroot-2016.02/output/build/host-m4-1.4.17/examples'
Making all in lib
make[3]: Entering directory '/build/buildroot-2016.02/output/build/host-m4-1.4.17/lib'
/usr/bin/make all-am
make[4]: Entering directory '/build/buildroot-2016.02/output/build/host-m4-1.4.17/lib'
/usr/bin/gcc -I. -I/build/buildroot-2016.02/output/host/usr/include -O2 -I/build/buildroot-2016.02/output/host/usr/include -c -o c-stack.o c-stack.c
In file included from /usr/include/signal.h:328,
from ./signal.h:52,
from c-stack.c:49:
c-stack.c:55:26: error: missing binary operator before token "("
55 | #elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
| ^~~~~~~~
```
Applying the patch https://raw.githubusercontent.com/keyfour/openwrt/2722d51c5cf6a296b8ecf7ae09e46690403a6c3d/tools/m4/patches/011-fix-sigstksz.patch does solve the problem with m4, but there are further problems with gcc
```
a@lts2204:~/wr/build$ WRS_NO_REPLACE_BUILDROOT=y ../wr-switch-sw/build/wrs_build-all
make -f Makefile.kconfig oldconfig
make[1]: Entering directory '/home/a/wr/wr-switch-sw'
make -f /home/a/wr/wr-switch-sw/scripts/Makefile.build obj=scripts/basic
make -f /home/a/wr/wr-switch-sw/scripts/Makefile.build obj=scripts/kconfig Makefile.kconfig
make[2]: Nothing to be done for 'Makefile.kconfig'.
make -f /home/a/wr/wr-switch-sw/scripts/Makefile.build obj=scripts/kconfig oldconfig
scripts/kconfig/conf --oldconfig /home/a/wr/wr-switch-sw/Kconfig
#
# configuration written to .config
#
make[1]: Leaving directory '/home/a/wr/wr-switch-sw'
Building with the following parameters:
WRS_BASE_DIR = /home/a/wr/wr-switch-sw/build
WRS_OUTPUT_DIR = /home/a/wr/build
WRS_DOWNLOAD_DIR = /home/a/wr/build/downloads
WRS_SCRIPTS_DIR = /home/a/wr/wr-switch-sw/build/scripts
WRS_DONE_DIR = /home/a/wr/build/build/_done
You may now ctrl-C for 3 seconds...
removed '/home/a/wr/build/build/_done/00-download'
make -f Makefile.kconfig oldconfig
make[1]: Entering directory '/home/a/wr/wr-switch-sw'
make -f /home/a/wr/wr-switch-sw/scripts/Makefile.build obj=scripts/basic
make -f /home/a/wr/wr-switch-sw/scripts/Makefile.build obj=scripts/kconfig Makefile.kconfig
make[2]: Nothing to be done for 'Makefile.kconfig'.
make -f /home/a/wr/wr-switch-sw/scripts/Makefile.build obj=scripts/kconfig oldconfig
scripts/kconfig/conf --oldconfig /home/a/wr/wr-switch-sw/Kconfig
#
# configuration written to .config
#
make[1]: Leaving directory '/home/a/wr/wr-switch-sw'
2023-01-26 14:05:54: --- Downloading base packages
2023-01-26 14:05:54: 01-buildroot_init done; skipping script wrs_buildroot_init
2023-01-26 14:05:54: 02-buildroot_download done; skipping script wrs_buildroot_download
make -f Makefile.kconfig oldconfig
make[1]: Entering directory '/home/a/wr/wr-switch-sw'
make -f /home/a/wr/wr-switch-sw/scripts/Makefile.build obj=scripts/basic
make -f /home/a/wr/wr-switch-sw/scripts/Makefile.build obj=scripts/kconfig Makefile.kconfig
make[2]: Nothing to be done for 'Makefile.kconfig'.
make -f /home/a/wr/wr-switch-sw/scripts/Makefile.build obj=scripts/kconfig oldconfig
scripts/kconfig/conf --oldconfig /home/a/wr/wr-switch-sw/Kconfig
#
# configuration written to .config
#
make[1]: Leaving directory '/home/a/wr/wr-switch-sw'
2023-01-26 14:05:55: --- Buildroot: compiler and filesystem
2023-01-26 14:05:55: Compiling buildroot
>>> host-gcc-initial 4.9.3 Building
PATH="/home/a/wr/build/build/buildroot-2016.02/output/host/bin:/home/a/wr/build/build/buildroot-2016.02/output/host/sbin:/home/a/wr/build/build/buildroot-2016.02/output/host/usr/bin:/home/a/wr/build/build/buildroot-2016.02/output/host/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/sbin" PKG_CONFIG="/home/a/wr/build/build/buildroot-2016.02/output/host/usr/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_LIBDIR="/home/a/wr/build/build/buildroot-2016.02/output/host/usr/lib/pkgconfig" /usr/bin/make -j3 gcc_cv_libc_provides_ssp=yes all-gcc all-target-libgcc -C /home/a/wr/build/build/buildroot-2016.02/output/build/host-gcc-initial-4.9.3/build
make[3]: Nothing to be done for 'all'.
make[4]: Nothing to be done for 'all'.
make[4]: Nothing to be done for 'all'.
true "AR_FLAGS=rc" "CC_FOR_BUILD=/usr/bin/gcc" "CFLAGS=-O2 -I/home/a/wr/build/build/buildroot-2016.02/output/host/usr/include" "CXXFLAGS=-O2 -I/home/a/wr/build/build/buildroot-2016.02/output/host/usr/include" "CFLAGS_FOR_BUILD=-O2 -I/home/a/wr/build/build/buildroot-2016.02/output/host/usr/include" "CFLAGS_FOR_TARGET=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os " "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install -c" "LDFLAGS=-static-libstdc++ -static-libgcc -L/home/a/wr/build/build/buildroot-2016.02/output/host/lib -L/home/a/wr/build/build/buildroot-2016.02/output/host/usr/lib -Wl,-rpath,/home/a/wr/build/build/buildroot-2016.02/output/host/usr/lib" "LIBCFLAGS=-O2 -I/home/a/wr/build/build/buildroot-2016.02/output/host/usr/include" "LIBCFLAGS_FOR_TARGET=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os " "MAKE=/usr/bin/make" "MAKEINFO=/home/a/wr/build/build/buildroot-2016.02/output/build/host-gcc-initial-4.9.3/missing makeinfo --split-size=5000000 " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/bash" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/home/a/wr/build/build/buildroot-2016.02/output/host/usr" "infodir=/home/a/wr/build/build/buildroot-2016.02/output/host/usr/share/info" "libdir=/home/a/wr/build/build/buildroot-2016.02/output/host/usr/lib" "prefix=/home/a/wr/build/build/buildroot-2016.02/output/host/usr" "tooldir=/home/a/wr/build/build/buildroot-2016.02/output/host/usr/arm-buildroot-linux-gnueabi" "AR=/usr/bin/ar" "AS=/usr/bin/as" "CC=/usr/bin/gcc" "CXX=/usr/bin/g++" "LD=/usr/bin/ld" "LIBCFLAGS=-O2 -I/home/a/wr/build/build/buildroot-2016.02/output/host/usr/include" "NM=/usr/bin/nm" "PICFLAG=" "RANLIB=/usr/bin/ranlib" "DESTDIR=" DO=all multi-do # /usr/bin/make
/usr/bin/make all-am
true DO=all multi-do # /usr/bin/make
make[3]: Nothing to be done for 'all'.
/usr/bin/make all-am
test -f config.h || (rm -f stamp-h1 && /usr/bin/make stamp-h1)
make[3]: Nothing to be done for 'all'.
make[3]: Nothing to be done for 'all'.
/usr/bin/g++ -c -O2 -I/home/a/wr/build/build/buildroot-2016.02/output/host/usr/include -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I/home/a/wr/build/build/buildroot-2016.02/output/host/usr/include -I/home/a/wr/build/build/buildroot-2016.02/output/host/usr/include -I/home/a/wr/build/build/buildroot-2016.02/output/host/usr/include -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/../libbacktrace -o reload1.o -MT reload1.o -MMD -MP -MF ./.deps/reload1.TPo ../../gcc/reload1.c
/usr/bin/g++ -c -O2 -I/home/a/wr/build/build/buildroot-2016.02/output/host/usr/include -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I/home/a/wr/build/build/buildroot-2016.02/output/host/usr/include -I/home/a/wr/build/build/buildroot-2016.02/output/host/usr/include -I/home/a/wr/build/build/buildroot-2016.02/output/host/usr/include -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/../libbacktrace -o resource.o -MT resource.o -MMD -MP -MF ./.deps/resource.TPo ../../gcc/resource.c
/usr/bin/g++ -c -O2 -I/home/a/wr/build/build/buildroot-2016.02/output/host/usr/include -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I/home/a/wr/build/build/buildroot-2016.02/output/host/usr/include -I/home/a/wr/build/build/buildroot-2016.02/output/host/usr/include -I/home/a/wr/build/build/buildroot-2016.02/output/host/usr/include -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/../libbacktrace -o rtl-error.o -MT rtl-error.o -MMD -MP -MF ./.deps/rtl-error.TPo ../../gcc/rtl-error.c
In file included from ./tm.h:26,
from ../../gcc/resource.c:23:
../../gcc/config/elfos.h:102:21: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
102 | fprintf ((FILE), "%s"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
| ^
../../gcc/config/elfos.h:170:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
170 | fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
| ^
In file included from ./tm.h:26,
from ../../gcc/rtl-error.c:24:
../../gcc/config/elfos.h:102:21: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
102 | fprintf ((FILE), "%s"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
| ^
../../gcc/config/elfos.h:170:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
170 | fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
| ^
In file included from ./tm.h:26,
from ../../gcc/reload1.c:23:
../../gcc/config/elfos.h:102:21: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
102 | fprintf ((FILE), "%s"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
| ^
../../gcc/config/elfos.h:170:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
170 | fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
| ^
In file included from ./tm.h:47,
from ../../gcc/rtl-error.c:24:
../../gcc/defaults.h:126:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
126 | fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
| ^
In file included from ./tm.h:47,
from ../../gcc/reload1.c:23:
../../gcc/defaults.h:126:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
126 | fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
| ^
In file included from ./tm.h:47,
from ../../gcc/resource.c:23:
../../gcc/defaults.h:126:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
126 | fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
| ^
In file included from ../../gcc/reload1.c:41:
../../gcc/recog.h:338:5: warning: this use of "defined" may not be portable [-Wexpansion-to-defined]
338 | #if HAVE_DESIGNATED_UNION_INITIALIZERS
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../gcc/resource.c: In function ‘void mark_referenced_resources(rtx, resources*, bool)’:
../../gcc/resource.c:370:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
370 | }
| ^
../../gcc/resource.c:374:5: note: here
374 | case INSN:
| ^~~~
../../gcc/resource.c: In function ‘void mark_set_resources(rtx, resources*, int, mark_resource_type)’:
../../gcc/resource.c:673:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
673 | }
| ^
../../gcc/resource.c:677:5: note: here
677 | case JUMP_INSN:
| ^~~~
/usr/bin/g++ -c -O2 -I/home/a/wr/build/build/buildroot-2016.02/output/host/usr/include -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -I/home/a/wr/build/build/buildroot-2016.02/output/host/usr/include -I/home/a/wr/build/build/buildroot-2016.02/output/host/usr/include -I/home/a/wr/build/build/buildroot-2016.02/output/host/usr/include -I../../gcc/../libdecnumber -I../../gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/../libbacktrace -o rtl.o -MT rtl.o -MMD -MP -MF ./.deps/rtl.TPo ../../gcc/rtl.c
In file included from ../../gcc/reload1.c:41:
../../gcc/recog.h: In member function ‘rtx_def* insn_gen_fn::operator()(rtx) const’:
../../gcc/recog.h:283:44: warning: cast between incompatible function types from ‘insn_gen_fn::stored_funcptr’ {aka ‘rtx_def* (*)()’} to ‘insn_gen_fn::f1’ {aka ‘rtx_def* (*)(rtx_def*)’} [-Wcast-function-type]
283 | rtx operator () (rtx a0) const { return ((f1)func) (a0); }
| ^~~~~~~~
../../gcc/recog.h: In member function ‘rtx_def* insn_gen_fn::operator()(rtx, rtx) const’:
../../gcc/recog.h:284:52: warning: cast between incompatible function types from ‘insn_gen_fn::stored_funcptr’ {aka ‘rtx_def* (*)()’} to ‘insn_gen_fn::f2’ {aka ‘rtx_def* (*)(rtx_def*, rtx_def*)’} [-Wcast-function-type]
284 | rtx operator () (rtx a0, rtx a1) const { return ((f2)func) (a0, a1); }
| ^~~~~~~~
../../gcc/recog.h: In member function ‘rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx) const’:
../../gcc/recog.h:285:60: warning: cast between incompatible function types from ‘insn_gen_fn::stored_funcptr’ {aka ‘rtx_def* (*)()’} to ‘insn_gen_fn::f3’ {aka ‘rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*)’} [-Wcast-function-type]
285 | rtx operator () (rtx a0, rtx a1, rtx a2) const { return ((f3)func) (a0, a1, a2); }
| ^~~~~~~~
../../gcc/recog.h: In member function ‘rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx) const’:
../../gcc/recog.h:286:68: warning: cast between incompatible function types from ‘insn_gen_fn::stored_funcptr’ {aka ‘rtx_def* (*)()’} to ‘insn_gen_fn::f4’ {aka ‘rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*)’} [-Wcast-function-type]
286 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3) const { return ((f4)func) (a0, a1, a2, a3); }
| ^~~~~~~~
../../gcc/recog.h: In member function ‘rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx) const’:
../../gcc/recog.h:287:76: warning: cast between incompatible function types from ‘insn_gen_fn::stored_funcptr’ {aka ‘rtx_def* (*)()’} to ‘insn_gen_fn::f5’ {aka ‘rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)’} [-Wcast-function-type]
287 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4) const { return ((f5)func) (a0, a1, a2, a3, a4); }
| ^~~~~~~~
../../gcc/recog.h: In member function ‘rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx) const’:
../../gcc/recog.h:288:84: warning: cast between incompatible function types from ‘insn_gen_fn::stored_funcptr’ {aka ‘rtx_def* (*)()’} to ‘insn_gen_fn::f6’ {aka ‘rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)’} [-Wcast-function-type]
288 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5) const { return ((f6)func) (a0, a1, a2, a3, a4, a5); }
| ^~~~~~~~
../../gcc/recog.h: In member function ‘rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx) const’:
../../gcc/recog.h:289:92: warning: cast between incompatible function types from ‘insn_gen_fn::stored_funcptr’ {aka ‘rtx_def* (*)()’} to ‘insn_gen_fn::f7’ {aka ‘rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)’} [-Wcast-function-type]
289 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6) const { return ((f7)func) (a0, a1, a2, a3, a4, a5, a6); }
| ^~~~~~~~
In file included from ../../gcc/reload1.c:41:
../../gcc/recog.h: In member function ‘rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const’:
../../gcc/recog.h:290:100: warning: cast between incompatible function types from ‘insn_gen_fn::stored_funcptr’ {aka ‘rtx_def* (*)()’} to ‘insn_gen_fn::f8’ {aka ‘rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)’} [-Wcast-function-type]
290 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7) const { return ((f8)func) (a0, a1, a2, a3, a4, a5, a6, a7); }
| ^~~~~~~~
../../gcc/recog.h: In member function ‘rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const’:
../../gcc/recog.h:291:108: warning: cast between incompatible function types from ‘insn_gen_fn::stored_funcptr’ {aka ‘rtx_def* (*)()’} to ‘insn_gen_fn::f9’ {aka ‘rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)’} [-Wcast-function-type]
291 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8) const { return ((f9)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8); }
| ^~~~~~~~
../../gcc/recog.h: In member function ‘rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const’:
../../gcc/recog.h:292:116: warning: cast between incompatible function types from ‘insn_gen_fn::stored_funcptr’ {aka ‘rtx_def* (*)()’} to ‘insn_gen_fn::f10’ {aka ‘rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)’} [-Wcast-function-type]
292 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9) const { return ((f10)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }
| ^~~~~~~~~
../../gcc/recog.h: In member function ‘rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const’:
../../gcc/recog.h:293:125: warning: cast between incompatible function types from ‘insn_gen_fn::stored_funcptr’ {aka ‘rtx_def* (*)()’} to ‘insn_gen_fn::f11’ {aka ‘rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)’} [-Wcast-function-type]
293 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10) const { return ((f11)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10); }
| ^~~~~~~~~
../../gcc/recog.h: In member function ‘rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const’:
../../gcc/recog.h:294:134: warning: cast between incompatible function types from ‘insn_gen_fn::stored_funcptr’ {aka ‘rtx_def* (*)()’} to ‘insn_gen_fn::f12’ {aka ‘rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)’} [-Wcast-function-type]
294 | rtx operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11) const { return ((f12)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11); }
| ^~~~~~~~~
../../gcc/recog.h: In member function ‘rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const’:
../../gcc/recog.h:295:143: warning: cast between incompatible function types from ‘insn_gen_fn::stored_funcptr’ {aka ‘rtx_def* (*)()’} to ‘insn_gen_fn::f13’ {aka ‘rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)’} [-Wcast-function-type]
295 | x operator () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12) const { return ((f13)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12); }
| ^~~~~~~~~
../../gcc/recog.h: In member function ‘rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const’:
../../gcc/recog.h:296:152: warning: cast between incompatible function types from ‘insn_gen_fn::stored_funcptr’ {aka ‘rtx_def* (*)()’} to ‘insn_gen_fn::f14’ {aka ‘rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)’} [-Wcast-function-type]
296 | r () (rtx a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12, rtx a13) const { return ((f14)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13); }
| ^~~~~~~~~
../../gcc/recog.h: In member function ‘rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const’:
../../gcc/recog.h:297:161: warning: cast between incompatible function types from ‘insn_gen_fn::stored_funcptr’ {aka ‘rtx_def* (*)()’} to ‘insn_gen_fn::f15’ {aka ‘rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)’} [-Wcast-function-type]
297 | a0, rtx a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12, rtx a13, rtx a14) const { return ((f15)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
| ^~~~~~~~~
../../gcc/recog.h: In member function ‘rtx_def* insn_gen_fn::operator()(rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx, rtx) const’:
../../gcc/recog.h:298:170: warning: cast between incompatible function types from ‘insn_gen_fn::stored_funcptr’ {aka ‘rtx_def* (*)()’} to ‘insn_gen_fn::f16’ {aka ‘rtx_def* (*)(rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*, rtx_def*)’} [-Wcast-function-type]
298 | a1, rtx a2, rtx a3, rtx a4, rtx a5, rtx a6, rtx a7, rtx a8, rtx a9, rtx a10, rtx a11, rtx a12, rtx a13, rtx a14, rtx a15) const { return ((f16)func) (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15); }
| ^~~~~~~~~
../../gcc/reload1.c: In function ‘void init_reload()’:
../../gcc/reload1.c:89:24: error: use of an operand of type ‘bool’ in ‘operator++’ is forbidden in C++17
89 | (this_target_reload->x_spill_indirect_levels)
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
../../gcc/reload1.c:444:7: note: in expansion of macro ‘spill_indirect_levels’
444 | spill_indirect_levels++;
| ^~~~~~~~~~~~~~~~~~~~~
In file included from ./tm.h:26,
from ../../gcc/rtl.c:30:
../../gcc/config/elfos.h:102:21: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
102 | fprintf ((FILE), "%s"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\
| ^
../../gcc/config/elfos.h:170:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
170 | fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
| ^
In file included from ./tm.h:47,
from ../../gcc/rtl.c:30:
../../gcc/defaults.h:126:24: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
126 | fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", \
| ^
../../gcc/reload1.c: In function ‘void elimination_effects(rtx, machine_mode)’:
../../gcc/reload1.c:3044:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
3044 | if (code == POST_MODIFY || code == PRE_MODIFY)
| ^~
../../gcc/reload1.c:3048:5: note: here
3048 | case STRICT_LOW_PART:
| ^~~~
make[3]: *** [Makefile:1058: reload1.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:3954: all-gcc] Error 2
make[1]: *** [package/pkg-generic.mk:198: /home/a/wr/build/build/buildroot-2016.02/output/build/host-gcc-initial-4.9.3/.stamp_built] Error 2
make: *** [Makefile:36: _all] Error 2
2023-01-26 14:06:03: Error: buildroot compilation
2023-01-26 14:06:03: Error: Building step /home/a/wr/wr-switch-sw/build/scripts/wrs_buildroot_build failed. Build aborted !
```
v7.0https://ohwr.org/project/wr-switch-sw/issues/267RTU does not forward broadcast frames (FF:FF:FF:FF:FF:FF) to CPU2024-03-06T23:18:53ZAdam WujekRTU does not forward broadcast frames (FF:FF:FF:FF:FF:FF) to CPUEven executing the following in RTU does not enable forwarding
```
rtu_learn_enable_on_port(18, 1);
rtu_pass_all_on_port(18, 1);
rtu_unset_fixed_prio_on_port(18);
rtu_set_unrecognised_behaviour_on_port(18, 1);
```
An addition of enabling HP mask does the job:
```wrs_vlans --hpmask 0xff```https://ohwr.org/project/wr-switch-sw/issues/262GM's sinusoidal offset from the reference's PPS (ISPCS2022 tests)2024-03-06T23:25:26ZMaciej LipinskiGM's sinusoidal offset from the reference's PPS (ISPCS2022 tests)We performed test using SwabianInstruments Time Tagger X (2ps RMS precision). In the test, we measure PPS offset between WR Switch Grandmaster and other devices synchronized to it. During the test, we observed strange PPS offset increase every N
PPSes/seconds:
- The amplitude of the increase creates sinusoidal signal with period of ~1800 samples/seconds (~30 min)
- The PPS offset increase happens every 14 samples/seconds (i.e. 13 samples between the occurrence)
- The issue occurred only when GM was locked to GPSDO, it was not present when GM was freerining
Test setup/results and some analysis are presented here: [GM-possble-bug-ISPCS2022-test.pdf](/uploads/64b0ba2c0c9b14e55f1234a20d982462/GM-possble-bug-ISPCS2022-test.pdf)
All data from the tests is available here: https://cernbox.cern.ch/s/KVULDoDIkWoabHX
The regularity of the phenomena might indicate that the problem is on the measurement device... to be investigated.https://ohwr.org/project/wr-switch-sw/issues/261wrong impementation of shmemState in hal_shmem?2022-11-24T22:46:07ZAdam Wujekwrong impementation of shmemState in hal_shmem?Probably `shmemState` in `hal_shmem` is set to `HAL_SHMEM_STATE_INITITALIZED` too early. It is suspected that the intention was that `HAL_SHMEM_STATE_INITITALIZED` is after the LPDC calibration takes place.
When checking whether all ports are initialized (function `hal_port_all_ports_initialized`) the following if condition:
```
if ( ps->in_use && fsm_get_state( &ps->fsm ) ==HAL_PORT_STATE_INIT ) {
```
does not take into account that port's fsm (`ps->fsm`) can be not initialized (`fsm_get_state(&ps->fsm)` returns -1 value).
As a consequence, the function `hal_port_all_ports_initialized` reports that all ports are initialized before they even enter init (`HAL_PORT_STATE_INIT`) state.
The call of `fsm_fire_state(&ps->fsm , HAL_PORT_STATE_INIT);` in the function `hal_port_state_fsm_init_all` does not change the state of the port's fsm (`ps->fsm`). The transition to a new state is done after the call of `fsm_generic_run`.
The function `fsm_fire_state` does not change the current state, it only changes the value of `newState`:
```
/* schedules next state of the FSM to newState */
static inline void fsm_fire_state(fsm_t *fsm, int newState)
{
fsm->st.nextState=newState;
}
```
rtud at startup waits for the `HAL_SHMEM_STATE_INITITALIZED`. In case `HAL_SHMEM_STATE_INITITALIZED` is set after the LPDC is finished, it is too late. In rtud the number of retries to connect to hal's shmem exceeds `HAL_SHMEM_RETRIES`. It causes the process to fail. Since rtud is not running wrs_vlans is not able to configure VLANs. Monit eventually restarts rtud process, but wrs_vlans is run only once by init.
**Proposed solution:**
Remove `shmemState==HAL_SHMEM_STATE_INITITALIZED ` (entire while loop) check from `wrsw_rtud/rtu_drv.c` and add the condition `|| fsm_get_state(&ps->fsm) < 0` to the if statement in the function `hal_port_all_ports_initialized` (file `wrsw_hal/hal_ports.c`).
[proposed_solution_bug_261.patch](/uploads/37cfc9b768e6882f977c96632521e2db/proposed_solution_bug_261.patch)