Other Parts Discussed in Thread: TEST2
Tool/software:
Hello Ti,
I'm currently testing with the release : 11.00.09.04
I found that there are two IRQs coming from queues from eth1 and eth2 for HSR packets. But the duplicated packets should be removed by the PRU firmware, I would expect only one IRQ.
Here is the procedure :
On u-boot :
=> setenv name_overlays 'ti/k3-am642-evm-icssg1-dualemac.dtbo' => printenv name_overlays => saveenv
Disable Network Manager :
systemctl disable dhcpcd.service systemctl disable NetworkManager.service systemctl disable systemd-resolved.service systemctl disable systemd-networkd.service sync reboot
Set Link speed to
ethtool -s eth1 speed 100 duplex full ethtool -s eth2 speed 100 duplex full
Enable HSR with the script proposed on ti doc + up eth1 and eth2
More details :root@am64xx-evm:~# cat hsr_script_ti.sh #!/bin/sh #For non offload - sh hsr_setup.sh hsr_sw <INTF_A> <INTF_B> <HSR_INTF_IP_ADDR> #For offload - sh hsr_setup.sh hsr_hw <INTF_A> <INTF_B> <HSR_INTF_IP_ADDR> if [ "$#" != "4" ] then echo "$0 <hsr_sw/hsr_hw> <intf1> <intf2> <ip addr>" exit fi if [ "$1" != "hsr_sw" ] && [ "$1" != "hsr_hw" ] then echo "$0 <hsr_sw|hsr_hw>" exit fi if=hsr0 ifa=$2 ifb=$3 ip=$4 mac=$(ifconfig "$ifa" | grep ether | cut -d " " -f 10) echo "ip=$ip" echo "if=$if" echo "mac=$mac" echo "slave-a=$ifa" echo "slave-b=$ifb" ip link set hsr0 down ip link delete hsr0 2> /dev/null if [ "$1" = "hsr_hw" ] then ethtool -k "$ifa" | grep hsr ethtool -K "$ifa" hsr-fwd-offload on ethtool -K "$ifa" hsr-dup-offload on ethtool -K "$ifa" hsr-tag-ins-offload on ethtool -K "$ifa" hsr-tag-rm-offload on ethtool -k "$ifa" | grep hsr ethtool -k "$ifb" | grep hsr ethtool -K "$ifb" hsr-fwd-offload on ethtool -K "$ifb" hsr-dup-offload on ethtool -K "$ifb" hsr-tag-ins-offload on ethtool -K "$ifb" hsr-tag-rm-offload on ethtool -k "$ifb" | grep hsr fi ip link set dev "$ifa" address "$mac" ip link set dev "$ifb" address "$mac" ip link add name $if type hsr slave1 "$ifa" slave2 "$ifb" supervision 45 version 1 sleep 3 ip addr add "$ip"/24 dev $if ip link set $if up ip link set $ifa up sleep 1 ip link set $ifb up sleep 1
Here is what I've observed :*************************************************************** *************************************************************** root@am64xx-evm:~# ethtool -s eth1 speed 100 duplex full ed 100 duplex fullroot@am64xx-evm:~# ethtool -s eth2 speed 100 duplex full root@am64xx-evm:~# root@am64xx-evm:~# root@am64xx-evm:~# root@am64xx-evm:~# ./hsr_script_ti.sh hsr_hw eth1 eth2 192.168.1.19 ip=192.168.1.19 if=hsr0 mac=70:ff:76:1f:41:11 slave-a=eth1 slave-b=eth2 Cannot find device "hsr0" hsr-tag-ins-offload: off hsr-tag-rm-offload: off hsr-fwd-offload: off hsr-dup-offload: off Actual changes: hsr-tag-ins-offload: on [not requested] hsr-dup-offload: on hsr-tag-ins-offload: on hsr-tag-rm-offload: on hsr-fwd-offload: on hsr-dup-offload: on hsr-tag-ins-offload: off hsr-tag-rm-offload: off hsr-fwd-offload: off hsr-dup-offload: off Actual changes: hsr-tag-ins-offload: on [not requested] hsr-dup-offload: on hsr-tag-ins-offload: on hsr-tag-rm-offload: on hsr-fwd-offload: on hsr-dup-offload: on [ 31.757554] icssg-prueth icssg1-eth eth1: timeout waiting for command done [ 31.774708] icssg-prueth icssg1-eth eth2: timeout waiting for command done [ 31.781651] icssg-prueth icssg1-eth: Failed to restart the firmwares, aborting the process [ 34.830876] hsr0: Slave A (eth1) is not up; please bring it up to get a fully working HSR network [ 34.839846] hsr0: Slave B (eth2) is not up; please bring it up to get a fully working HSR network [ 34.869401] remoteproc remoteproc13: powering up 300b4000.pru [ 34.881567] remoteproc remoteproc13: Booting fw image ti-pruss/am65x-sr2-pru0-pruhsr-fw.elf, siz8 [ 34.891101] remoteproc remoteproc13: unsupported resource 5 [ 34.896760] remoteproc remoteproc13: remote processor 300b4000.pru is now up [ 34.903924] remoteproc remoteproc16: powering up 30084000.rtu [ 34.913148] remoteproc remoteproc16: Booting fw image ti-pruss/am65x-sr2-rtu0-pruhsr-fw.elf, siz0 [ 34.922672] remoteproc remoteproc16: remote processor 30084000.rtu is now up [ 34.929805] remoteproc remoteproc7: powering up 3008a000.txpru [ 34.939081] remoteproc remoteproc7: Booting fw image ti-pruss/am65x-sr2-txpru0-pruhsr-fw.elf, si2 [ 34.948748] remoteproc remoteproc7: remote processor 3008a000.txpru is now up [ 34.958728] remoteproc remoteproc14: powering up 300b8000.pru [ 34.967992] remoteproc remoteproc14: Booting fw image ti-pruss/am65x-sr2-pru1-pruhsr-fw.elf, siz8 [ 34.977474] remoteproc remoteproc14: unsupported resource 5 [ 34.983087] remoteproc remoteproc14: remote processor 300b8000.pru is now up [ 34.990236] remoteproc remoteproc15: powering up 30086000.rtu [ 34.999348] remoteproc remoteproc15: Booting fw image ti-pruss/am65x-sr2-rtu1-pruhsr-fw.elf, siz6 [ 35.008831] remoteproc remoteproc15: remote processor 30086000.rtu is now up [ 35.015949] remoteproc remoteproc8: powering up 3008c000.txpru [ 35.025142] remoteproc remoteproc8: Booting fw image ti-pruss/am65x-sr2-txpru1-pruhsr-fw.elf, si0 [ 35.034722] remoteproc remoteproc8: remote processor 3008c000.txpru is now up [ 35.053607] icssg-prueth icssg1-eth eth1: Link is Up - 100Mbps/Full - flow control off [ 36.089765] icssg-prueth icssg1-eth eth2: Link is Up - 100Mbps/Full - flow control off root@am64xx-evm:~#
After pinging we see that the number of IRQs are increasing for eth1 and eth2.
I also have these undesired logs when enable HSR offload with the script :[ 31.757554] icssg-prueth icssg1-eth eth1: timeout waiting for command done [ 31.774708] icssg-prueth icssg1-eth eth2: timeout waiting for command done [ 31.781651] icssg-prueth icssg1-eth: Failed to restart the firmwares, aborting the process
Is it possible to reproduce this on your side ?
-Tianyi