AM263x MCU+ SDK
09.01.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>
48
#include <
include/core/enet_types.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
;
77
}
EnetPort_VlanCfg
;
78
82
typedef
enum
EnetPort_EgressPriorityType_e
83
{
85
ENET_EGRESS_PRI_TYPE_FIXED
= 0U,
86
88
ENET_EGRESS_PRI_TYPE_ESCALATE
,
89
}
EnetPort_EgressPriorityType
;
90
94
typedef
struct
EnetPort_TrafficShapingRates_s
95
{
97
uint64_t
committedRateBitsPerSec
;
98
100
uint64_t
excessRateBitsPerSec
;
101
}
EnetPort_TrafficShapingRates
;
102
106
typedef
struct
EnetPort_CreditBasedShapingCfg_s
107
{
109
uint64_t idleSlope[
ENET_PRI_NUM
];
110
}
EnetPort_CreditBasedShapingCfg
;
111
115
typedef
struct
EnetPort_TrafficShapingCfg_s
116
{
118
EnetPort_TrafficShapingRates
rates[
ENET_PRI_NUM
];
119
}
EnetPort_TrafficShapingCfg
;
120
127
typedef
struct
EnetPort_PriorityMap_s
128
{
131
uint32_t priorityMap[
ENET_PRI_NUM
];
132
}
EnetPort_PriorityMap
;
133
137
typedef
struct
EnetPort_DscpPriorityMap_s
138
{
140
uint32_t tosMap[
ENET_TOS_PRI_NUM
];
141
143
bool
dscpIPv4En
;
144
146
bool
dscpIPv6En
;
147
}
EnetPort_DscpPriorityMap
;
148
152
typedef
struct
EnetPort_MaxLen_s
153
{
155
uint32_t mtu[
ENET_PRI_NUM
];
156
158
uint32_t
mru
;
159
}
EnetPort_MaxLen
;
160
161
#if ENET_CFG_IS_ON(CPSW_CUTTHRU)
162
typedef
struct
EnetPort_CutThruParams_s
163
{
165
bool
portSpeedAutoEn;
166
168
uint32_t rxPriCutThruEn;
169
171
uint32_t txPriCutThruEn;
172
} EnetPort_CutThruParams;
173
#endif
174
175
/* ========================================================================== */
176
/* Global Variables Declarations */
177
/* ========================================================================== */
178
179
/* None */
180
181
/* ========================================================================== */
182
/* Function Declarations */
183
/* ========================================================================== */
184
185
/* None */
186
187
/* ========================================================================== */
188
/* Deprecated Function Declarations */
189
/* ========================================================================== */
190
191
/* None */
192
193
/* ========================================================================== */
194
/* Static Function Definitions */
195
/* ========================================================================== */
196
197
/* None */
198
199
#ifdef __cplusplus
200
}
201
#endif
202
203
#endif
/* ENET_MOD_PORT_H_ */
EnetPort_PriorityMap
Priority map.
Definition:
enet_mod_port.h:128
EnetPort_DscpPriorityMap::dscpIPv6En
bool dscpIPv6En
Definition:
enet_mod_port.h:146
EnetPort_VlanCfg
VLAN configuration parameters.
Definition:
enet_mod_port.h:68
EnetPort_MaxLen::mru
uint32_t mru
Definition:
enet_mod_port.h:158
enet_types.h
This file contains the basic types using across the Enet driver.
EnetPort_DscpPriorityMap
DSCP priority map.
Definition:
enet_mod_port.h:138
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:116
EnetPort_MaxLen
Maximum packet lengths for TX and RX.
Definition:
enet_mod_port.h:153
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:143
EnetPort_VlanCfg::portVID
uint32_t portVID
Definition:
enet_mod_port.h:76
EnetPort_CreditBasedShapingCfg
Credit Based shaping parameters (idleSlope).
Definition:
enet_mod_port.h:107
EnetPort_TrafficShapingRates::excessRateBitsPerSec
uint64_t excessRateBitsPerSec
Definition:
enet_mod_port.h:100
source
networking
enet
core
include
core
enet_mod_port.h
generated by
1.8.20