AM64x MCU+ SDK  08.02.00
enet_mod_port.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Texas Instruments Incorporated 2020
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
40 #ifndef ENET_MOD_PORT_H_
41 #define ENET_MOD_PORT_H_
42 
43 /* ========================================================================== */
44 /* Include Files */
45 /* ========================================================================== */
46 
47 #include <stdint.h>
49 
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53 
54 /* ========================================================================== */
55 /* Macros */
56 /* ========================================================================== */
57 
58 /* None */
59 
60 /* ========================================================================== */
61 /* Structures and Enums */
62 /* ========================================================================== */
63 
67 typedef struct EnetPort_VlanCfg_s
68 {
70  uint32_t portPri;
71 
73  uint32_t portCfi;
74 
76  uint32_t portVID;
78 
82 typedef enum EnetPort_EgressPriorityType_e
83 {
86 
90 
94 typedef struct EnetPort_TrafficShapingRates_s
95 {
98 
102 
106 typedef struct EnetPort_TrafficShapingCfg_s
107 {
111 
118 typedef struct EnetPort_PriorityMap_s
119 {
122  uint32_t priorityMap[ENET_PRI_NUM];
124 
128 typedef struct EnetPort_DscpPriorityMap_s
129 {
131  uint32_t tosMap[ENET_TOS_PRI_NUM];
132 
135 
139 
143 typedef struct EnetPort_MaxLen_s
144 {
146  uint32_t mtu[ENET_PRI_NUM];
147 
149  uint32_t mru;
151 
152 /* ========================================================================== */
153 /* Global Variables Declarations */
154 /* ========================================================================== */
155 
156 /* None */
157 
158 /* ========================================================================== */
159 /* Function Declarations */
160 /* ========================================================================== */
161 
162 /* None */
163 
164 /* ========================================================================== */
165 /* Deprecated Function Declarations */
166 /* ========================================================================== */
167 
168 /* None */
169 
170 /* ========================================================================== */
171 /* Static Function Definitions */
172 /* ========================================================================== */
173 
174 /* None */
175 
176 #ifdef __cplusplus
177 }
178 #endif
179 
180 #endif /* ENET_MOD_PORT_H_ */
EnetPort_PriorityMap
Priority map.
Definition: enet_mod_port.h:119
EnetPort_DscpPriorityMap::dscpIPv6En
bool dscpIPv6En
Definition: enet_mod_port.h:137
EnetPort_VlanCfg
VLAN configuration parameters.
Definition: enet_mod_port.h:68
EnetPort_MaxLen::mru
uint32_t mru
Definition: enet_mod_port.h:149
enet_types.h
This file contains the basic types using across the Enet driver.
EnetPort_DscpPriorityMap
DSCP priority map.
Definition: enet_mod_port.h:129
ENET_PRI_NUM
#define ENET_PRI_NUM
Packet priority.
Definition: enet_types.h:165
EnetPort_EgressPriorityType
EnetPort_EgressPriorityType
Egress priority type.
Definition: enet_mod_port.h:83
EnetPort_VlanCfg::portPri
uint32_t portPri
Definition: enet_mod_port.h:70
EnetPort_TrafficShapingCfg
Traffic shaping configuration for all priorities.
Definition: enet_mod_port.h:107
EnetPort_MaxLen
Maximum packet lengths for TX and RX.
Definition: enet_mod_port.h:144
ENET_EGRESS_PRI_TYPE_ESCALATE
@ ENET_EGRESS_PRI_TYPE_ESCALATE
Definition: enet_mod_port.h:88
EnetPort_TrafficShapingRates
Traffic shaping parameters (committed and excess rates).
Definition: enet_mod_port.h:95
EnetPort_VlanCfg::portCfi
uint32_t portCfi
Definition: enet_mod_port.h:73
ENET_EGRESS_PRI_TYPE_FIXED
@ ENET_EGRESS_PRI_TYPE_FIXED
Definition: enet_mod_port.h:85
ENET_TOS_PRI_NUM
#define ENET_TOS_PRI_NUM
Type of Service (ToS) priority.
Definition: enet_types.h:174
EnetPort_TrafficShapingRates::committedRateBitsPerSec
uint64_t committedRateBitsPerSec
Definition: enet_mod_port.h:97
EnetPort_DscpPriorityMap::dscpIPv4En
bool dscpIPv4En
Definition: enet_mod_port.h:134
EnetPort_VlanCfg::portVID
uint32_t portVID
Definition: enet_mod_port.h:76
EnetPort_TrafficShapingRates::excessRateBitsPerSec
uint64_t excessRateBitsPerSec
Definition: enet_mod_port.h:100