Other Parts Discussed in Thread: AM5728
Hi:
I have a custom AM5708 based board with SDK6.02 Linux RT.
The board has 3 ethernet interfaces:
- eth0: connected to GMAC
- eth1: connected to prueth pruss2_eth
- eth2: connected prueth pruss2_eth
I have configured eth1 and eth2 to work independently (see attached script "dual.sh").prueth.c.txtcrash_billa5.txtcrash_trafico_vault_killer.pcapng.txt
#!/bin/bash echo "Get MAC & IPs information ..." MAC_A="00:a0:f4:de:ad:11" MAC_B="00:a0:f4:de:ad:22" IP_A="192.168.33.187" MASK_A="255.255.255.0" GW_A="192.168.33.1" IP_B="192.168.34.188" MASK_B="255.255.255.0" GW_B="192.168.34.1" sleep 1 echo "Set LLA interface down .." /sbin/ifconfig bond0 down /sbin/ip link delete bond0 /sbin/rmmod bonding sleep 1 echo "Set PRP interface down .." /sbin/ifconfig prp0 down /sbin/ip link delete prp0 sleep 1 echo "Set HSR interface down .." /sbin/ifconfig hsr0 down /sbin/ip link delete hsr0 sleep 1 echo "Set RSTP interface down .." /sbin/ifconfig br0 down /sbin/ip link delete br0 sleep 1 echo "Set DUAL interfaces down .." /sbin/ifconfig eth1 0.0.0.0 down /sbin/ifconfig eth2 0.0.0.0 down sleep 1 echo "Set MAC address ${MAC_A} and ${MAC_B} to eth1 & eth2 interfaces .." /sbin/ifconfig eth1 hw ether ${MAC_A} /sbin/ifconfig eth2 hw ether ${MAC_B} sleep 1 echo "Unset PRP-HSR-SW offload ..." /usr/sbin/ethtool -K eth1 prp-rx-offload off /usr/sbin/ethtool -K eth2 prp-rx-offload off /usr/sbin/ethtool -K eth1 hsr-rx-offload off /usr/sbin/ethtool -K eth2 hsr-rx-offload off /usr/sbin/ethtool -K eth1 l2-fwd-offload off /usr/sbin/ethtool -K eth2 l2-fwd-offload off sleep 1 echo "Set rx parameters ..." /usr/sbin/ethtool -C eth1 rx-usecs 200 /usr/sbin/ethtool -C eth2 rx-usecs 200 /usr/sbin/ethtool -C eth1 adaptive-rx on /usr/sbin/ethtool -C eth2 adaptive-rx on sleep 1\n"); echo "Set eth1 with IP=${IP_A} and eth2 with IP=${IP_B} interfaces up .." /opt/edge-agent/ipv4-set eth1 MANUAL ip4 ${IP_A}/24 gw ${GW_A} /sbin/ifconfig eth1 ${IP_A} netmask ${MASK_A} up sleep 1 /opt/edge-agent/ipv4-set eth2 MANUAL ip4 ${IP_B}/24 gw ${GW_B} /sbin/ifconfig eth2 ${IP_B} netmask ${MASK_B} up sleep 1 echo "Set eth0 in allmulticast mode .." /sbin/ifconfig eth0 allmulti sleep 1 echo "Set eth1 in allmulticast mode .." /sbin/ifconfig eth1 allmulti sleep 1 echo "Set eth2 in allmulticast mode .." /sbin/ifconfig eth2 allmulti sleep 1
I have connected eth1 and eth2 to our local network where we have some traffic (see attached "crash_trafico_vault_killer.pcapng").
I boot up the system over NFS with TI Linux over eth0.
Interfaces eth1 and eth2 are configured to accept GOOSE messages (interfaces in allmulticast mode) as GOOSE messages are circulating around the local network.
After some time I have detected something strange in reception, as if it gets corrupted. So I decided to put some printks in A15 "prueth.c" driver in the reception function "emac_rx_packet()" (see attached "prueth.c").
I know that there is a shared memory between A15 prueth.c driver and PRU firmware for buffer descriptors, and that there is s shared memory in OCMC where the incoming frames are placed by PRU firmware for A15 prueth driver to take them out in a FIFO way.
I have detected that sometimes the BD pointer "bd_rd_ptr" that point to BD shared memory has a wrong value so it can make the driver crash.
I tried to workaround this situation to avoid the driver crashing and see in this situation that even reloading the PRU firmware (ifconfig ethx down/up) the issue persists, as if the prueth driver would be unable to recover.
I have made a few tests but with interfaces eth1 and eth2 in PRP mode asit means that there is a different PRU firmware than in dual-independent mode. It hasn´t failed yet but I will continue with the test
Regards
Billa