|
AM64x MCU+ SDK
08.02.00
|
|
Go to the documentation of this file.
52 #if __BYTE_ORDER == __LITTLE_ENDIAN
54 #define OS_HostToNet16(x) ((((x) & 0x00ff) << 8) | \
55 (((x) & 0xff00) >> 8))
57 #define OS_NetToHost16(x) ((((x) & 0x00ff) << 8) | \
58 (((x) & 0xff00) >> 8))
60 #define OS_HostToNet32(x) ((((x) & 0x000000ff) << 24) | \
61 (((x) & 0x0000ff00) << 8) | \
62 (((x) & 0x00ff0000) >> 8) | \
63 (((x) & 0xff000000) >> 24))
66 #define OS_NetToHost32(x) ((((x) & 0x000000ff) << 24) | \
67 (((x) & 0x0000ff00) << 8) | \
68 (((x) & 0x00ff0000) >> 8) | \
69 (((x) & 0xff000000) >> 24))
72 #define RED_SUP_SIZE ( 52 )
73 #define RED_SUP_PATH ( 0 )
74 #define RED_SUP_VER ( 1 )
75 #define RED_SUP_PAD ( 24 )
77 #define ETHER_ADDR_LEN ( 6 )
79 #define ETHER_TYPE_ARP ( 0x0806 )
80 #define ETHER_TYPE_VLAN ( 0x8100 )
81 #define ETHER_TYPE_RED_SUP ( 0x88FB )
82 #define ETHER_TYPE_RED_SUP_BIG_ENDIEN ( 0xFB88 )
83 #define ETHER_TYPE_SIZE ( 2 )
84 #define ETHER_HEADER_LEN ( 14 )
85 #define ETHER_VLAN_PT_LEN ( 4 )
87 #define ETHER_TYPE_OFFSET ( 12 )
89 #define ARP_IP_SRC_OFFSET ( 28 )
90 #define ARP_IP_DST_OFFSET ( 38 )
92 #define RED_FRAME_MIN_SIZE ( 66 )
93 #define RED_FRAME_VLAN_MIN_SIZE ( 70 )
95 #define RED_TLV2_TYPE ( 30 )
97 #define ICSS_EMAC_MAXMTU_HSR 1528
100 typedef struct _SUP_TAG
110 typedef struct _TLV1_TAG
120 typedef struct _TLV2_TAG
130 typedef struct _TLV0_TAG
139 typedef struct _RED_FRAME
370 typedef struct _RED_STATISTICS
464 typedef struct _RED_INDEX_ARRAY_ENTRY
478 typedef struct _RED_BIN_ARRAY_ENTRY
490 typedef struct _RED_NODE_TABLE_ENTRY
511 typedef struct _RED_NODE_TABLE
532 #define RED_DEBUG_MSG(...) printf(__VA_ARGS__)
534 #define RED_DEBUG_MSG(...)
@ LRE_IF_STATS_CNT_TX_B
Definition: hsrPrp_red_common.h:322
uint32_t cntUniqueA
Definition: hsrPrp_red_common.h:397
@ LRE_IF_STATS_CNT_NODES
Definition: hsrPrp_red_common.h:333
@ SN_HSR_REDBOX_SAN
Definition: hsrPrp_red_common.h:263
uint32_t cntRxA
Definition: hsrPrp_red_common.h:496
@ RED_OK
Definition: hsrPrp_red_common.h:526
LreNodeType_t
LRE Node Type.
Definition: hsrPrp_red_common.h:168
@ RED_REM_NODE_TYPE_REDBOXP
Definition: hsrPrp_red_common.h:357
@ LRE_IF_STATS_CNT_UNIQUE_C
Definition: hsrPrp_red_common.h:337
@ LRE_IF_STATS_CNT_ERR_WRONG_LAN_B
Definition: hsrPrp_red_common.h:325
@ LRE_IF_STATS_CNT_MULTI_C
Definition: hsrPrp_red_common.h:343
uint8_t state
Definition: hsrPrp_red_common.h:494
uint32_t TX_UC_FRAMES
Definition: hsrPrp_red_common.h:425
LreTruthValue_t
LRE Truth Value.
Definition: hsrPrp_red_common.h:298
@ LRE_IF_STATS_CNT_TX_C
Definition: hsrPrp_red_common.h:323
uint32_t DEBUG_1
Definition: hsrPrp_red_common.h:453
uint32_t cntOwnRxB
Definition: hsrPrp_red_common.h:413
uint32_t RXA_OVERFLOW
Definition: hsrPrp_red_common.h:444
uint16_t ether_type
Definition: hsrPrp_red_common.h:103
LreTableOperation_t
LRE Table Operation.
Definition: hsrPrp_red_common.h:309
@ HSR_COMMON_MODE_T
Definition: hsrPrp_red_common.h:248
LreRedBoxIdentity_t
LRE RedBox Identity.
Definition: hsrPrp_red_common.h:275
RemNodeType_t
Remote Node Type.
Definition: hsrPrp_red_common.h:354
uint32_t cntLookupErrB
Definition: hsrPrp_red_common.h:417
Definition: hsrPrp_red_common.h:101
HSRMode_t
LRE HSR Mode.
Definition: hsrPrp_red_common.h:244
uint32_t cntErrWrongLanC
Definition: hsrPrp_red_common.h:381
LreRowStatus_t
LRE Row Status.
Definition: hsrPrp_red_common.h:153
uint32_t cntDuplicateA
Definition: hsrPrp_red_common.h:402
uint32_t cntErrWrongLanA
Definition: hsrPrp_red_common.h:379
uint32_t errRxB
Definition: hsrPrp_red_common.h:499
@ REDBOX_ID2A
Definition: hsrPrp_red_common.h:279
uint32_t cntLookupErrA
Definition: hsrPrp_red_common.h:416
uint32_t cntMultiB
Definition: hsrPrp_red_common.h:408
@ SN_NON_BRIDGING_NODE
Definition: hsrPrp_red_common.h:260
@ SN_HSR_NODE
Definition: hsrPrp_red_common.h:264
@ LRE_IF_STATS_CNT_ERRORS_B
Definition: hsrPrp_red_common.h:331
uint32_t cntRxA
Definition: hsrPrp_red_common.h:384
#define ETHER_ADDR_LEN
Definition: hsrPrp_red_common.h:77
uint8_t cntRxSupA
Definition: hsrPrp_red_common.h:500
@ REDBOX_ID7B
Definition: hsrPrp_red_common.h:290
Node Table Entry.
Definition: hsrPrp_red_common.h:491
uint16_t vlanTagSize
Definition: hsrPrp_red_common.h:144
uint32_t cntTxA
Definition: hsrPrp_red_common.h:374
@ LRE_IF_STATS_CNT_ERR_WRONG_LAN_C
Definition: hsrPrp_red_common.h:326
@ LRE_ROW_STATUS_CREATE_AND_WAIT
Definition: hsrPrp_red_common.h:159
@ LRE_IF_STATS_CNT_DUPLICATE_C
Definition: hsrPrp_red_common.h:340
@ RED_PORT_A
Definition: hsrPrp_red_common.h:191
@ SN_BRIDGING_UNSPECIFIED
Definition: hsrPrp_red_common.h:261
uint32_t RXA_FWD_FAILACQU_QUEUE
Definition: hsrPrp_red_common.h:450
uint16_t path_and_ver
Definition: hsrPrp_red_common.h:104
@ RED_REM_NODE_TYPE_DANP
Definition: hsrPrp_red_common.h:356
uint32_t cntOwnRxA
Definition: hsrPrp_red_common.h:412
@ REDBOX_ID4A
Definition: hsrPrp_red_common.h:283
@ REDBOX_ID1A
Definition: hsrPrp_red_common.h:277
@ RED_REM_NODE_TYPE_VDANP
Definition: hsrPrp_red_common.h:358
uint32_t RXA_FAILACQU_QUEUE
Definition: hsrPrp_red_common.h:448
Bin array Entry.
Definition: hsrPrp_red_common.h:479
uint32_t RXB_BC_FRAMES
Definition: hsrPrp_red_common.h:439
@ SN_PRP_NODE
Definition: hsrPrp_red_common.h:262
uint16_t bin_offset
Definition: hsrPrp_red_common.h:468
uint16_t nodetable_offset
Definition: hsrPrp_red_common.h:482
@ LRE_IF_STATS_CNT_RX_C
Definition: hsrPrp_red_common.h:329
uint32_t RXB_UC_FRAMES
Definition: hsrPrp_red_common.h:441
uint32_t cntUniqueB
Definition: hsrPrp_red_common.h:398
uint8_t cntRxSupB
Definition: hsrPrp_red_common.h:501
Definition: hsrPrp_red_common.h:111
uint32_t RXB_OVERFLOW
Definition: hsrPrp_red_common.h:445
@ LRE_IF_STATS_CNT_RX_A
Definition: hsrPrp_red_common.h:327
uint32_t cntRxB
Definition: hsrPrp_red_common.h:497
@ LRE_PORT_ACTIVE
Definition: hsrPrp_red_common.h:203
uint32_t errRxA
Definition: hsrPrp_red_common.h:498
uint32_t TX_MC_FRAMES
Definition: hsrPrp_red_common.h:424
RedPort_t
RED Port.
Definition: hsrPrp_red_common.h:189
#define ICSS_EMAC_PORT_2
Used to specify physical port 2 MII 1 (tx)
Definition: icss_emac.h:193
uint32_t TXB_BYTE_CNT
Definition: hsrPrp_red_common.h:437
uint32_t RXB_FWD_OVERFLOW
Definition: hsrPrp_red_common.h:447
@ RED_REM_NODE_TYPE_UNKNOWN
Definition: hsrPrp_red_common.h:363
@ LRE_LINK_DOWN
Definition: hsrPrp_red_common.h:214
@ LRE_TRUE
Definition: hsrPrp_red_common.h:301
uint32_t cntRxB
Definition: hsrPrp_red_common.h:385
RED_NODE_TABLE_ENTRY * entries
Definition: hsrPrp_red_common.h:514
@ RED_REM_NODE_TYPE_VDANH
Definition: hsrPrp_red_common.h:361
LreDuplicateDiscard_t
LRE Duplicate Discard.
Definition: hsrPrp_red_common.h:222
uint16_t timeLasSeenS
Definition: hsrPrp_red_common.h:502
LreTransparentReception_t
LRE Transparent Reception.
Definition: hsrPrp_red_common.h:233
@ LRE_FALSE
Definition: hsrPrp_red_common.h:300
LRE Interface Statistics.
Definition: hsrPrp_red_common.h:371
uint16_t paddingSize
Definition: hsrPrp_red_common.h:145
uint32_t cntDuplicateB
Definition: hsrPrp_red_common.h:403
uint32_t RX_UC_FRAMES
Definition: hsrPrp_red_common.h:431
uint32_t cntErrorsC
Definition: hsrPrp_red_common.h:391
@ HSR_COMMON_MODE_N
Definition: hsrPrp_red_common.h:247
uint32_t RXA_FWD_OVERFLOW
Definition: hsrPrp_red_common.h:446
uint32_t RX_MC_FRAMES
Definition: hsrPrp_red_common.h:430
@ RED_ERR
Definition: hsrPrp_red_common.h:527
@ LRE_IF_STATS_CNT_PROXY_NODES
Definition: hsrPrp_red_common.h:334
@ LRE_TR_PASS_RCT
Definition: hsrPrp_red_common.h:236
@ REDBOX_ID5B
Definition: hsrPrp_red_common.h:286
@ REDBOX_ID3A
Definition: hsrPrp_red_common.h:281
@ REDBOX_ID5A
Definition: hsrPrp_red_common.h:285
uint32_t cntErrorsB
Definition: hsrPrp_red_common.h:390
@ LRE_ROW_STATUS_NOT_READY
Definition: hsrPrp_red_common.h:157
uint32_t RXB_FWD_FAILACQU_QUEUE
Definition: hsrPrp_red_common.h:451
uint32_t cntMultiC
Definition: hsrPrp_red_common.h:409
uint32_t RXB_FAILACQU_QUEUE
Definition: hsrPrp_red_common.h:449
uint32_t TXB_UC_FRAMES
Definition: hsrPrp_red_common.h:435
@ LRE_ROW_STATUS_ACTIVE
Definition: hsrPrp_red_common.h:155
uint32_t hostCntRx
Definition: hsrPrp_red_common.h:419
uint32_t cntErrorsA
Definition: hsrPrp_red_common.h:389
uint32_t cntUniqueC
Definition: hsrPrp_red_common.h:399
@ LRE_ROW_STATUS_CREATE_AND_GO
Definition: hsrPrp_red_common.h:158
@ LRE_IF_STATS_CNT_UNIQUE_A
Definition: hsrPrp_red_common.h:335
uint8_t bitLinBin
Definition: hsrPrp_red_common.h:471
@ LRE_IF_STATS_CNT_ERR_WRONG_LAN_A
Definition: hsrPrp_red_common.h:324
uint32_t TX_BYTE_CNT
Definition: hsrPrp_red_common.h:427
@ RED_REM_NODE_TYPE_DANH
Definition: hsrPrp_red_common.h:359
uint16_t seq_nr
Definition: hsrPrp_red_common.h:105
@ LRE_IF_STATS_CNT_OWN_RX_A
Definition: hsrPrp_red_common.h:344
MAC Address.
Definition: hsrPrp_red_common.h:179
@ SN_HSR_REDBOX_PRP_B
Definition: hsrPrp_red_common.h:267
RED_STATUS
RED Status.
Definition: hsrPrp_red_common.h:524
uint8_t type
Definition: hsrPrp_red_common.h:123
uint32_t RX_BC_FRAMES
Definition: hsrPrp_red_common.h:429
LreIfStat_t
LRE Interface Statistics Entry.
Definition: hsrPrp_red_common.h:320
uint32_t cntNodes
Definition: hsrPrp_red_common.h:393
uint16_t binNoEntries
Definition: hsrPrp_red_common.h:470
uint32_t cntMultiA
Definition: hsrPrp_red_common.h:407
@ REDBOX_ID3B
Definition: hsrPrp_red_common.h:282
#define ICSS_EMAC_PORT_1
Used to specify physical port 1 MII 0 (tx)
Definition: icss_emac.h:188
uint32_t DEBUG_4
Definition: hsrPrp_red_common.h:457
@ LRE_IF_STATS_CNT_DUPLICATE_A
Definition: hsrPrp_red_common.h:338
SwitchingEndNode_t
The switching end node functionality.
Definition: hsrPrp_red_common.h:258
uint32_t DEBUG_3
Definition: hsrPrp_red_common.h:456
uint32_t max
Definition: hsrPrp_red_common.h:516
Definition: hsrPrp_red_common.h:121
@ LRE_IF_STATS_CNT_OWN_RX_B
Definition: hsrPrp_red_common.h:345
uint32_t cntRxC
Definition: hsrPrp_red_common.h:386
@ LRE_IF_STATS_CNT_DUPLICATE_B
Definition: hsrPrp_red_common.h:339
@ LRE_IF_STATS_CNT_MULTI_A
Definition: hsrPrp_red_common.h:341
uint32_t TXB_MC_FRAMES
Definition: hsrPrp_red_common.h:434
uint8_t mac_length
Definition: hsrPrp_red_common.h:114
@ HSR_COMMON_MODE_H
Definition: hsrPrp_red_common.h:246
uint8_t type
Definition: hsrPrp_red_common.h:113
uint16_t bufferLen
Definition: hsrPrp_red_common.h:143
@ RED_PORT_B
Definition: hsrPrp_red_common.h:192
uint32_t tx_bc_frames
Definition: hsrPrp_red_common.h:423
@ SN_HSR_REDBOX_PRP_A
Definition: hsrPrp_red_common.h:266
@ LRE_NODE_TYPE_PRP_MODE_1
Definition: hsrPrp_red_common.h:170
@ HSR_COMMON_MODE_U
Definition: hsrPrp_red_common.h:249
uint8_t * pDataBuffer
Definition: hsrPrp_red_common.h:142
Definition: hsrPrp_red_common.h:131
@ LRE_IF_STATS_CNT_MULTI_B
Definition: hsrPrp_red_common.h:342
uint32_t cntErrWrongLanB
Definition: hsrPrp_red_common.h:380
uint32_t DEBUG_2
Definition: hsrPrp_red_common.h:454
@ SN_HSR_REDBOX_HSR
Definition: hsrPrp_red_common.h:265
@ REDBOX_ID2B
Definition: hsrPrp_red_common.h:280
@ LRE_IF_STATS_CNT_RX_B
Definition: hsrPrp_red_common.h:328
@ LRE_IF_STATS_CNT_ERRORS_A
Definition: hsrPrp_red_common.h:330
uint32_t RXB_MC_FRAMES
Definition: hsrPrp_red_common.h:440
@ REDBOX_ID6B
Definition: hsrPrp_red_common.h:288
@ REDBOX_ID6A
Definition: hsrPrp_red_common.h:287
@ LRE_TABLE_NO_OP
Definition: hsrPrp_red_common.h:311
@ LRE_ROW_STATUS_NOT_IN_SERVICE
Definition: hsrPrp_red_common.h:156
uint32_t TXB_BC_FRAMES
Definition: hsrPrp_red_common.h:433
Definition: hsrPrp_red_common.h:140
uint16_t timeLasSeenA
Definition: hsrPrp_red_common.h:503
uint32_t cntProxyNodes
Definition: hsrPrp_red_common.h:394
@ LRE_TABLE_CLEAR
Definition: hsrPrp_red_common.h:312
@ LRE_PORT_NOT_ACTIVE
Definition: hsrPrp_red_common.h:202
@ REDBOX_ID7A
Definition: hsrPrp_red_common.h:289
@ LRE_IF_STATS_CNT_TX_A
Definition: hsrPrp_red_common.h:321
@ RED_REM_NODE_TYPE_SAN
Definition: hsrPrp_red_common.h:362
Index array Entry.
Definition: hsrPrp_red_common.h:465
uint32_t cntDuplicateC
Definition: hsrPrp_red_common.h:404
uint32_t cntTxC
Definition: hsrPrp_red_common.h:376
@ LRE_LINK_UP
Definition: hsrPrp_red_common.h:213
LrePortAdminState_t
LRE Port Admin State.
Definition: hsrPrp_red_common.h:200
@ LRE_IF_STATS_CNT_ERRORS_C
Definition: hsrPrp_red_common.h:332
@ LRE_IF_STATS_CNT_UNIQUE_B
Definition: hsrPrp_red_common.h:336
@ LRE_NODE_TYPE_HSR
Definition: hsrPrp_red_common.h:171
@ REDBOX_ID4B
Definition: hsrPrp_red_common.h:284
uint16_t timeLasSeenB
Definition: hsrPrp_red_common.h:504
uint8_t type
Definition: hsrPrp_red_common.h:133
Node Table.
Definition: hsrPrp_red_common.h:512
uint8_t status
Definition: hsrPrp_red_common.h:495
@ REDBOX_ID1B
Definition: hsrPrp_red_common.h:278
@ LRE_DD_DISCARD
Definition: hsrPrp_red_common.h:225
@ LRE_DD_DO_NOT_DISCARD
Definition: hsrPrp_red_common.h:224
uint8_t length
Definition: hsrPrp_red_common.h:134
@ HSR_COMMON_MODE_M
Definition: hsrPrp_red_common.h:250
uint8_t mac_length
Definition: hsrPrp_red_common.h:124
LreLinkStatus_t
LRE Link Status.
Definition: hsrPrp_red_common.h:211
uint32_t cntTxB
Definition: hsrPrp_red_common.h:375
@ LRE_TR_REMOVE_RCT
Definition: hsrPrp_red_common.h:235
uint32_t cnt
Definition: hsrPrp_red_common.h:515
uint32_t NODE_TABLE_INSERTION_ERROR
Definition: hsrPrp_red_common.h:443
@ LRE_ROW_STATUS_DESTROY
Definition: hsrPrp_red_common.h:160
@ RED_REM_NODE_TYPE_REDBOXH
Definition: hsrPrp_red_common.h:360