Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  1. Jul 21, 2020
  2. Jul 14, 2020
    • LCPD Auto Merger's avatar
      Merged TI feature connectivity into ti-linux-5.4.y · 3cdbcdd5
      LCPD Auto Merger authored
      TI-Feature: connectivity
      TI-Branch: connectivity-ti-linux-5.4.y
      
      * 'connectivity-ti-linux-5.4.y' of ssh://bitbucket.itg.ti.com/lcpdpublicdom/connectivity
      
      : (37 commits)
        net: ti: prueth_core: hsr/prp: VLAN filter to receive tagged SV frames
        net: ti: prueth_core: hsr/prp: add Multicast filtering
        net: ti: prueth_core: hsr/prp: add VLAN filtering
        net: ti: prueth_core: hsr/prp: update for ethtool stats support
        net: ti: prueth_core: add helper functions to support lre offload
        ARM: dts: am335x-icev2: add interrupts for HSR/PRP queue interrupts
        ARM: dts: am437x: add interrupts for HSR/PRP queue interrupts
        ARM: dts: am57x: add interrupts for hsr/prp queue interrupts
        net: ti: prueth_core: hsr/prp: add NSP support
        net: ti: prueth_core: hsr/prp: add ethtool command to switch Ethenet type
        net: ti: prueth_core: add HSR/PRP driver
        dt-bindings: net: ti-prueth: Add interrupt properties for HSR/PRP
        net: ti: prueth_core: add HSR/PRP firmware specific init functions
        net: ti: prueth_core: hsr/prp: set mux_sel and Min/Max frame sizes
        net: ti: prueth_core: move timer utility functions to prueth_core
        net: ti: prueth_core: move prueth_hostinit() to inside ndo_open()
        ARM: dts: am437x-idk : remove firmware-name from DTS
        ARM: dts: am335x-icev2 : remove firmware-name from DTS
        ARM: dts: k2g-ice : remove firmware-name from DTS
        ARM: dts: am57xx-idk : remove firmware-name from DTS
        ...
      
      Signed-off-by: default avatarLCPD Auto Merger <lcpd_integration@list.ti.com>
      3cdbcdd5
  3. Jul 10, 2020
    • Murali Karicheri's avatar
      net: ti: prueth_core: hsr/prp: VLAN filter to receive tagged SV frames · 3e243ebb
      Murali Karicheri authored
      
      HSR/PRP networks may use VLAN for management messages such as that
      for sending and receiving tagged supervision frames. So implement
      lredev_set_sv_vlan_id() ops of the LRE offloaded device to
      add VLAN filter entry for receiving these tagged frames.
      
      Signed-off-by: default avatarMurali Karicheri <m-karicheri2@ti.com>
      3e243ebb
    • Murali Karicheri's avatar
      net: ti: prueth_core: hsr/prp: add Multicast filtering · 8fc56e14
      Murali Karicheri authored
      
      Similar to Dual EMAC firmware, HSR/PRP (LRE) firmware also
      supports a hashed Multicast filter table of 256 entries.
      This patch extends the MC filtering support to HSR/PRP Ethernet
      types. This is a shared table for LRE. So protect access
      using a spinlock.
      
      Signed-off-by: default avatarMurali Karicheri <m-karicheri2@ti.com>
      8fc56e14
    • Murali Karicheri's avatar
      net: ti: prueth_core: hsr/prp: add VLAN filtering · 06b5848a
      Murali Karicheri authored
      
      This patch add VLAN filtering support for LRE offload. VLAN table
      has 512 entries with 8 VIDs supported per entry. It is a shared
      table. So use a spinlock to protect access.
      
      Signed-off-by: default avatarMurali Karicheri <m-karicheri2@ti.com>
      06b5848a
    • Murali Karicheri's avatar
      net: ti: prueth_core: hsr/prp: update for ethtool stats support · 093bb5ea
      Murali Karicheri authored
      
      This patch adds Link Redundancy Entity (LRE) stats through ethtool
      command.
      
      Signed-off-by: default avatarMurali Karicheri <m-karicheri2@ti.com>
      093bb5ea
    • Murali Karicheri's avatar
      net: ti: prueth_core: add helper functions to support lre offload · 0ec7a6a2
      Murali Karicheri authored
      
      Firmware requires node table entries to be inserted by driver to save
      PRU cycles for packet processing. Node table provides a view of remote
      nodes in the network. The nodes send supervision frames periodically
      with its own mac address and the same is processed by firmware. First
      firmware lookup the source MAC address. If not found, it indicates a
      flag in the descriptor which driver uses to insert the MAC address
      in the node table. The rx packet processing code kicks a worker thread
      to insert the mac address. This patch adds the required function to
      do the insert function and also clear the table on demand.
      
      Firmware also requires driver to run a timer for 10 msec to update
      check flags in dram for firmware to do periodic table maintenance
      functions for LRE offload. So change basic timer period to 10 msec
      and use a counter to track the NSP timer which needs to be done every
      100 msec.
      
      Signed-off-by: default avatarMurali Karicheri <m-karicheri2@ti.com>
      0ec7a6a2
    • Murali Karicheri's avatar
      ARM: dts: am335x-icev2: add interrupts for HSR/PRP queue interrupts · 559f8d0e
      Murali Karicheri authored
      
      This adds interrupts property for HSR/PRP priority queue interrupts
      for the supported platforms.
      
      Signed-off-by: default avatarMurali Karicheri <m-karicheri2@ti.com>
      559f8d0e
    • Murali Karicheri's avatar
      ARM: dts: am437x: add interrupts for HSR/PRP queue interrupts · 7eacd72e
      Murali Karicheri authored
      
      This adds interrupts property for HSR/PRP priority queue interrupts
      for the supported platforms.
      
      Signed-off-by: default avatarMurali Karicheri <m-karicheri2@ti.com>
      7eacd72e
    • Murali Karicheri's avatar
      ARM: dts: am57x: add interrupts for hsr/prp queue interrupts · 4b0ee281
      Murali Karicheri authored
      
      This adds interrupts property for hsr/prp priority queue interrupts
      for the supported platforms.
      
      Signed-off-by: default avatarMurali Karicheri <m-karicheri2@ti.com>
      4b0ee281
    • Murali Karicheri's avatar
      net: ti: prueth_core: hsr/prp: add NSP support · de78b781
      Murali Karicheri authored
      
      For HSR/PRP the timer has to be run at 10 msec due to requirement
      to support offload function in firmware. So run the basic timer
      at 10 msec when Ethernet type is HSR/PRP and use a counter to count
      100 msec for NSP timer. Keep the basic timer at 100 msec when in
      Dual EMAC mode to reduce CPU cycle usage.
      
      Signed-off-by: default avatarMurali Karicheri <m-karicheri2@ti.com>
      de78b781
    • Murali Karicheri's avatar
      net: ti: prueth_core: hsr/prp: add ethtool command to switch Ethenet type · 0c8d2c36
      Murali Karicheri authored
      
      PRUETH driver now supports Dual EMAC/HSR/PRP/SWITCH Ethernet types.
      The user requires to switch between these Ethernet types at run time
      without rebooting the device. This patch introduces Ethtool -K option to
      switch the Ethernet types between Dual EMAC/HSR/PRP Ethernet types.
      User first bring down the interface and then set the HSR or PRP offload
      flag in the Ethernet device using ethtool -K option. Then bring up the
      Ethernet interfaces and setup the HSR/PRP interface using ip link command.
      
      For example to Switch from Dual EMAC to HSR, user do
      
         ifconfig eth2 down
         ifconfig eth3 down
         ifconfig eth2 hw ether <MAC Addr>
         ifconfig eth3 hw ether <MAC Addr>
         ethtool -K eth2 hsr-rx-offload on
         ethtool -K eth3 hsr-rx-offload on
      
      Now ready to create hsr interface as
      
         ip link add name hsr0 type hsr slave1 eth2 slave2 eth3 supervision 45
           version 1
      
         Similarly to switch from Dual EMAC to prp user do similar steps
      
         ifconfig eth2 down
         ifconfig eth3 down
         ifconfig eth2 hw ether <MAC Addr>
         ifconfig eth3 hw ether <MAC Addr>
         ethtool -K eth2 prp-rx-offload on
         ethtool -K eth3 prp-rx-offload on
      
         ip link add name prp0 type hsr slave1 eth2 slave2 eth3 supervision 45
          proto 1
      
      To switch back to Dual EMAC, user clear the respective flags through
      ethtool command and bring up the interface. Switching between HSR and
      PRP is done in a  similar way. First needs to reset the existing flag
      and then set the new flag before creating the hsr/prp interface.
      
      User is not allowed to switch between Switch and HSR/PRP. To switch,
      user first needs to change to Dual EMAC eth type and then do the
      switching of ethtype. Driver continues to support the existing method
      for switching between Dual EMAC and Switch eth types.
      
      Signed-off-by: default avatarMurali Karicheri <m-karicheri2@ti.com>
      0c8d2c36
    • Murali Karicheri's avatar
      net: ti: prueth_core: add HSR/PRP driver · a9b8608a
      Murali Karicheri authored
      
      HSR/PRP is a industrial Ethernet protocol defined by IEC 62439
      standard. Both use 6 bytes of protocol bytes to implement redundancy.
      This consists of 2 bytes of sequence number, 1 byte of Ethernet
      type identifying the protocol and LSDU length and pathid/network id
      bits. Link Redundancy Entity (LRE) implements 1) duplication of Ethernet
      frames at Egress and 2) discard of duplicates at the ingress and 3)
      processing of Supervision frames to build the Node Table information.
      Node table contains the health status of remote nodes in the network.
      
      HSR/PRP driver offload part of LRE function. In the current version of
      the firmware 2 & 3 are offloaded to PRU firmware. 1) is still performed
      by upper HSR/PRP driver under net/hsr. This patch initialize the firmware
      based on the Ethernet type. HSR/PRP firmware uses same memory map as
      Switch firmware. So all places in the driver that initializes the basic
      Switch firmware is re-used for HSR/PRP as well using the
      !PRUETH_IS_EMAC() macro. Any HSR/PRP specific function is initialized
      under PRUETH_IS_LRE() macro.
      
      This update support both v1.0 and v2.1 of the ICSS firmware by using fw
      offsets that are assigned at probe based on platform. A list of firmware
      names are also picked at probe and then based on ethtype appropriate
      firmware is picked to load on the PRUs. For Packet handling, NAPI is used
      at at Ingress. There are two pair of Queues at the Ingress for each port.
      Low priority and High priority. A NAPI instance is added for each of the
      priority queue. An interrupt is raised by firmware when packets are
      en-queued to one of the priority queue. red_emac_rx_packets() ensures that
      packets are scanned from both queues at a specific priority and sends
      them to network stack based on timestamp associated with the packet. At
      the egress, packets are en-queued based on pcp bits. There are 2 queues
      per port and other queues are for port to port traffic.
      
      Signed-off-by: default avatarMurali Karicheri <m-karicheri2@ti.com>
      a9b8608a
  4. Jul 08, 2020