![]() |
![]() |
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). | |
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. | |
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... | |
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... | |
#define ICSSG_FDB_ENTRY_AGEABLE (ENET_BIT(3U)) |
Ageable bit.
Ageable bit is set for learned entries and cleared for static entries.
#define ICSSG_FDB_ENTRY_BLOCK (ENET_BIT(4U)) |
Block bit.
If set for SA then packet is dropped (can be used to implement a blacklist). If set for DA then packet is determined to be a special packet.
#define ICSSG_FDB_ENTRY_P0_MEMBERSHIP (ENET_BIT(0U)) |
Host port membership.
Indicates host port membership.
#define ICSSG_FDB_ENTRY_P1_MEMBERSHIP (ENET_BIT(1U)) |
Physical port 1 membership.
Indicates that MAC ID is connected to physical port 1.
#define ICSSG_FDB_ENTRY_P2_MEMBERSHIP (ENET_BIT(2U)) |
Physical port 2 membership.
Indicates that MAC ID is connected to physical port 2.
#define ICSSG_FDB_ENTRY_SECURE (ENET_BIT(5U)) |
Secure bit.
If set for DA then the SA from the packet is not learned.
#define ICSSG_FDB_ENTRY_TOUCHED (ENET_BIT(6U)) |
Touched bit.
If set, it means packet has been seen recently with source address + FID matching MAC address/FID of entry.
#define ICSSG_FDB_ENTRY_VALID (ENET_BIT(7U)) |
Valid bit.
Set if entry is valid.
#define ICSSG_FDB_PUBLIC_IOCTL | ( | x | ) |
Helper macro to create IOCTL commands for ICSSG FDB module.
enum IcssgFdb_Ioctl_e |
ICSSG FDB IOCTL commands.
Enumerator | |
---|---|
ICSSG_FDB_IOCTL_ENABLE_PROMISCUOUS_MODE |
Enable promiscuous mode. IOCTL params:
Type: Synchronous. |
ICSSG_FDB_IOCTL_DISABLE_PROMISCUOUS_MODE |
Disable promiscuous mode. IOCTL params:
Type: Synchronous. |
ICSSG_FDB_IOCTL_VLAN_RESET_TABLE |
Populate VLAN table with default VLAN entry configuration. IOCTL params:
Type: Synchronous. |
ICSSG_FDB_IOCTL_VLAN_SET_ENTRY |
Update a VLAN table entry. IOCTL params:
Type: Synchronous. |
ICSSG_FDB_IOCTL_VLAN_GET_ENTRY |
Get VLAN entry for VLAN table for requested VLAN id. IOCTL params:
Type: Synchronous. |
ICSSG_FDB_IOCTL_SET_PORT_STATE |
Set port state. Sets the port state in one of the following states (refer to IcssgFdb_PortState):
IOCTL params:
Type: Asynchronous. |
ICSSG_FDB_IOCTL_ADD_ENTRY |
Add FDB entry. IOCTL params:
Type: Asynchronous. |
ICSSG_FDB_IOCTL_REMOVE_ENTRY |
Delete FDB entry. IOCTL params:
Type: Asynchronous. |
ICSSG_FDB_IOCTL_REMOVE_ALL_ENTRIES |
Delete all FDB entries. IOCTL params:
Type: Asynchronous |
ICSSG_FDB_IOCTL_REMOVE_AGEABLE_ENTRIES |
Remote all ageable entries. IOCTL params:
Type: Asynchronous. |
ICSSG_FDB_IOCTL_ADD_INTERFACE_MACADDR |
Add MAC address of the interface. IOCTL params:
Type: Synchronous. |
ICSSG_FDB_IOCTL_SPECIAL_FRAME_PRIO_CFG |
Set queue (0-7) to use for special frames. IOCTL params:
Type: Synchronous. |
ICSSG_FDB_IOCTL_PREEMPT_TX_ENABLE |
Enable preemption on TX. IOCTL params:
Type: Asynchronous. |
ICSSG_FDB_IOCTL_PREEMPT_TX_DISABLE |
Disable preemption on TX. IOCTL params:
Type: Asynchronous. |
ICSSG_FDB_IOCTL_GET_TX_ENABLE_STATUS |
Get status of preemption on TX. IOCTL params:
Type: Synchronous. |
ICSSG_FDB_IOCTL_GET_TX_ACTIVE_STATUS |
Get status of whether preemption is active or not. IOCTL params:
Type: Synchronous. |
ICSSG_FDB_IOCTL_PREEMPT_VERIFY_ENABLE |
Enable verify state machine. IOCTL params:
Type: Synchronous. |
ICSSG_FDB_IOCTL_PREEMPT_VERIFY_DISABLE |
Disable verify state machine. IOCTL params:
Type: Synchronous. |
ICSSG_FDB_IOCTL_PREEMPT_GET_VERIFY_STATE |
Get current state of the verify state machine. IOCTL params:
Type: Synchronous. |
ICSSG_FDB_IOCTL_PREEMPT_GET_MIN_FRAG_SIZE_LOCAL |
Get minimum fragment size supported by firmware. IOCTL params:
Type: Synchronous. |
ICSSG_FDB_IOCTL_PREEMPT_SET_MIN_FRAG_SIZE_REMOTE |
Add minimum fragment size. IOCTL params:
Type: Synchronous. |
enum IcssgFdb_PortState_e |
Port states.
Preemption Verify State Machine states.
void IcssgFdb_close | ( | EnetMod_Handle | hMod | ) |
Close the FDB module.
Closes the ICSSG FDB module.
hMod | Enet Module handle |
void IcssgFdb_initCfg | ( | EnetMod_Handle | hMod, |
Enet_Type | enetType, | ||
void * | cfg | ||
) |
Initialize FDB module's configuration parameters.
Initializes the configuration parameter of the ICSSG FDB module.
hMod | Enet Module handle |
enetType | Enet Peripheral type |
cfg | Configuration parameters to be initialized |
int32_t IcssgFdb_ioctl | ( | EnetMod_Handle | hMod, |
uint32_t | cmd, | ||
Enet_IoctlPrms * | prms | ||
) |
Issue an operation on the FDB module.
Issues a control operation on the ICSSG FDB module. Refer to IcssgFdb_Ioctl for the list of ICSSG FDB specific IOCTL commands.
hMod | Enet Module handle |
cmd | IOCTL command Id |
prms | IOCTL parameters |
int32_t IcssgFdb_open | ( | EnetMod_Handle | hMod, |
Enet_Type | enetType, | ||
const void * | cfg | ||
) |
Open and initialize the FDB module.
Opens and initializes the ICSSG FDB module with the configuration parameters provided by the caller.
hMod | Enet Module handle |
enetType | Enet Peripheral type |
cfg | Configuration parameters |
int32_t IcssgFdb_rejoin | ( | EnetMod_Handle | hMod, |
Enet_Type | enetType | ||
) |
Rejoin the FDB module.
Reopens the ICSSG FDB module, but doesn't perform any hardware initialization. This function is expected to be called to attach to a running module.
hMod | Enet Module handle |
enetType | Enet Peripheral type |