Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  1. Mar 13, 2024
  2. Mar 12, 2024
    • Ravi Gunasekaran's avatar
      net: ethernet: ti: icssg_prueth: Fix race condition for VLAN table access · 902a51e8
      Ravi Gunasekaran authored
      
      The VLAN table is a shared memory between the two ports/slices
      in a ICSSG cluster and this may lead to race condition when the
      common code paths for both ports are executed in different CPUs.
      
      Fix the race condition access by locking the shared memory access.
      
      Signed-off-by: default avatarRavi Gunasekaran <r-gunasekaran@ti.com>
      902a51e8
    • Ravi Gunasekaran's avatar
      net: hsr: hsr_slave: Fix the promiscuous mode · a082ce3b
      Ravi Gunasekaran authored
      commit 4322af8c ("net: hsr: Disable promiscuous mode in
      offload mode") disables promiscuous mode of slave devices
      while creating an HSR interface. But while deleting the
      HSR interface, it does not take care of it. It decreases the
      promiscuous mode count, which eventually enables promiscuous
      mode on the slave devices when creating HSR interface again.
      
      Fix this by not decrementing the promiscuous mode count while
      deleting the HSR interface when offload is enabled.
      
      Fixes: 4322af8c
      
       ("net: hsr: Disable promiscuous mode in offload mode")
      Signed-off-by: default avatarRavi Gunasekaran <r-gunasekaran@ti.com>
      a082ce3b
    • Ravi Gunasekaran's avatar
      net: ethernet: ti: icssg_prueth: Fix processing NETDEV_CHANGEUPPER event · 0553610a
      Ravi Gunasekaran authored
      
      In HSR mode, the netdev notifier does not take care of the unlinking
      event of the upper net device. Fix this.
      
      Signed-off-by: default avatarRavi Gunasekaran <r-gunasekaran@ti.com>
      0553610a
    • Ravi Gunasekaran's avatar
      net: ethernet: ti: icssg_prueth: Enable HSR Tx Tag and Rx Tag offload · c6abd141
      Ravi Gunasekaran authored
      
      Add support to offload HSR Tx Tag Insertion and Rx Tag Removal
      and duplicate discard.
      
      Support for offloading these features needs ICSSG HSR FW version
      REL.HSR_1G_01.02.00.01.
      
      Steps to offload to HSR Tx Tag Insertion and Rx Tag Removal.
      -----------------------------------------------------------
      Example assuming eth1, eth2 ports of ICSSG1 on AM64-EVM
      
        1) Delete existing HSR interface
            ip link delete hsr0
      
        2) Bring down the interfaces
            ip link set eth1 down
            ip link set eth2 down
      
        3) Configure both interfaces to have same MAC address
            ip link set dev eth2 address <ETH1_MAC_ADDRESS>
      
        4) Enable HSR offload for both interfaces
            ethtool -K eth1 hsr-fwd-offload on
            ethtool -K eth1 hsr-dup-offload on
            ethtool -K eth1 hsr-tag-ins-offload on
            ethtool -K eth1 hsr-tag-rm-offload on
      
            ethtool -K eth2 hsr-fwd-offload on
            ethtool -K eth2 hsr-dup-offload on
            ethtool -K eth2 hsr-tag-ins-offload on
            ethtool -K eth2 hsr-tag-rm-offload on
      
            devlink dev param set platform/icssg1-eth \
                      name hsr_offload_mode \
                      value true cmode runtime
      
        5) Bring up the interfaces
            ip link set eth1 up
            ip link set eth2 up
      
        6) Create HSR interface and add slave interfaces to it
            ip link add name hsr0 type hsr slave1 eth1 slave2 eth2 \
                      supervision 45 version 1
      
        7) Add IP address to the HSR interface
            ip addr add <IP_ADDR>/24 dev hsr0
      
        8) Bring up the HSR interface
            ip link set hsr0 up
      
      Switching back to Dual EMAC mode:
      ---------------------------------
        1) Delete HSR interface
            ip link delete hsr0
      
        2) Bring down the interfaces
            ip link set eth1 down
            ip link set eth2 down
      
        3) Disable HSR port-to-port offloading mode, packet duplication
            ethtool -K eth1 hsr-fwd-offload off
            ethtool -K eth1 hsr-dup-offload off
            ethtool -K eth1 hsr-tag-ins-offload off
            ethtool -K eth1 hsr-tag-rm-offload off
      
            ethtool -K eth2 hsr-fwd-offload off
            ethtool -K eth2 hsr-dup-offload off
            ethtool -K eth2 hsr-tag-ins-offload off
            ethtool -K eth2 hsr-tag-rm-offload off
            devlink dev param set platform/icssg1-eth \
                      name hsr_offload_mode \
                      value false cmode runtime
      
      Note:
      1) At the very least, hsr-fwd-offload must be enabled.
         Without offloading the port-to-port offload, other
         HSR offloads cannot be enabled.
      
      2) Inorder to enable hsr-tag-ins-offload, hsr-dup-offload
         must also be enabled as these are tightly coupled in
         the firmware implementation.
      
      Signed-off-by: default avatarRavi Gunasekaran <r-gunasekaran@ti.com>
      c6abd141
    • Ravi Gunasekaran's avatar
      arm64: dts: ti: k3-am64-main: Switch ICSSG core clock to 333MHz · 4670156e
      Ravi Gunasekaran authored
      
      In order to fully to support all the HSR offload features at 1G,
      more clock cycles are needed. So switch the ICSSG core clock from
      250MHz to 333MHz.
      
      This switch to 333MHz is applicable for all 3 modes - MAC mode,
      Switch Mode and HSR Mode and improves performance as well.
      
      Performance update in dual mac mode
      With Core Clk @ 333MHz
      Tx throughput - 934 Mbps
      Rx throuhput - 914 Mbps,
      
      With core clk @ 250MHz,
      Tx throughput - 920 Mbps
      Rx throughput - 706 Mbps
      
      The improvement in performance is in alignment with the firmware
      team's understanding that Rx budget cycle is tight at 250MHz.
      
      Signed-off-by: default avatarRavi Gunasekaran <r-gunasekaran@ti.com>
      4670156e
    • Ravi Gunasekaran's avatar
      net: ethernet: ti: icss_iep: Move the declarations to .h file · 7596cf0d
      Ravi Gunasekaran authored
      
      With the declarations of struct and enum related to IEP
      present in .c file, it is not possible to access the structures
      in other source code files. So move the declarations from
      icss_iep.c to icss_iep.h.
      
      IEP's def_inc is derived from the IEP reference clock.
      Instead of using hard coded value, use the def_inc as
      this is safer when changing the reference clock value.
      
      Signed-off-by: default avatarRavi Gunasekaran <r-gunasekaran@ti.com>
      7596cf0d