Hi:
I have a custom AM5708 based board with SDK6.02.
I have 2 ethernet ports, eth1 & eth2, managed by PRU2 and have configured them in bonding mode.
Briefly the issue happens when PTP is running over bonding redundancy mode. If I configure only bonding redundancy mode
I can see the pings from a PC over the active port so it is working fine. But if afterwards I run ptp then I get
some pings lost.
The setup is very simple:
- One switch with 4 cable ports
- PTP master connected to 1 switch port
- Linux PC connected to 1 switch port
- 2 redundancy ports of my custom board connected to 2 switch ports.
1.- I setup the scenario in bonding redundancy mode (start_lla.sh) in active-backup mode with SAME MAC addresses for eth1 and eth2:
A.-
- All 4 cables are connected.
- There is one parameter inside ptp configuration file (redundancy) that can take 3 values: 0, 1, and 2.
With 0 and 2 the behavior is the same, 1 is for HSR.
- I ping from PC and none request reply is lost. I run “tcpdump” over bond0, eth1, eth2
I can see that if eth1 is connected (active) all the pings request-replay messages in eth1 are in bond0
If I disconnected eth1 and eth2 becomes active I see with “tcpdump” the same behavior as with eth1 but in eth2 port.
- I see that TX packets are NOT increasing in the inactive port
B.-
- All 4 cables connected
- Later on I run ptp “ptp4l -f ptp_pru.cfg “
- There is one parameter inside ptp configuration file called “redundancy” that may take 3 values: 0, 1, and 2.
With 0 and 2 the behavior is the same, 1 is for HSR.
- I observe ping losses. After running “tcpdump” for bond0, eth1 and eth2 I can see that both eth1 and eth2 are receiving ping requests.
If a ping request is receive in one port, the other port does not receive this request.
When eth2 receives the ping requests these messages are NOT forwarded to bond0 and therefore there are not any replies, so ping losses.
When eth1 receives the ping requeste then these messages are forwarded to bond0 and therefore there are the correspondent replies.
- If I disconnected one of the 2 ports then it works fine.
- I see that TX packets are increasing in the inactive port
C.-
- All 4 cables connected
- Later on I kill ptp task “ptp4l -f ptp_pru.cfg “.
- In this case it works fine as in A.
2.- I setup the scenario in bonding redundancy mode (start_lla.sh) in active-backup mode with DIFFERENT MAC addresses for eth1 and eth2:
- All 4 cables are connected.
- In this case eth1 MAC address is different from eth2 MAC address.
Bond0 MAC address assumes the MAC address of the active port (eth1 or eth2).
- In this case the behavior with PTP is correct.
Our application requieres to work in the 1º scenario (2 identical MAC address).
Questions:
1.- Can there be any configuration parameter that may affect PRU firmware?
My understanding is that PRU should block any incoming message from inactive port.
2.- What is the correct value for “redundancy” parameter in the PTP configuration file?
3.- Where can we get information about how to configure PTP over bonding?
Any suggestion will be welcome.
Regards
Billa