This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PROCESSOR-SDK-AM64X: HSR PRU_ICSSG: eth1 down/up disrupts HSR PRU firmware functionality on 100 Mbps

Part Number: PROCESSOR-SDK-AM64X

Tool/software:

Hello TI, 

SetUp based on this link : 

 PROCESSOR-SDK-AM64X: Duplicate Packets are not removed with HSR PRU Firmware 

We have observed that on 100Mbps link speed, when down/up eth1 and eth2, the HSR firmware doesn't remove duplicated packet anymore. 

  1. Ensure eth interfaces are up if they are not brought up yet
  2. Set up hsr offload + cut-through
  3. Set 100M on eth1 & eth2 with ethtool
  4. Ping EVM1 (sender) to EVM3 (destination) and check no packet loss
  5. Bring down and back up eth1 and eth2 on EVM1 with ip link set dev <interface name> down/up
  6. Ping EVM1 (sender) to EVM3 (destination) again
  7. Check cat /proc/interrupts on EVM3 (destination) and check if IRQ count seems to only increase on one port at a time during the ping

After doing this, I now indeed can ping from EVM1 to EVM3 but when I check EVM3, I still see that IRQ counter is increasing on both port eth1 and eth2. 

Here are the logs : 

EVM1 : 

am64xx-evm login: root                                                                              
root@am64xx-evm:~# ip link set dev eth1 up                                                          
 link set dev eth2 uproot@am64xx-evm:~# ip link set dev eth2 up                                     
root@am64xx-evm:~# /usr/bin/hsr_offload_script.sh hsr_hw eth1 eth2 192.168.1.1                      
hsr_hw eth1 eth2 192.168.1.1                                                                        
ip=192.168.1.1                                                                                      
if=hsr0                                                                                             
mac=70:ff:76:1f:40:90                                                                               
slave-a=eth1                                                                                        
slave-b=eth2                                                                                        
device=platform/icssg1-eth                                                                          
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                                                                                 
root@am64xx-evm:~# ping 192.168.1.2 -c 10 -i 0.1                                                    
PING 192.168.1.2 (192.168.1.2): 56 data bytes                                                       
64 bytes from 192.168.1.2: seq=0 ttl=64 time=0.855 ms                                               
64 bytes from 192.168.1.2: seq=1 ttl=64 time=0.388 ms                                               
64 bytes from 192.168.1.2: seq=2 ttl=64 time=0.301 ms                                               
64 bytes from 192.168.1.2: seq=3 ttl=64 time=0.358 ms                                               
64 bytes from 192.168.1.2: seq=4 ttl=64 time=0.267 ms                                               
64 bytes from 192.168.1.2: seq=5 ttl=64 time=0.395 ms                                               
64 bytes from 192.168.1.2: seq=6 ttl=64 time=0.321 ms                                               
64 bytes from 192.168.1.2: seq=7 ttl=64 time=0.525 ms                                               
64 bytes from 192.168.1.2: seq=8 ttl=64 time=0.348 ms                                               
64 bytes from 192.168.1.2: seq=9 ttl=64 time=0.360 ms                                               
                                                                                                    
--- 192.168.1.2 ping statistics ---                                                                 
10 packets transmitted, 10 packets received, 0% packet loss                                         
round-trip min/avg/max = 0.267/0.411/0.855 ms                                                       
root@am64xx-evm:~# ethtool -s eth1 speed 100 duplex full                                            
ool -s eth2 speedroot@am64xx-evm:~# ethtool -s eth2 speed 100 duplex full                           
root@am64xx-evm:~# ping 192.168.1.2 -c 10 -i 0.1                                                    
PING 192.168.1.2 (192.168.1.2): 56 data bytes                                                       
64 bytes from 192.168.1.2: seq=0 ttl=64 time=0.720 ms                                               
64 bytes from 192.168.1.2: seq=1 ttl=64 time=0.387 ms                                               
64 bytes from 192.168.1.2: seq=2 ttl=64 time=0.417 ms                                               
64 bytes from 192.168.1.2: seq=3 ttl=64 time=0.299 ms                                               
64 bytes from 192.168.1.2: seq=4 ttl=64 time=0.291 ms                                               
64 bytes from 192.168.1.2: seq=5 ttl=64 time=0.289 ms                                               
64 bytes from 192.168.1.2: seq=6 ttl=64 time=0.389 ms                                               
64 bytes from 192.168.1.2: seq=7 ttl=64 time=0.362 ms                                               
64 bytes from 192.168.1.2: seq=8 ttl=64 time=0.274 ms                                               
64 bytes from 192.168.1.2: seq=9 ttl=64 time=0.343 ms                                               
                                                                                                    
--- 192.168.1.2 ping statistics ---                                                                 
10 packets transmitted, 10 packets received, 0% packet loss                                         
round-trip min/avg/max = 0.274/0.377/0.720 ms                                                       
root@am64xx-evm:~# ping 192.168.1.2 -c 10 -i 0.1                                                    
PING 192.168.1.2 (192.168.1.2): 56 data bytes                                                       
64 bytes from 192.168.1.2: seq=0 ttl=64 time=0.753 ms                                               
64 bytes from 192.168.1.2: seq=1 ttl=64 time=0.461 ms                                               
64 bytes from 192.168.1.2: seq=2 ttl=64 time=0.364 ms                                               
64 bytes from 192.168.1.2: seq=3 ttl=64 time=0.362 ms                                               
64 bytes from 192.168.1.2: seq=4 ttl=64 time=0.274 ms                                               
64 bytes from 192.168.1.2: seq=5 ttl=64 time=0.376 ms                                               
64 bytes from 192.168.1.2: seq=6 ttl=64 time=0.341 ms                                               
64 bytes from 192.168.1.2: seq=7 ttl=64 time=0.286 ms                                               
64 bytes from 192.168.1.2: seq=8 ttl=64 time=0.424 ms                                               
64 bytes from 192.168.1.2: seq=9 ttl=64 time=0.288 ms                                               
                                                                                                    
--- 192.168.1.2 ping statistics ---                                                                 
10 packets transmitted, 10 packets received, 0% packet loss                                         
round-trip min/avg/max = 0.274/0.392/0.753 ms                                                       
root@am64xx-evm:~# ping 192.168.1.2 -c 10 -i 0.1                                                    
PING 192.168.1.2 (192.168.1.2): 56 data bytes                                                       
64 bytes from 192.168.1.2: seq=0 ttl=64 time=0.526 ms                                               
64 bytes from 192.168.1.2: seq=1 ttl=64 time=0.370 ms                                               
64 bytes from 192.168.1.2: seq=2 ttl=64 time=0.352 ms                                               
64 bytes from 192.168.1.2: seq=3 ttl=64 time=0.306 ms                                               
64 bytes from 192.168.1.2: seq=4 ttl=64 time=0.314 ms                                               
64 bytes from 192.168.1.2: seq=5 ttl=64 time=0.322 ms                                               
64 bytes from 192.168.1.2: seq=6 ttl=64 time=0.260 ms                                               
64 bytes from 192.168.1.2: seq=7 ttl=64 time=0.388 ms                                               
64 bytes from 192.168.1.2: seq=8 ttl=64 time=0.343 ms                                               
64 bytes from 192.168.1.2: seq=9 ttl=64 time=0.282 ms                                               
                                                                                                    
--- 192.168.1.2 ping statistics ---                                                                 
10 packets transmitted, 10 packets received, 0% packet loss                                         
round-trip min/avg/max = 0.260/0.346/0.526 ms                                                       
root@am64xx-evm:~# 

EVM2 : 

am64xx-evm login: root                                                                              
root@am64xx-evm:~# ip link set dev eth1 up                                                          
link set dev eth2 uproot@am64xx-evm:~# ip link set dev eth2 up                                      
root@am64xx-evm:~# /usr/bin/hsr_offload_script.sh hsr_hw eth1 eth2 192.168.1.10                     
hsr_hw eth1 eth2 192.168.1.10                                                                       
ip=192.168.1.10                                                                                     
if=hsr0                                                                                             
mac=70:ff:76:1e:2d:e9                                                                               
slave-a=eth1                                                                                        
slave-b=eth2                                                                                        
device=platform/icssg1-eth                                                                          
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

EVM3: 

am64xx-evm login: root
root@am64xx-evm:~# ip link set dev eth1 up
 link set dev eth2 uproot@am64xx-evm:~# ip link set dev eth2 up
root@am64xx-evm:~# /usr/bin/hsr_offload_script.sh hsr_hw eth1 eth2 192.168.1.2 
hsr_hw eth1 eth2 192.168.1.2
ip=192.168.1.2
if=hsr0
mac=70:ff:76:1e:e6:f4
slave-a=eth1
slave-b=eth2
device=platform/icssg1-eth
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
root@am64xx-evm:~# ethtool -s eth1 speed 100 duplex full 
tool -s eth2 speed 10root@am64xx-evm:~# ethtool -s eth2 speed 100 duplex full
root@am64xx-evm:~# cat /proc/interrupts | grep icssg                                           
146:         66          0  MSI-INTA 1970792 Level     icssg1-eth-tx0
150:         23          0  MSI-INTA 1970796 Level     icssg1-eth-tx0
246:         13          0  MSI-INTA 1971824 Level     icssg1-eth
262:          1          0  MSI-INTA 1971840 Level     icssg1-eth
541:          0          0  pruss-intc  24 Level     icssg1-eth
542:          0          0  pruss-intc  25 Level     icssg1-eth
root@am64xx-evm:~# cat /proc/interrupts | grep icssg
146:         81          0  MSI-INTA 1970792 Level     icssg1-eth-tx0
150:         23          0  MSI-INTA 1970796 Level     icssg1-eth-tx0
246:         24          0  MSI-INTA 1971824 Level     icssg1-eth
262:          1          0  MSI-INTA 1971840 Level     icssg1-eth
541:          0          0  pruss-intc  24 Level     icssg1-eth
542:          0          0  pruss-intc  25 Level     icssg1-eth
root@am64xx-evm:~# echo "EVM3"
EVM3
(failed reverse-i-search)`down': ethtool -s eth2 speed 100 ^Cplex full                               
root@am64xx-evm:~# ip link set dev eth1 down
root@am64xx-evm:~# ip link set dev eth2 down                                                         
root@am64xx-evm:~# ip link set dev eth1 up
root@am64xx-evm:~# ip link set dev eth2 up                                                           
root@am64xx-evm:~# cat /proc/interrupts | grep icssg                                           
146:        117          0  MSI-INTA 1970792 Level     icssg1-eth-tx0
150:         26          0  MSI-INTA 1970796 Level     icssg1-eth-tx0
246:         26          0  MSI-INTA 1971824 Level     icssg1-eth
262:          2          0  MSI-INTA 1971840 Level     icssg1-eth
541:          0          0  pruss-intc  24 Level     icssg1-eth
542:          0          0  pruss-intc  25 Level     icssg1-eth
root@am64xx-evm:~# cat /proc/interrupts | grep icssg
146:        132          0  MSI-INTA 1970792 Level     icssg1-eth-tx0
150:         32          0  MSI-INTA 1970796 Level     icssg1-eth-tx0
246:         37          0  MSI-INTA 1971824 Level     icssg1-eth
262:         13          0  MSI-INTA 1971840 Level     icssg1-eth
541:          0          0  pruss-intc  24 Level     icssg1-eth
542:          0          0  pruss-intc  25 Level     icssg1-eth
root@am64xx-evm:~# ethtool eth1
Settings for eth1:
        Supported ports: [ TP    MII ]
        Supported link modes:   10baseT/Full
                                100baseT/Full
                                1000baseT/Full
                                1000baseX/Full
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  100baseT/Full
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  100baseT/Full
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 100Mb/s
        Duplex: Full
        Auto-negotiation: on
        master-slave cfg: preferred slave
        master-slave status: slave
        Port: Twisted Pair
        PHYAD: 15
        Transceiver: external
        MDI-X: Unknown
        Current message level: 0x00000000 (0)
                              
        Link detected: yes
root@am64xx-evm:~# ethtool eth2
Settings for eth2:
        Supported ports: [ TP    MII ]
        Supported link modes:   10baseT/Full
                                100baseT/Full
                                1000baseT/Full
                                1000baseX/Full
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  100baseT/Full
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Full
                                             100baseT/Full
                                             1000baseT/Full
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 100Mb/s
        Duplex: Full
        Auto-negotiation: on
        master-slave cfg: preferred slave
        master-slave status: slave
        Port: Twisted Pair
        PHYAD: 3
        Transceiver: external
        MDI-X: Unknown
        Current message level: 0x00000000 (0)
                              
        Link detected: yes
root@am64xx-evm:~# cat /proc/interrupts | grep icssg
146:        145          0  MSI-INTA 1970792 Level     icssg1-eth-tx0
150:         34          0  MSI-INTA 1970796 Level     icssg1-eth-tx0
246:         38          0  MSI-INTA 1971824 Level     icssg1-eth
262:         14          0  MSI-INTA 1971840 Level     icssg1-eth
541:          0          0  pruss-intc  24 Level     icssg1-eth
542:          0          0  pruss-intc  25 Level     icssg1-eth
root@am64xx-evm:~# cat /proc/interrupts | grep icssg
146:        158          0  MSI-INTA 1970792 Level     icssg1-eth-tx0
150:         34          0  MSI-INTA 1970796 Level     icssg1-eth-tx0
246:         48          0  MSI-INTA 1971824 Level     icssg1-eth
262:         24          0  MSI-INTA 1971840 Level     icssg1-eth
541:          0          0  pruss-intc  24 Level     icssg1-eth
542:          0          0  pruss-intc  25 Level     icssg1-eth
root@am64xx-evm:~# 

- Tianyi