AM261x MCU+ SDK: enet_mod_hostport.h Source File

| AM261x MCU+ SDK 26.00.00 |

enet_mod_hostport.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
47 #ifndef ENET_MOD_HOSTPORT_H_
48 #define ENET_MOD_HOSTPORT_H_
49
50 /* ========================================================================== */
51 /* Include Files */
52 /* ========================================================================== */
53
54 #include <stdint.h>
55 #include <include/core/enet_types.h>
56 #include <include/core/enet_ioctl.h>
57 #include <include/core/enet_mod_port.h>
58
59 #ifdef __cplusplus
60 extern "C" {
61 #endif
62
63 /* ========================================================================== */
64 /* Macros */
65 /* ========================================================================== */
66
68 #define ENET_HOSTPORT_PUBLIC_IOCTL(x) (ENET_IOCTL_TYPE_PUBLIC | \
69 ENET_IOCTL_HOSTPORT_BASE | \
70 ENET_IOCTL_MIN(x))
71
72 /* ========================================================================== */
73 /* Structures and Enums */
74 /* ========================================================================== */
75
79 typedef enum EnetHostPort_Ioctl_e
80 {
88 ENET_HOSTPORT_IOCTL_GET_VERSION = ENET_HOSTPORT_PUBLIC_IOCTL(0U),
89
97 ENET_HOSTPORT_IOCTL_PRINT_REGS = ENET_HOSTPORT_PUBLIC_IOCTL(1U),
98
106 ENET_HOSTPORT_IOCTL_ENABLE = ENET_HOSTPORT_PUBLIC_IOCTL(2U),
107
115 ENET_HOSTPORT_IOCTL_DISABLE = ENET_HOSTPORT_PUBLIC_IOCTL(3U),
116
124 ENET_HOSTPORT_IOCTL_SET_INGRESS_DSCP_PRI_MAP = ENET_HOSTPORT_PUBLIC_IOCTL(4U),
125
133 ENET_HOSTPORT_IOCTL_GET_INGRESS_DSCP_PRI_MAP = ENET_HOSTPORT_PUBLIC_IOCTL(5U),
134
142 ENET_HOSTPORT_IOCTL_SET_PRI_REGEN_MAP = ENET_HOSTPORT_PUBLIC_IOCTL(6U),
143
151 ENET_HOSTPORT_IOCTL_GET_PRI_REGEN_MAP = ENET_HOSTPORT_PUBLIC_IOCTL(7U),
152
160 ENET_HOSTPORT_IOCTL_SET_EGRESS_QOS_PRI_MAP = ENET_HOSTPORT_PUBLIC_IOCTL(8U),
161
169 ENET_HOSTPORT_IOCTL_GET_EGRESS_QOS_PRI_MAP = ENET_HOSTPORT_PUBLIC_IOCTL(9U),
170
178 ENET_HOSTPORT_IOCTL_ENABLE_INGRESS_TRAFFIC_SHAPING = ENET_HOSTPORT_PUBLIC_IOCTL(10U),
179
187 ENET_HOSTPORT_IOCTL_DISABLE_INGRESS_TRAFFIC_SHAPING = ENET_HOSTPORT_PUBLIC_IOCTL(11U),
188
196 ENET_HOSTPORT_IOCTL_GET_INGRESS_TRAFFIC_SHAPING = ENET_HOSTPORT_PUBLIC_IOCTL(12U),
197
205 ENET_HOSTPORT_IOCTL_GET_MAXLEN = ENET_HOSTPORT_PUBLIC_IOCTL(13U),
206
214 ENET_HOSTPORT_IS_CSUM_OFFLOAD_ENABLED = ENET_HOSTPORT_PUBLIC_IOCTL(14U),
215
223 ENET_HOSTPORT_IOCTL_SET_CREDIT_BASED_SHAPING = ENET_HOSTPORT_PUBLIC_IOCTL(15U),
224
232 ENET_HOSTPORT_IOCTL_GET_CREDIT_BASED_SHAPING = ENET_HOSTPORT_PUBLIC_IOCTL(16U),
233 } EnetHostPort_Ioctl;
234
238 typedef enum EnetHostPort_IngressPriorityType_e
239 {
241 ENET_INGRESS_PRI_TYPE_FIXED = 0U,
242
244 ENET_INGRESS_PRI_TYPE_RR,
245 } EnetHostPort_IngressPriorityType;
246
247 /* ========================================================================== */
248 /* Global Variables Declarations */
249 /* ========================================================================== */
250
251 /* None */
252
253 /* ========================================================================== */
254 /* Function Declarations */
255 /* ========================================================================== */
256
257 /* None */
258
259 /* ========================================================================== */
260 /* Deprecated Function Declarations */
261 /* ========================================================================== */
262
263 /* None */
264
265 /* ========================================================================== */
266 /* Static Function Definitions */
267 /* ========================================================================== */
268
269 /* None */
270
271 #ifdef __cplusplus
272 }
273 #endif
274
275 #endif /* ENET_MOD_HOSTPORT_H_ */
276
ENET_HOSTPORT_IOCTL_SET_INGRESS_DSCP_PRI_MAP
@ ENET_HOSTPORT_IOCTL_SET_INGRESS_DSCP_PRI_MAP
Set ingress DSCP priority (TOS) map.
Definition: enet_mod_hostport.h:124
ENET_HOSTPORT_PUBLIC_IOCTL
#define ENET_HOSTPORT_PUBLIC_IOCTL(x)
Helper macro to create IOCTL commands for host port module.
Definition: enet_mod_hostport.h:68
ENET_HOSTPORT_IOCTL_SET_CREDIT_BASED_SHAPING
@ ENET_HOSTPORT_IOCTL_SET_CREDIT_BASED_SHAPING
Set Idleslope for Credit Based Shaper on Host Port.
Definition: enet_mod_hostport.h:223
ENET_HOSTPORT_IOCTL_ENABLE
@ ENET_HOSTPORT_IOCTL_ENABLE
Enable host port.
Definition: enet_mod_hostport.h:106
ENET_HOSTPORT_IS_CSUM_OFFLOAD_ENABLED
@ ENET_HOSTPORT_IS_CSUM_OFFLOAD_ENABLED
Check if checksum offload is enabled.
Definition: enet_mod_hostport.h:214
enet_mod_port.h
This file contains the type definitions and helper macros that are common for host and MAC ports.
enet_types.h
This file contains the basic types using across the Enet driver.
EnetHostPort_Ioctl
EnetHostPort_Ioctl
Host port IOCTL commands.
Definition: enet_mod_hostport.h:80
enet_ioctl.h
This file contains the type definitions and helper macros for the Enet IOCTL interface.
ENET_HOSTPORT_IOCTL_SET_EGRESS_QOS_PRI_MAP
@ ENET_HOSTPORT_IOCTL_SET_EGRESS_QOS_PRI_MAP
Set QoS egress priority map.
Definition: enet_mod_hostport.h:160
ENET_HOSTPORT_IOCTL_GET_EGRESS_QOS_PRI_MAP
@ ENET_HOSTPORT_IOCTL_GET_EGRESS_QOS_PRI_MAP
Get QoS egress priority map.
Definition: enet_mod_hostport.h:169
ENET_INGRESS_PRI_TYPE_FIXED
@ ENET_INGRESS_PRI_TYPE_FIXED
Definition: enet_mod_hostport.h:241
EnetHostPort_IngressPriorityType
EnetHostPort_IngressPriorityType
Port priority type.
Definition: enet_mod_hostport.h:239
ENET_HOSTPORT_IOCTL_ENABLE_INGRESS_TRAFFIC_SHAPING
@ ENET_HOSTPORT_IOCTL_ENABLE_INGRESS_TRAFFIC_SHAPING
Enable ingress traffic shaping configuration.
Definition: enet_mod_hostport.h:178
ENET_HOSTPORT_IOCTL_GET_INGRESS_DSCP_PRI_MAP
@ ENET_HOSTPORT_IOCTL_GET_INGRESS_DSCP_PRI_MAP
Get ingress DSCP priority (TOS) map.
Definition: enet_mod_hostport.h:133
ENET_HOSTPORT_IOCTL_GET_MAXLEN
@ ENET_HOSTPORT_IOCTL_GET_MAXLEN
Get MRU and MTU.
Definition: enet_mod_hostport.h:205
ENET_HOSTPORT_IOCTL_GET_INGRESS_TRAFFIC_SHAPING
@ ENET_HOSTPORT_IOCTL_GET_INGRESS_TRAFFIC_SHAPING
Get ingress traffic shaping configuration.
Definition: enet_mod_hostport.h:196
ENET_HOSTPORT_IOCTL_PRINT_REGS
@ ENET_HOSTPORT_IOCTL_PRINT_REGS
Print host port registers.
Definition: enet_mod_hostport.h:97
ENET_HOSTPORT_IOCTL_SET_PRI_REGEN_MAP
@ ENET_HOSTPORT_IOCTL_SET_PRI_REGEN_MAP
Set VLAN priority regeneration map.
Definition: enet_mod_hostport.h:142
ENET_HOSTPORT_IOCTL_GET_PRI_REGEN_MAP
@ ENET_HOSTPORT_IOCTL_GET_PRI_REGEN_MAP
Get VLAN priority regeneration map.
Definition: enet_mod_hostport.h:151
ENET_HOSTPORT_IOCTL_GET_CREDIT_BASED_SHAPING
@ ENET_HOSTPORT_IOCTL_GET_CREDIT_BASED_SHAPING
Get Idleslope of Credit Based Shaper on Host Port queue.
Definition: enet_mod_hostport.h:232
ENET_INGRESS_PRI_TYPE_RR
@ ENET_INGRESS_PRI_TYPE_RR
Definition: enet_mod_hostport.h:244
ENET_HOSTPORT_IOCTL_DISABLE_INGRESS_TRAFFIC_SHAPING
@ ENET_HOSTPORT_IOCTL_DISABLE_INGRESS_TRAFFIC_SHAPING
Disable ingress traffic shaping configuration.
Definition: enet_mod_hostport.h:187
ENET_HOSTPORT_IOCTL_GET_VERSION
@ ENET_HOSTPORT_IOCTL_GET_VERSION
Get the hardware version of the host port module.
Definition: enet_mod_hostport.h:88
ENET_HOSTPORT_IOCTL_DISABLE
@ ENET_HOSTPORT_IOCTL_DISABLE
Disable host port.
Definition: enet_mod_hostport.h:115