Go to the source code of this file.
Data Structures | |
| struct | exceptionList |
| List of MAC ID's which are exempted from Learning, this is for DLR implementation. More... | |
| struct | dlrStateMachineVar |
| State machine variables, part of DLR Object and L2 implementation. More... | |
| struct | superConfig |
| Supervisor configuration. Attribute ID 4. More... | |
| struct | activeSuperAddr |
| Supervisor address, part of DLR Object. Attribute ID 10. More... | |
| struct | lastActiveNode |
| Last active node at the end of the chain Class for Attributes 6 and 7. More... | |
| struct | protocolParticipants |
| IP and MAC of the Ring devices. Attribute ID 9. More... | |
| struct | dlrStruct |
| DLR parent structure through which all other structures can be accessed. More... | |
| struct | FaultTracker_t |
| Structure for tracking faults over time. More... | |
| struct | dlr_Config |
Macros | |
| #define | IS_A_DLR_SUPERVISOR DLR_TRUE |
| #define | DEFAULT_DLR_PACKET_SIZE 60 |
| #define | ETHERNET_FRAME_SIZE_60 60 |
| #define | IEP_WD_PRE_DIV_10US 2000 |
| #define | PORT0_WATCH_DOG_ID 0 /*PD_WD*/ |
| #define | PORT1_WATCH_DOG_ID 1 /*PDI_WD*/ |
| #define | IS_A_LINK_STATUS_FRAME DLR_TRUE |
| #define | IS_A_NEIGHBOR_STAT_FRAME DLR_FALSE |
| #define | DLR_RAPID_FAULT_WINDOW_SIZE (30U) |
| #define | DLR_RAPID_FAULT_THRESHOLD (5U) |
| #define | BOTH_LINKS_UP 0x0 |
| #define | PORT0_IS_DOWN 0x2 |
| #define | PORT1_IS_DOWN 0x1 |
| #define | BOTH_LINKS_DOWN 0x3 |
| #define | PORT0_WD_ISR_MASK 0x2000000 |
| #define | PORT1_WD_ISR_MASK 0x4000000 |
| #define | DLR_ANNOUNCE_SUPPRESSION_TIMEOUT_ISR_MASK (1U << 27U) |
| #define | PDI_WD_TRIGGER_RX_SOF (0 << 4) |
| #define | PDI_WD_TRIGGER_LATCH_IN (1 << 4) |
| #define | PDI_WD_TRIGGER_SYNC0_OUT (2 << 4) |
| #define | PDI_WD_TRIGGER_SYNC1_OUT (3 << 4) |
| #define | DEFAULT_BEACON_INTERVAL_VARIABLE 400 /*in microseconds*/ |
| #define | DEFAULT_BEACON_TIMEOUT_VARIABLE (DEFAULT_BEACON_INTERVAL_VARIABLE * 4) /*in microseconds*/ |
| #define | DEFAULT_NEIGHBOR_TIMEOUT_INTERVAL 100 /*in milliseconds*/ |
| #define | DEFAULT_DLR_PERIODIC_INTERVAL 100 /*in milliseconds*/ |
| #define | DEFAULT_DLR_ANNOUNCE_INTERVAL 1000 /*in milliseconds*/ |
| #define | DEFAULT_DLR_SIGN_ON_INTERVAL 60000 /*in milliseconds*/ |
| #define | DLR_RAPID_FAULT_TIMER_INTERVAL (1000U) /*in milliseconds*/ |
| #define | DLR_MAX_NODES_SUPPORTED 5 |
| #define | MAX_NUM_RETRIES 2 |
| #define | BEACON_CPU_STALL_THRESHOLD 4 |
| #define | DLR_SUPERVISOR_CAPABILITIES (1 << 7) | (1 << 5) | (1 << 1) |
| #define | DLR_NODE_CAPABILITIES (1 << 7) | (1 << 1) |
| #define | DLR_SIGNON_FRAME_SIZE (ICSS_EMAC_MAXMTU - 10U) |
| #define | DLR_COMMON_FRAME_HEADER_SIZE 18 |
| #define | DLR_COMMON_FRAME_OFFSET 12 |
| #define | ICSS_DLR_PORT0_INT_FLAG 0x200000 |
| #define | ICSS_DLR_PORT1_INT_FLAG 0x400000 |
| #define | addFrameOffset(src, offset) *(src + DLR_FRAME_TYPE_OFFSET) = offset; |
| #define | addSourcePort(src, port) *(src + DLR_SOURCE_PORT_OFFSET) = port; |
| #define | addReqSrcPort(src, port) *(src + DLR_REQ_SRC_PORT_OFFSET) = port; |
| #define | addLinkStat(src, status) *(src + DLR_LINK_STATUS_OFFSET) = status; |
Typedefs | |
| typedef struct dlr_Config_s * | EIP_DLRHandle |
Enumerations | |
| enum | nodeState { NODE_IDLE = 0, NODE_FAULT = 1, NODE_NORMAL = 2 } |
| node state machine states More... | |
| enum | ringState { RING_NORMAL = 1, RING_FAULT = 2 } |
| ring state values More... | |
| enum | nwTopology { LINEAR_TOP = 0, RING_TOP = 1 } |
| network topology : possible values for Attribute ID 1 More... | |
| enum | nwStatus { NORMAL_STAT = 0, RING_FAULT_STAT = 1, UNEXPECTED_LOOP = 2, PARTIAL_FAULT = 3, RAPID_FAULT = 4 } |
| network status : possible values for Attribute ID 2 More... | |
| enum | supervisorStatus { BACKUP_NODE = 0, ACTIVE_RING_SUPERVISOR = 1, RING_NODE = 2, NON_DLR = 3, FEATURE_UNSUPPORTED = 4 } |
| device role: possible values for Attribute ID 3 More... | |
| enum | EIP_DLR_portLinkStatus { PORT_LINK_DOWN = 0, PORT_LINK_UP = 1 } |
| get the link status - link up/down More... | |
| enum | supervisorStatusCopyType { COPY_VAL_FROM_SELF = 0, COPY_VAL_TO_SELF = 1 } |
Functions | |
| void | EIP_DLR_init (EIP_DLRHandle dlrHandle) |
| API to initialize the DLR driver. More... | |
| void | EIP_DLR_deinit (EIP_DLRHandle dlrHandle) |
| API to de-initialize the DLR driver. More... | |
| void | EIP_DLR_start (EIP_DLRHandle dlrHandle) |
| API to start the DLR driver Calling this enables DLR on the device. More... | |
| void | EIP_DLR_stop (EIP_DLRHandle dlrHandle) |
| API to stop the DLR driver Halt DLR. Calling this disables DLR on the device. More... | |
| void | EIP_DLR_port0ISR (uintptr_t arg) |
| Fast ISR for Port 0, bypasses the buffer copy and NDK. More... | |
| void | EIP_DLR_port1ISR (uintptr_t arg) |
| Fast ISR for Port 1, bypasses the buffer copy and NDK. More... | |
| void | EIP_DLR_beaconTimeoutISR_P0 (uintptr_t arg) |
| ISR for beacon timeout for Port 0. More... | |
| void | EIP_DLR_beaconTimeoutISR_P1 (uintptr_t arg) |
| ISR for beacon timeout for Port 1. More... | |
| void | EIP_DLR_port0ProcessLinkBrk (uint8_t linkStatus, void *arg2) |
| Process DLR state machine in the event of a link break on Port0. More... | |
| void | EIP_DLR_port1ProcessLinkBrk (uint8_t linkStatus, void *arg2) |
| Process DLR state machine in the event of a link break on Port1. More... | |
| void | EIP_DLR_neighborTimeoutISR0 (ClockP_Object *obj, void *arg) |
| ISR for Neighbor timeout timer for port 0. More... | |
| void | EIP_DLR_neighborTimeoutISR1 (ClockP_Object *obj, void *arg) |
| ISR for Neighbor timeout timer for port 1. More... | |
| void | EIP_DLR_addVlanID (uint8_t *src, uint16_t vlanID) |
| void | EIP_DLR_genNCReqFrame (EIP_DLRHandle dlrHandle, uint8_t *src, uint8_t sourcePort) |
| void | EIP_DLR_genNCResFrame (uint8_t *src, uint8_t sourcePort, uint8_t reqSrcPort, uint32_t sequenceId) |
| void | EIP_DLR_genNeighborLinkStatFrame (EIP_DLRHandle dlrHandle, uint8_t *src, uint8_t sourcePort, uint8_t linkOrNeighbor, uint8_t linkStatus) |
| void | EIP_DLR_initDLRFrameHeader (uint8_t *src, uint8_t *header) |
| void | EIP_DLR_processSignOnFrameAsNode (EIP_DLRHandle dlrHandle, uint8_t *pktBuffer, uint8_t portNum, uint16_t size) |
| Process Sign_On frame as a ring node with maximum size handling. More... | |
| void | EIP_DLR_addSignOnNumNodes (uint8_t *src, uint16_t numNodes) |
| void | EIP_DLR_processDLRFrame (EIP_DLRHandle dlrHandle, uint8_t *pktBuffer, uint8_t portNum, uint16_t size) |
| Processes a sign on and Neighbor check request frame. More... | |
| void | EIP_DLR_processNeighborCheckRequest (EIP_DLRHandle dlrHandle, uint8_t *pktBuffer, uint8_t portNum, volatile uint32_t *portEvtsPtr, volatile uint32_t portEvtsFlag) |
| Process a DLR Neighbor Check Request frame. More... | |
| void | EIP_DLR_dRAMInit (EIP_DLRHandle dlrHandle) |
| void | EIP_DLR_resetStateMachine (EIP_DLRHandle dlrHandle) |
| Initialize the state machine when it goes back to idle state. More... | |
| void | EIP_DLR_setDefaultValue (EIP_DLRHandle dlrHandle) |
| void | EIP_DLR_switchToFault (EIP_DLRHandle dlrHandle) |
| void | EIP_DLR_switchToNormal (EIP_DLRHandle dlrHandle) |
| int32_t | EIP_DLR_isrInit (EIP_DLRHandle dlrHandle) |
| void | EIP_DLR_periodicProcessing (ClockP_Object *obj, void *userArg) |
| void | EIP_DLR_addToExceptionList (EIP_DLRHandle dlrHandle, uint8_t *macId) |
| void | EIP_DLR_clearExceptionList (EIP_DLRHandle dlrHandle) |
| uint8_t | EIP_DLR_checkSupervisorException (uint8_t *macId, EIP_DLRHandle dlrHandle) |
| void | EIP_DLR_setDividerIEPWatchdog (EIP_DLRHandle dlrHandle) |
| Sets the clock divider to 1us for IEP watch dog timers. More... | |
| void | EIP_DLR_enableIEPWatchdog (EIP_DLRHandle dlrHandle, uint8_t id) |
| Enable the IEP Watch dog timers. More... | |
| void | EIP_DLR_disableIEPWatchdog (EIP_DLRHandle dlrHandle, uint8_t id) |
| Disable the IEP Watch dog timers. More... | |
| void | EIP_DLR_setTimeoutIEPWatchdog (EIP_DLRHandle dlrHandle, uint16_t periodInMicroSec, uint8_t id) |
| Set the timeout value in watchdog. More... | |
| void | EIP_DLR_setPDIWatchdogTriggerMode (EIP_DLRHandle dlrHandle, uint32_t mode) |
| Set the PDI WD trigger mode. More... | |
| EIP_DLR_portLinkStatus | EIP_DLR_checkOtherPortLinkStatus (EIP_DLRHandle dlrHandle, uint8_t currentPort) |
| Checks the link status of the port opposite to the current port. More... | |
| #define IS_A_DLR_SUPERVISOR DLR_TRUE |
For future use when Ring Supervisor is implemented
| #define DEFAULT_DLR_PACKET_SIZE 60 |
| #define ETHERNET_FRAME_SIZE_60 60 |
| #define IEP_WD_PRE_DIV_10US 2000 |
Value written to IEP WD Predivider register to configure 1us increment
| #define PORT0_WATCH_DOG_ID 0 /*PD_WD*/ |
ID for PD Watchdog in IEP
| #define PORT1_WATCH_DOG_ID 1 /*PDI_WD*/ |
ID for PDI Watchdog in IEP
| #define IS_A_LINK_STATUS_FRAME DLR_TRUE |
| #define IS_A_NEIGHBOR_STAT_FRAME DLR_FALSE |
| #define DLR_RAPID_FAULT_WINDOW_SIZE (30U) |
30 slots (seconds)
| #define DLR_RAPID_FAULT_THRESHOLD (5U) |
Alert if 5 or more faults
| #define BOTH_LINKS_UP 0x0 |
| #define PORT0_IS_DOWN 0x2 |
| #define PORT1_IS_DOWN 0x1 |
| #define BOTH_LINKS_DOWN 0x3 |
| #define PORT0_WD_ISR_MASK 0x2000000 |
| #define PORT1_WD_ISR_MASK 0x4000000 |
| #define DLR_ANNOUNCE_SUPPRESSION_TIMEOUT_ISR_MASK (1U << 27U) |
| #define PDI_WD_TRIGGER_RX_SOF (0 << 4) |
Watchdog RX Start of Frame Trigger
| #define PDI_WD_TRIGGER_LATCH_IN (1 << 4) |
Watchdog LATCH IN Trigger
| #define PDI_WD_TRIGGER_SYNC0_OUT (2 << 4) |
Watchdog SYNC0 Trigger
| #define PDI_WD_TRIGGER_SYNC1_OUT (3 << 4) |
Watchdog SYNC1 Trigger
| #define DEFAULT_BEACON_INTERVAL_VARIABLE 400 /*in microseconds*/ |
DLR Timer default values, this is redundant since values are eventually read from supervisor
| #define DEFAULT_BEACON_TIMEOUT_VARIABLE (DEFAULT_BEACON_INTERVAL_VARIABLE * 4) /*in microseconds*/ |
| #define DEFAULT_NEIGHBOR_TIMEOUT_INTERVAL 100 /*in milliseconds*/ |
| #define DEFAULT_DLR_PERIODIC_INTERVAL 100 /*in milliseconds*/ |
| #define DEFAULT_DLR_ANNOUNCE_INTERVAL 1000 /*in milliseconds*/ |
| #define DEFAULT_DLR_SIGN_ON_INTERVAL 60000 /*in milliseconds*/ |
| #define DLR_RAPID_FAULT_TIMER_INTERVAL (1000U) /*in milliseconds*/ |
Timer interval for the Rapid Fault tracker
| #define DLR_MAX_NODES_SUPPORTED 5 |
Maximum number of nodes supported in the network as a DLR Supervisor
| #define MAX_NUM_RETRIES 2 |
Number of neighbor retries before a neighbor status message is sent
| #define BEACON_CPU_STALL_THRESHOLD 4 |
Number of times beacon timer is triggered before it is disabled
| #define DLR_SUPERVISOR_CAPABILITIES (1 << 7) | (1 << 5) | (1 << 1) |
Bit usage: bit 1: beacon-based ring node bit 5: supervisor capable bit 7: flush_table frame capable
| #define DLR_NODE_CAPABILITIES (1 << 7) | (1 << 1) |
the value 1 indicates that this is only a ring node capable device, for other values see below
| #define DLR_SIGNON_FRAME_SIZE (ICSS_EMAC_MAXMTU - 10U) |
If size of packet is greater than DLR_SIGNON_FRAME_SIZE in EIP_DLR_processDLRFrame, then the frame is sent directly to host. Value pf "ICSS_EMAC_MAXMTU - 10U" is used because 10 bytes space in the frame is needed so that the own MAC and IP addresses can be added.
| #define DLR_COMMON_FRAME_HEADER_SIZE 18 |
| #define DLR_COMMON_FRAME_OFFSET 12 |
| #define ICSS_DLR_PORT0_INT_FLAG 0x200000 |
DLR port 0 Interrupt Flag for ICSS INTC
| #define ICSS_DLR_PORT1_INT_FLAG 0x400000 |
DLR port 1 Interrupt Flag for ICSS INTC
| #define addFrameOffset | ( | src, | |
| offset | |||
| ) | *(src + DLR_FRAME_TYPE_OFFSET) = offset; |
| #define addSourcePort | ( | src, | |
| port | |||
| ) | *(src + DLR_SOURCE_PORT_OFFSET) = port; |
| #define addReqSrcPort | ( | src, | |
| port | |||
| ) | *(src + DLR_REQ_SRC_PORT_OFFSET) = port; |
| #define addLinkStat | ( | src, | |
| status | |||
| ) | *(src + DLR_LINK_STATUS_OFFSET) = status; |
| typedef struct dlr_Config_s* EIP_DLRHandle |
| enum nodeState |
| enum ringState |
| enum nwTopology |
| enum nwStatus |
| enum supervisorStatus |