AM64x MCU+ SDK  08.02.00
enet_mod_tas.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Texas Instruments Incorporated 2021
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_TAS_H_
48 #define ENET_MOD_TAS_H_
49 
50 /* ========================================================================== */
51 /* Include Files */
52 /* ========================================================================== */
53 
54 #include <stdint.h>
55 #include <include/core/enet_mod.h>
56 
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60 
61 /* ========================================================================== */
62 /* Macros */
63 /* ========================================================================== */
64 
66 #define ENET_TAS_PUBLIC_IOCTL(x) (ENET_IOCTL_TYPE_PUBLIC | \
67  ENET_IOCTL_TAS_BASE | \
68  ENET_IOCTL_MIN(x))
69 
71 #define ENET_TAS_MAX_CMD_LISTS (16)
72 
74 #define ENET_TAS_MAX_NUM_QUEUES (8)
75 
77 #define ENET_TAS_MIN_CYCLE_TIME_NS (1000000)
78 
80 #define ENET_TAS_MIN_WINDOW_DURATION_NS (10000)
81 
82 /* ========================================================================== */
83 /* Structures and Enums */
84 /* ========================================================================== */
85 
89 typedef enum EnetTas_Ioctl_e
90 {
101 
112 
127 
138 
149 
160 
171 
182 } EnetTas_Ioctl;
183 
187 typedef struct EnetTas_GenericInArgs_s
188 {
192 
196 typedef enum EnetTas_OperStatus_s
197 {
200 
204 
208 typedef enum EnetTas_TasState_s
209 {
212 
215 
219 
223 typedef struct EnetTas_GateCmdEntry_s
224 {
226  uint32_t timeInterval;
227 
229  uint8_t gateStateMask;
231 
235 typedef struct EnetTas_MaxSDUTable_s
236 {
237  uint16_t maxSDU[ENET_TAS_MAX_NUM_QUEUES];
239 
243 typedef struct EnetTas_ControlList_s
244 {
248  uint64_t baseTime;
249 
252 
254  uint64_t cycleTime;
255 
257  uint8_t listLength;
258 
262 
266 typedef struct EnetTas_ConfigStatus_s
267 {
270 
274 
276  uint8_t configPending;
277 
280  uint8_t configChange;
282 
286 typedef struct EnetTas_SetAdminListInArgs_s
287 {
290 
294 
298 typedef struct EnetTas_SetStateInArgs_s
299 {
302 
306 
307 /* ========================================================================== */
308 /* Global Variables Declarations */
309 /* ========================================================================== */
310 
311 /* None */
312 
313 /* ========================================================================== */
314 /* Function Declarations */
315 /* ========================================================================== */
316 
317 /* None */
318 
319 /* ========================================================================== */
320 /* Deprecated Function Declarations */
321 /* ========================================================================== */
322 
323 /* None */
324 
325 /* ========================================================================== */
326 /* Static Function Definitions */
327 /* ========================================================================== */
328 
329 /* None */
330 
331 #ifdef __cplusplus
332 }
333 #endif
334 
335 #endif /* ENET_MOD_TAS_H_ */
336 
EnetTas_GateCmdEntry::timeInterval
uint32_t timeInterval
Definition: enet_mod_tas.h:226
EnetTas_ControlList::listLength
uint8_t listLength
Definition: enet_mod_tas.h:257
EnetTas_ConfigStatus
Config state machine variables. See IEEE Std 802.1Q-2018 8.6.8.4.
Definition: enet_mod_tas.h:267
EnetTas_GenericInArgs
Generic input args.
Definition: enet_mod_tas.h:188
ENET_TAS_MAX_CMD_LISTS
#define ENET_TAS_MAX_CMD_LISTS
Maximum number of gate command entries in each list.
Definition: enet_mod_tas.h:71
EnetTas_TasState
EnetTas_TasState
TAS state types.
Definition: enet_mod_tas.h:209
EnetTas_SetStateInArgs
Input args for ENET_TAS_IOCTL_SET_STATE commands.
Definition: enet_mod_tas.h:299
EnetTas_ControlList::cycleTime
uint64_t cycleTime
Definition: enet_mod_tas.h:254
TAS_DISABLE
@ TAS_DISABLE
Definition: enet_mod_tas.h:211
EnetTas_ConfigStatus::configChangeTime
uint64_t configChangeTime
Definition: enet_mod_tas.h:269
EnetTas_ConfigStatus::configPending
uint8_t configPending
Definition: enet_mod_tas.h:276
ENET_TAS_IOCTL_GET_OPER_LIST_STATUS
@ ENET_TAS_IOCTL_GET_OPER_LIST_STATUS
Get the status of the operational list update.
Definition: enet_mod_tas.h:126
EnetTas_ConfigStatus::configChangeErrorCounter
uint32_t configChangeErrorCounter
Definition: enet_mod_tas.h:273
Enet_MacPort
Enet_MacPort
MAC port.
Definition: enet_types.h:406
ENET_TAS_IOCTL_GET_ADMIN_LIST
@ ENET_TAS_IOCTL_GET_ADMIN_LIST
Get the admin list parameters of the TAS module.
Definition: enet_mod_tas.h:159
EnetTas_SetAdminListInArgs::adminList
EnetTas_ControlList adminList
Definition: enet_mod_tas.h:292
TAS_ENABLE
@ TAS_ENABLE
Definition: enet_mod_tas.h:214
EnetTas_MaxSDUTable
Max SDU table. See IEEE Std 802.1Q-2018 12.29.1.1.
Definition: enet_mod_tas.h:236
EnetTas_SetAdminListInArgs
Input args for ENET_TAS_IOCTL_SET_ADMIN_LIST commands.
Definition: enet_mod_tas.h:287
EnetTas_ControlList
Gate control list. See IEEE Std 802.1Q-2018 8.6.9.4 D3-1.
Definition: enet_mod_tas.h:244
EnetTas_SetStateInArgs::macPort
Enet_MacPort macPort
Definition: enet_mod_tas.h:301
TAS_OPER_LIST_NOT_YET_UPDATED
@ TAS_OPER_LIST_NOT_YET_UPDATED
Definition: enet_mod_tas.h:199
ENET_TAS_IOCTL_CONFIG_CHANGE_STATUS_PARAMS
@ ENET_TAS_IOCTL_CONFIG_CHANGE_STATUS_PARAMS
Get the TAS config change status parameters.
Definition: enet_mod_tas.h:181
EnetTas_Ioctl
EnetTas_Ioctl
TAS module IOCTL commands.
Definition: enet_mod_tas.h:90
TAS_OPER_LIST_UPDATED
@ TAS_OPER_LIST_UPDATED
Definition: enet_mod_tas.h:202
ENET_TAS_IOCTL_GET_OPER_LIST
@ ENET_TAS_IOCTL_GET_OPER_LIST
Get the operational list parameters of the TAS module.
Definition: enet_mod_tas.h:170
EnetTas_ControlList::sduTable
EnetTas_MaxSDUTable sduTable
Definition: enet_mod_tas.h:260
EnetTas_OperStatus
EnetTas_OperStatus
ICSSG TAS state types.
Definition: enet_mod_tas.h:197
ENET_TAS_MAX_NUM_QUEUES
#define ENET_TAS_MAX_NUM_QUEUES
Maximum number of transmit queues supported by implementation.
Definition: enet_mod_tas.h:74
EnetTas_GenericInArgs::macPort
Enet_MacPort macPort
Definition: enet_mod_tas.h:190
ENET_TAS_PUBLIC_IOCTL
#define ENET_TAS_PUBLIC_IOCTL(x)
Helper macro to create IOCTL commands for TAS module.
Definition: enet_mod_tas.h:66
EnetTas_ConfigStatus::configChange
uint8_t configChange
Definition: enet_mod_tas.h:280
ENET_TAS_IOCTL_SET_STATE
@ ENET_TAS_IOCTL_SET_STATE
Set the State of the TAS module.
Definition: enet_mod_tas.h:137
EnetTas_SetAdminListInArgs::macPort
Enet_MacPort macPort
Definition: enet_mod_tas.h:289
EnetTas_SetStateInArgs::state
EnetTas_TasState state
Definition: enet_mod_tas.h:304
EnetTas_GateCmdEntry
Gate control list. See IEEE Std 802.1Q-2018 8.6.8.4.
Definition: enet_mod_tas.h:224
enet_mod.h
This file contains the type definitions and helper macros for the Enet Module interface.
EnetTas_GateCmdEntry::gateStateMask
uint8_t gateStateMask
Definition: enet_mod_tas.h:229
ENET_TAS_IOCTL_GET_VERSION
@ ENET_TAS_IOCTL_GET_VERSION
Get the hardware version of the TAS module.
Definition: enet_mod_tas.h:100
TAS_RESET
@ TAS_RESET
Definition: enet_mod_tas.h:217
ENET_TAS_IOCTL_GET_STATE
@ ENET_TAS_IOCTL_GET_STATE
Get the State of the TAS module.
Definition: enet_mod_tas.h:148
EnetTas_ControlList::baseTime
uint64_t baseTime
Definition: enet_mod_tas.h:248
ENET_TAS_IOCTL_SET_ADMIN_LIST
@ ENET_TAS_IOCTL_SET_ADMIN_LIST
Set the admin list parameters of the TAS module.
Definition: enet_mod_tas.h:111