Data Structures | Macros | Typedefs | Enumerations | Functions
icssg_fdb.h File Reference

This file contains the type definitions and helper macros for the ICSSG Forwarding Database (FDB) module interface. More...

#include <stdint.h>
#include <ti/drv/enet/include/core/enet_types.h>
#include <ti/drv/enet/include/core/enet_mod.h>

Data Structures

struct  IcssgFdb_MacAddr_s
 MAC address. More...
 
struct  IcssgFdb_VlanFidParams_s
 VLAN FID entry parameters. More...
 
struct  IcssgFdb_VlanFidEntry_s
 VLAN FID table entry. More...
 
struct  IcssgFdb_FdbEntry_s
 FDB entry configuration. More...
 
struct  IcssgFdb_PreemptEntry_s
 Priority for frame preemption configuration. More...
 
struct  IcssgFdb_DfltVlanCfg_s
 Default VLAN configuration. More...
 
struct  IcssgFdb_Cfg_s
 ICSSG FDB module configuration parameters. More...
 

Macros

#define ICSSG_FDB_PUBLIC_IOCTL(x)
 Helper macro to create IOCTL commands for ICSSG FDB module. More...
 
#define ICSSG_FDB_PORT_NUM   (3U)
 Number of supported ports (host port, physical ports 1 and 2).
 
#define ICSSG_FDB_MACPORT_NUM   (ICSSG_FDB_PORT_NUM - 1U)
 Number of supported MAC ports (physical ports 1 and 2).
 
ICSSG FDB entry fields.

#define ICSSG_FDB_ENTRY_P0_MEMBERSHIP   (ENET_BIT(0U))
 Host port membership. More...
 
#define ICSSG_FDB_ENTRY_P1_MEMBERSHIP   (ENET_BIT(1U))
 Physical port 1 membership. More...
 
#define ICSSG_FDB_ENTRY_P2_MEMBERSHIP   (ENET_BIT(2U))
 Physical port 2 membership. More...
 
#define ICSSG_FDB_ENTRY_AGEABLE   (ENET_BIT(3U))
 Ageable bit. More...
 
#define ICSSG_FDB_ENTRY_BLOCK   (ENET_BIT(4U))
 Block bit. More...
 
#define ICSSG_FDB_ENTRY_SECURE   (ENET_BIT(5U))
 Secure bit. More...
 
#define ICSSG_FDB_ENTRY_TOUCHED   (ENET_BIT(6U))
 Touched bit. More...
 
#define ICSSG_FDB_ENTRY_VALID   (ENET_BIT(7U))
 Valid bit. More...
 

Typedefs

typedef enum IcssgFdb_Ioctl_e IcssgFdb_Ioctl
 ICSSG FDB IOCTL commands.
 
typedef enum
IcssgFdb_QueuePreemptMode_e 
IcssgFdb_QueuePreemptMode
 Queue preemptive mode: express or preemptive.
 
typedef enum
IcssgFdb_QueueForwardMode_e 
IcssgFdb_QueueForwardMode
 Queue forward mode: cut-through or store-and-forward.
 
typedef enum IcssgFdb_PortState_e IcssgFdb_PortState
 Port states.
 
typedef enum
IcssgFdb_AcceptFrameCheck_e 
IcssgFdb_AcceptFrameCheck
 Acceptable frame check criteria.
 
typedef struct IcssgFdb_MacAddr_s IcssgFdb_MacAddr
 MAC address.
 
typedef struct
IcssgFdb_VlanFidParams_s 
IcssgFdb_VlanFidParams
 VLAN FID entry parameters.
 
typedef struct
IcssgFdb_VlanFidEntry_s 
IcssgFdb_VlanFidEntry
 VLAN FID table entry.
 
typedef struct IcssgFdb_FdbEntry_s IcssgFdb_FdbEntry
 FDB entry configuration.
 
typedef enum
IcssgFdb_PreemptVerifyState_e 
IcssgFdb_PreemptVerifyState
 Preemption Verify State Machine states.
 
typedef struct
IcssgFdb_PreemptEntry_s 
IcssgFdb_PreemptEntry
 Priority for frame preemption configuration.
 
typedef struct
IcssgFdb_DfltVlanCfg_s 
IcssgFdb_DfltVlanCfg
 Default VLAN configuration.
 
typedef struct IcssgFdb_Cfg_s IcssgFdb_Cfg
 ICSSG FDB module configuration parameters.
 

Enumerations

enum  IcssgFdb_Ioctl_e {
  ICSSG_FDB_IOCTL_ENABLE_PROMISCUOUS_MODE = ICSSG_FDB_PUBLIC_IOCTL(0U), ICSSG_FDB_IOCTL_DISABLE_PROMISCUOUS_MODE = ICSSG_FDB_PUBLIC_IOCTL(1U), ICSSG_FDB_IOCTL_VLAN_RESET_TABLE = ICSSG_FDB_PUBLIC_IOCTL(2U), ICSSG_FDB_IOCTL_VLAN_SET_ENTRY = ICSSG_FDB_PUBLIC_IOCTL(3U),
  ICSSG_FDB_IOCTL_VLAN_GET_ENTRY = ICSSG_FDB_PUBLIC_IOCTL(4U), ICSSG_FDB_IOCTL_SET_PORT_STATE = ICSSG_FDB_PUBLIC_IOCTL(5U), ICSSG_FDB_IOCTL_ADD_ENTRY = ICSSG_FDB_PUBLIC_IOCTL(6U), ICSSG_FDB_IOCTL_REMOVE_ENTRY = ICSSG_FDB_PUBLIC_IOCTL(7U),
  ICSSG_FDB_IOCTL_REMOVE_ALL_ENTRIES = ICSSG_FDB_PUBLIC_IOCTL(8U), ICSSG_FDB_IOCTL_REMOVE_AGEABLE_ENTRIES = ICSSG_FDB_PUBLIC_IOCTL(9U), ICSSG_FDB_IOCTL_ADD_INTERFACE_MACADDR = ICSSG_FDB_PUBLIC_IOCTL(10U), ICSSG_FDB_IOCTL_SPECIAL_FRAME_PRIO_CFG = ICSSG_FDB_PUBLIC_IOCTL(11U),
  ICSSG_FDB_IOCTL_PREEMPT_TX_ENABLE = ICSSG_FDB_PUBLIC_IOCTL(12U), ICSSG_FDB_IOCTL_PREEMPT_TX_DISABLE = ICSSG_FDB_PUBLIC_IOCTL(13U), ICSSG_FDB_IOCTL_GET_TX_ENABLE_STATUS = ICSSG_FDB_PUBLIC_IOCTL(14U), ICSSG_FDB_IOCTL_GET_TX_ACTIVE_STATUS = ICSSG_FDB_PUBLIC_IOCTL(15U),
  ICSSG_FDB_IOCTL_PREEMPT_VERIFY_ENABLE = ICSSG_FDB_PUBLIC_IOCTL(16U), ICSSG_FDB_IOCTL_PREEMPT_VERIFY_DISABLE = ICSSG_FDB_PUBLIC_IOCTL(17U), ICSSG_FDB_IOCTL_PREEMPT_GET_VERIFY_STATE = ICSSG_FDB_PUBLIC_IOCTL(18U), ICSSG_FDB_IOCTL_PREEMPT_GET_MIN_FRAG_SIZE_LOCAL = ICSSG_FDB_PUBLIC_IOCTL(19U),
  ICSSG_FDB_IOCTL_PREEMPT_SET_MIN_FRAG_SIZE_REMOTE = ICSSG_FDB_PUBLIC_IOCTL(20U)
}
 ICSSG FDB IOCTL commands. More...
 
enum  IcssgFdb_QueuePreemptMode_e { ICSSG_FDB_QUEUE_PREEMPT_MODE_PREEMPT, ICSSG_FDB_QUEUE_PREEMPT_MODE_EXPRESS }
 Queue preemptive mode: express or preemptive. More...
 
enum  IcssgFdb_QueueForwardMode_e { ICSSG_FDB_QUEUE_FORWARD_MODE_CUTTHROUGH, ICSSG_FDB_QUEUE_FORWARD_MODE_STOREANDFWD }
 Queue forward mode: cut-through or store-and-forward. More...
 
enum  IcssgFdb_PortState_e {
  ICSSG_FDB_PORT_STATE_DISABLED, ICSSG_FDB_PORT_STATE_BLOCKING, ICSSG_FDB_PORT_STATE_FORWARD, ICSSG_FDB_PORT_STATE_FORWARD_WO_LEARNING,
  ICSSG_FDB_PORT_STATE_TAS_TRIGGER, ICSSG_FDB_PORT_STATE_TAS_ENABLE, ICSSG_FDB_PORT_STATE_TAS_RESET, ICSSG_FDB_PORT_STATE_TAS_DISABLE
}
 Port states. More...
 
enum  IcssgFdb_AcceptFrameCheck_e { ICSSG_FDB_ACCEPT_ONLY_VLAN_TAGGED, ICSSG_FDB_ACCEPT_ONLY_UNTAGGED_PRIO_TAGGED, ICSSG_FDB_ACCEPT_ALL }
 Acceptable frame check criteria. More...
 
enum  IcssgFdb_PreemptVerifyState_e {
  ICSSG_FDB_VERIFYSTATE_UNKNOWN = 0U, ICSSG_FDB_VERIFYSTATE_INITIAL, ICSSG_FDB_VERIFYSTATE_VERIFYING, ICSSG_FDB_VERIFYSTATE_SUCCEEDED,
  ICSSG_FDB_VERIFYSTATE_FAILED, ICSSG_FDB_VERIFYSTATE_DISABLED
}
 Preemption Verify State Machine states. More...
 

Functions

void IcssgFdb_initCfg (EnetMod_Handle hMod, Enet_Type enetType, void *cfg)
 Initialize FDB module's configuration parameters. More...
 
int32_t IcssgFdb_open (EnetMod_Handle hMod, Enet_Type enetType, const void *cfg)
 Open and initialize the FDB module. More...
 
int32_t IcssgFdb_rejoin (EnetMod_Handle hMod, Enet_Type enetType)
 Rejoin the FDB module. More...
 
int32_t IcssgFdb_ioctl (EnetMod_Handle hMod, uint32_t cmd, Enet_IoctlPrms *prms)
 Issue an operation on the FDB module. More...
 
void IcssgFdb_close (EnetMod_Handle hMod)
 Close the FDB module. More...
 

Detailed Description

This file contains the type definitions and helper macros for the ICSSG Forwarding Database (FDB) module interface.


Copyright 2020, Texas Instruments Incorporated