Part Number: AM6442
Hello,
Our team is implementing offloaded PRP functionality using PRU firmware. There was one issue that we encountered recently. When configuring PRP either using a provided script or using below command directly:
ip link add name $if type hsr slave1 "$ifa" slave2 "$ifb" supervision 45 proto 1
there is a significant difference between offload and non-offload mode. Non-offload mode uses slave1 and slave2 parameters to assign "LAN A" and "LAN B" labels in PRP trailer to "ifa" and "ifb" interfaces respectively. For offloaded mode this is not the case, "LAN A" and "LAN B" labels are assigned based on MII0 and MII1 mapping (earlier confirmed by TI support).
Suggested workaround was to swap RX path and TX path mapping for MII0 and MII1 mapping using RX_MUX_SEL0/1 and TX_MUX_SEL0/1 bits in ICSSG MII_RT_RXCFG0/1 and MII_RT_TXCFG0/1 registers. This initially seemed to work, but after further tests it turned out it interferes at least with PTP operation. Assuming that before registers swap eth3 is MII0 and eth2 is MII1, below can be noticed after swapping:
- using tcpdump - packets that are sent from PTP master connected to eth2 are captured on eth3,
- ptp4l - master clock is not seen on eth2 until there is any device (also non-PTP) connected to eth3,
- once something is connected to both ports, "port 1 (eth3): new foreign master..." logs from ptp4l can be seen but with wrong port (master is connected to eth2),
- ptp4l synchronization works before swap, but after swapping timing values are incorrect (~100000 ns instead of ~900 ns for path delay, ~10000 ns insted of ~100 ns for master offset).
Taking these issue into consideration, my question is:
Is there any alternative way to remap "LAN A" and "LAN B" naming that also allows to avoid above issues?
Best regards,
Mateusz