The application check_clocks does not work, when ptp4l works on multiple interfaces (e.g. a switch ptp4l -f /etc/ptp4l-tsn.cfg -i enp2s0np2 -i enp2s0np3 -i enp2s0np4 -i enp2s0np5).
Rought overview of the required adaptions for such cases
- The intefaces appear as additional messages on the socket, when query the port states here, so poll needs to be called multiple times to read all port states.
|
int n = poll(&pollfd, 1, 1000); |
- For all received ports, this needs to be done:
|
static bool get_port_status(uint8_t *rec_buf, int *port_state) |
PS: I don't known if this issue is out ot scope for the application check_clocks. But I think it's worth documenting this, in case someone else has the same issues like me.
The application check_clocks does not work, when ptp4l works on multiple interfaces (e.g. a switch
ptp4l -f /etc/ptp4l-tsn.cfg -i enp2s0np2 -i enp2s0np3 -i enp2s0np4 -i enp2s0np5).Rought overview of the required adaptions for such cases
tsn-doc/misc/check_clocks.c
Line 254 in b4540e1
tsn-doc/misc/check_clocks.c
Line 284 in b4540e1
PS: I don't known if this issue is out ot scope for the application check_clocks. But I think it's worth documenting this, in case someone else has the same issues like me.