net: ti: prueth_core: add HSR/PRP driver
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:
Murali Karicheri <m-karicheri2@ti.com>
Showing
- drivers/net/ethernet/ti/icss_lre_firmware.h 28 additions, 0 deletionsdrivers/net/ethernet/ti/icss_lre_firmware.h
- drivers/net/ethernet/ti/icss_vlan_mcast_filter_mmap.h 9 additions, 0 deletionsdrivers/net/ethernet/ti/icss_vlan_mcast_filter_mmap.h
- drivers/net/ethernet/ti/prueth.h 11 additions, 1 deletiondrivers/net/ethernet/ti/prueth.h
- drivers/net/ethernet/ti/prueth_core.c 410 additions, 51 deletionsdrivers/net/ethernet/ti/prueth_core.c
- drivers/net/ethernet/ti/prueth_switch.c 2 additions, 2 deletionsdrivers/net/ethernet/ti/prueth_switch.c
This diff is collapsed.
Please register or sign in to comment