AM261x MCU+ SDK: APIs for ICSS-EMAC

| AM261x MCU+ SDK 26.00.00 |

Data Structures | Functions | Typedefs | Macros
APIs for ICSS-EMAC
APIs for Networking modules

## Introduction

ICSS-EMAC (Industrial Communications Sub-system Ethernet Media Access Controller) APIs to transmit and receive packets with a firmware based Ethernet switch that has been implemented on PRUICSS.

## Data Structures
struct | ICSS_EMAC_FwStaticMmap
| ICSS EMAC Static Firmware Memory Map offsets. These are offsets for PRU0 and PRU1 DRAM memory. More...
struct | ICSS_EMAC_FwDynamicMmap
| ICSS EMAC Dynamic Firmware Memory Map offsets. More...
struct | ICSS_EMAC_FwVlanFilterParams
| ICSS EMAC VLAN Filtering Parameters. More...
struct | ICSS_EMAC_FwMulticastFilterParams
| ICSS EMAC Multicast Filtering Parameters. More...
struct | ICSS_EMAC_Attrs
struct | ICSS_EMAC_InternalObject
| Opaque ICSS EMAC driver object. More...
struct | ICSS_EMAC_Config
| Base EMAC handle containing pointers to all modules required for driver to work. More...
struct | ICSS_EMAC_CallBackConfig
| Generic callback configuration for protocol specific callbacks. ICSS_EMAC_CallBack is the function prototype used. While calling this, first argument is always of type ICSS_EMAC_Handle, second argument is specific to the callback (see ICSS_EMAC_CallBackObject), and third argument is userArg as specified in this structure. More...
struct | ICSS_EMAC_CallBackObject
| Different callbacks which can be registered. While calling the function set in ICSS_EMAC_CallBack, first argument is always of type ICSS_EMAC_Handle, second argument is specific to the callback (as mentioned in the member descriptions), and third argument is userArg as specified in ICSS_EMAC_CallBackConfig. More...
struct | ICSS_EMAC_Params
| ICSS_EMAC Parameters. More...
struct | ICSS_EMAC_RxArgument
| Rx packet processing information block that needs to passed into call to ICSS_EMAC_RxPktGet. More...
struct | ICSS_EMAC_TxArgument
| Tx packet processing information block that needs to passed into call to ICSS_EMAC_txPacket. More...
struct | ICSS_EMAC_IoctlCmd
| IOCTL command members for configuring switch/EMAC. More...
struct | ICSS_EMAC_PruStatistics
| Statistics structure for capturing statistics on PRU. More...

## Functions
void | ICSS_EMAC_init (void)
| This function initializes the ICSS_EMAC module. More...
void | ICSS_EMAC_deinit (void)
| This function de-initializes the ICSS_EMAC module. More...
void | ICSS_EMAC_Params_init (ICSS_EMAC_Params *params)
| Initialize the parmeters data structure with defaults. More...
ICSS_EMAC_Handle | ICSS_EMAC_open (uint32_t idx, const ICSS_EMAC_Params *params)
| API to initialize and configure ICSS in MAC/Switch Mode. More...
void | ICSS_EMAC_close (ICSS_EMAC_Handle icssEmacHandle)
| API to stop MAC/Switch Mode. More...
int32_t | ICSS_EMAC_ioctl (ICSS_EMAC_Handle icssEmacHandle, uint32_t ioctlCommand, uint8_t portNo, void *ioctlParams)
| IOCTL Function for ICSS EMAC. More...
int32_t | ICSS_EMAC_rxPktGet (ICSS_EMAC_RxArgument *rxArg, void *userArg)
| Retrieves a frame from a host queue and copies it in the allocated stack buffer. More...
int32_t | ICSS_EMAC_rxPktInfo (ICSS_EMAC_Handle icssEmacHandle, int32_t *portNumber, int32_t *queueNumber)
| API to retrieve the information about the received frame which is then used to dequeue the frame from the host queues. More...
int32_t | ICSS_EMAC_txPacket (const ICSS_EMAC_TxArgument *txArg, void *userArg)
| API to queue a frame which has to be transmitted on the specified port queue. More...

## Typedefs
typedef struct ICSS_EMAC_Config_s * | ICSS_EMAC_Handle
| Alias for ICSS EMAC Handle containing base addresses and modules. More...
typedef int32_t(* | ICSS_EMAC_CallBack) (void *arg0, void *arg1, void *arg2)
| Definition for a generic callback function used in ICSS-EMAC. While calling this, first argument is always of type ICSS_EMAC_Handle, second argument is specific to the callback (see ICSS_EMAC_CallBackObject), and third argument is userArg as specified in ICSS_EMAC_CallBackConfig. More...

## Macros
#define | ICSS_EMAC_MAX_PORTS_PER_INSTANCE (2)
| Maximum number of Ports in a single ICSS More...
#define | ICSS_EMAC_NUMQUEUES ((uint32_t)17U)
| Total Queues available. More...
#define | ICSS_EMAC_MAXMTU (1518U)
| Maximum Valid size (incl header + VLAN TAG..., no CRC) More...
#define | ICSS_EMAC_MINMTU (14U)
| Minimum Valid size ( DA + SA + Ethertype) More...
#define | ICSS_EMAC_PORT_0 (0)
| Used to specify host side port. More...
#define | ICSS_EMAC_PORT_1 (1U)
| Used to specify physical port 1 MII 0 (tx) More...
#define | ICSS_EMAC_PORT_2 (2U)
| Used to specify physical port 2 MII 1 (tx) More...
#define | ICSS_EMAC_IOCTL_PORT_CTRL_DISABLE (0u)
| ICSS_EMAC_IOCTL_PORT_CTRL options. More...
#define | ICSS_EMAC_IOCTL_PORT_CTRL_ENABLE (1u)
| Generic IOCTL Disable macro. More...
#define | ICSS_EMAC_LEARNING_PORT_STATE_LEARNING (0U)
| Macros for different port states in learning module. More...
#define | ICSS_EMAC_LEARNING_PORT_STATE_NOT_LEARNING (1U)
#define | ICSS_EMAC_LEARNING_PORT_STATE_LOCKED (2U)
#define | ICSS_EMAC_OBJECT_SIZE_IN_BYTES (42000)

## ICSS EMAC Modes
#define | ICSS_EMAC_MODE_MAC1 (1U)
| Single EMAC Mode. Port 1 Enabled. More...
#define | ICSS_EMAC_MODE_MAC2 (2U)
| Single EMAC Mode. Port 2 Enabled. More...
#define | ICSS_EMAC_MODE_SWITCH (3U)
| Switch Mode. More...
#define | ICSS_EMAC_MODE_DUALMAC (4U)
| Dual MAC Mode. Both Ports Enabled. More...

## ICSS EMAC PHY to MAC Interface Modes
#define | ICSS_EMAC_MII_MODE (0U)
| Media-independent Interface. More...
#define | ICSS_EMAC_RGMII_MODE (1U)
| Reduced Gigabit Media-independent Interface More...

## ICSS EMAC Learning Modes
#define | ICSS_EMAC_LEARNING_DISABLE (0U)
| Driver-based Learning Mode Disabled More...
#define | ICSS_EMAC_LEARNING_ENABLE (1U)
| Driver-based Learning Mode Enabled More...

## ICSS EMAC Interrupt Pacing Configuration
#define | ICSS_EMAC_ENABLE_PACING (0)
| Interrupt pacing enabled. More...
#define | ICSS_EMAC_DISABLE_PACING (1)
| Interrupt pacing disabled. More...

## ICSS EMAC Interrupt Pacing Modes
#define | ICSS_EMAC_INTR_PACING_MODE1 (0)
| Frame Count based Interrupt pacing. More...

## ICSS EMAC Queues
#define | ICSS_EMAC_QUEUE1 ((uint32_t)0U)
| Priority Queue 1. More...
#define | ICSS_EMAC_QUEUE2 ((uint32_t)1U)
| Priority Queue 2. More...
#define | ICSS_EMAC_QUEUE3 ((uint32_t)2U)
| Priority Queue 3. More...
#define | ICSS_EMAC_QUEUE4 ((uint32_t)3U)
| Priority Queue 4. More...
#define | ICSS_EMAC_QUEUE5 ((uint32_t)4U)
| Priority Queue 5. More...
#define | ICSS_EMAC_QUEUE6 ((uint32_t)5U)
| Priority Queue 6. More...
#define | ICSS_EMAC_QUEUE7 ((uint32_t)6U)
| Priority Queue 7. More...
#define | ICSS_EMAC_QUEUE8 ((uint32_t)7U)
| Priority Queue 8. More...
#define | ICSS_EMAC_QUEUE9 ((uint32_t)8U)
| Priority Queue 9. More...
#define | ICSS_EMAC_QUEUE10 ((uint32_t)9U)
| Priority Queue 10. More...
#define | ICSS_EMAC_QUEUE11 ((uint32_t)10U)
| Priority Queue 11. More...
#define | ICSS_EMAC_QUEUE12 ((uint32_t)11U)
| Priority Queue 12. More...
#define | ICSS_EMAC_QUEUE13 ((uint32_t)12U)
| Priority Queue 13. More...
#define | ICSS_EMAC_QUEUE14 ((uint32_t)13U)
| Priority Queue 14. More...
#define | ICSS_EMAC_QUEUE15 ((uint32_t)14U)
| Priority Queue 15. More...
#define | ICSS_EMAC_QUEUE16 ((uint32_t)15U)
| Priority Queue 16. More...
#define | ICSS_EMAC_COLQUEUE ((uint32_t)16U)
| Collision Queue. More...

## ICSS EMAC Error Codes
#define | ICSS_EMAC_SWITCH_ERROR_BASE ((uint32_t)0x21Fu)
| Switch Error Base. More...
#define | ICSS_EMAC_SWITCH_ERROR_CODE (ICSS_EMAC_SWITCH_ERROR_BASE)
| Switch Error Code. More...
#define | ICSS_EMAC_SWITCH_ERROR_INFO (ICSS_EMAC_SWITCH_ERROR_CODE)
| Switch Error/Informational. More...
#define | ICSS_EMAC_SWITCH_ERROR_WARNING (ICSS_EMAC_SWITCH_ERROR_CODE | 0x1000u)
| Switch Error/Warning. More...
#define | ICSS_EMAC_SWITCH_ERROR_MINOR (ICSS_EMAC_SWITCH_ERROR_CODE | 0x2000u)
| Switch Error Minor. More...
#define | ICSS_EMAC_SWITCH_ERROR_MAJOR (ICSS_EMAC_SWITCH_ERROR_CODE | 0x3000u)
| Switch Error Major. More...
#define | ICSS_EMAC_SWITCH_ERROR_CRITICAL (ICSS_EMAC_SWITCH_ERROR_CODE | 0x4000u)
| Switch Error Critical. More...
#define | ICSS_EMAC_SWITCH_SUCCESS (0u)
| Success code. More...
#define | ICSS_EMAC_PORT1_TX_ERROR_MASK (0xFFFFu)
#define | ICSS_EMAC_PORT2_TX_ERROR_MASK (0xFFFF0000u)
#define | ICSS_EMAC_ERR_DEV_NOT_INSTANTIATED (ICSS_EMAC_SWITCH_ERROR_MAJOR + 1u)
| Device is not instantiated yet. More...
#define | ICSS_EMAC_ERR_SWITCH_INVALID_PARAM (ICSS_EMAC_SWITCH_ERROR_MAJOR + 2u)
| Function or calling parameter is invalid. More...
#define | ICSS_EMAC_ERR_CH_INVALID (ICSS_EMAC_SWITCH_ERROR_CRITICAL + 3u)
| Channel number invalid. More...
#define | ICSS_EMAC_ERR_CH_ALREADY_INIT (ICSS_EMAC_SWITCH_ERROR_MAJOR + 4u)
| Channel already initialized and setup. More...
#define | ICSS_EMAC_ERR_TX_CH_ALREADY_CLOSED (ICSS_EMAC_SWITCH_ERROR_MAJOR + 5u)
| Tx Channel already closed. Channel close failed. More...
#define | ICSS_EMAC_ERR_TX_CH_NOT_OPEN (ICSS_EMAC_SWITCH_ERROR_MAJOR + 6u)
| Tx Channel not open. More...
#define | ICSS_EMAC_ERR_TX_NO_LINK (ICSS_EMAC_SWITCH_ERROR_MAJOR + 7u)
| Tx Link not up. More...
#define | ICSS_EMAC_ERR_TX_OUT_OF_BD (ICSS_EMAC_SWITCH_ERROR_MAJOR + 8u)
| Tx ran out of Buffer descriptors to use. More...
#define | ICSS_EMAC_ERR_RX_CH_INVALID (ICSS_EMAC_SWITCH_ERROR_CRITICAL + 9u)
| Rx Channel invalid number. More...
#define | ICSS_EMAC_ERR_RX_CH_ALREADY_INIT (ICSS_EMAC_SWITCH_ERROR_MAJOR + 10u)
| Rx Channel already setup. More...
#define | ICSS_EMAC_ERR_RX_CH_ALREADY_CLOSED (ICSS_EMAC_SWITCH_ERROR_MAJOR + 11u)
| Rx Channel already closed. Channel close failed. More...
#define | ICSS_EMAC_ERR_RX_CH_NOT_OPEN (ICSS_EMAC_SWITCH_ERROR_MAJOR + 12u)
| Rx Channel not open yet. More...
#define | ICSS_EMAC_ERR_DEV_ALREADY_CREATED (ICSS_EMAC_SWITCH_ERROR_MAJOR + 13u)
| EMAC device already created. More...
#define | ICSS_EMAC_ERR_DEV_NOT_OPEN (ICSS_EMAC_SWITCH_ERROR_MAJOR + 14u)
| Device is not open or not ready. More...
#define | ICSS_EMAC_ERR_DEV_ALREADY_CLOSED (ICSS_EMAC_SWITCH_ERROR_MAJOR + 15u)
| Device close failed. Device already closed. More...
#define | ICSS_EMAC_ERR_DEV_ALREADY_OPEN (ICSS_EMAC_SWITCH_ERROR_MAJOR + 16u)
| Device open failed. Device already open. More...
#define | ICSS_EMAC_ERR_RX_BUFFER_ALLOC_FAIL (ICSS_EMAC_SWITCH_ERROR_CRITICAL + 17u)
| Rx Buffer Descriptor allocation failed. More...
#define | ICSS_EMAC_SWITCH_INTERNAL_FAILURE (ICSS_EMAC_SWITCH_ERROR_MAJOR + 18u)
| EMAC Internal failure. More...
#define | ICSS_EMAC_SWITCH_VLAN_UNAWARE_MODE (ICSS_EMAC_SWITCH_ERROR_MAJOR + 19u)
| VLAN support not enabled in EMAC. More...
#define | ICSS_EMAC_SWITCH_ALE_TABLE_FULL (ICSS_EMAC_SWITCH_ERROR_MAJOR + 20u)
| ALE Table full. More...
#define | ICSS_EMAC_SWITCH_ADDR_NOTFOUND (ICSS_EMAC_SWITCH_ERROR_MAJOR + 21u)
| Multicast/Unicast/OUI Address not found in ALE. More...
#define | ICSS_EMAC_SWITCH_INVALID_VLANID (ICSS_EMAC_SWITCH_ERROR_MAJOR + 22u)
| Invalid VLAN Id. More...
#define | ICSS_EMAC_SWITCH_INVALID_PORT (ICSS_EMAC_SWITCH_ERROR_MAJOR + 23u)
| Invalid Port Specified. More...
#define | ICSS_EMAC_SWITCH_BD_ALLOC_FAIL (ICSS_EMAC_SWITCH_ERROR_MAJOR + 24u)
| Buffer Descriptor Allocation failure. OOM. More...
#define | ICSS_EMAC_ERR_BADPACKET (ICSS_EMAC_SWITCH_ERROR_MAJOR + 25u)
| Supplied packet was invalid. More...
#define | ICSS_EMAC_ERR_COLLISION_FAIL (ICSS_EMAC_SWITCH_ERROR_MAJOR + 26u)
| Collision queue was full. More...
#define | ICSS_EMAC_ERR_MACFATAL (ICSS_EMAC_SWITCH_ERROR_CRITICAL + 26u)
| Fatal Error - ICSS_EMAC_close required. More...

## ICSS-EMAC Storm Prevention IOCTL Command Options
#define | ICSS_EMAC_STORM_PREV_CTRL_ENABLE (0u)
| IOCTL Storm Control Enable command. More...
#define | ICSS_EMAC_STORM_PREV_CTRL_DISABLE (1u)
| IOCTL Storm Control Disable command. More...
#define | ICSS_EMAC_STORM_PREV_CTRL_SET_CREDITS (2u)
| IOCTL Storm Control set credit command. More...
#define | ICSS_EMAC_STORM_PREV_CTRL_INIT (3u)
| IOCTL Storm Control initialize command. More...
#define | ICSS_EMAC_STORM_PREV_CTRL_RESET (4u)
| IOCTL Storm Control reset command. More...
#define | ICSS_EMAC_STORM_PREV_CTRL_ENABLE_BC (5u)
| IOCTL Storm Control Enable command for BC traffic. More...
#define | ICSS_EMAC_STORM_PREV_CTRL_DISABLE_BC (6u)
| IOCTL Storm Control Disable command for BC traffic. More...
#define | ICSS_EMAC_STORM_PREV_CTRL_SET_CREDITS_BC (7u)
| IOCTL Storm Control set credit command for BC traffic. More...
#define | ICSS_EMAC_STORM_PREV_CTRL_INIT_BC (8u)
| IOCTL Storm Control initialize command for BC traffic. More...
#define | ICSS_EMAC_STORM_PREV_CTRL_RESET_BC (9u)
| IOCTL Storm Control reset command for BC traffic. More...
#define | ICSS_EMAC_STORM_PREV_CTRL_ENABLE_MC (10u)
| IOCTL Storm Control Enable command for MC traffic. More...
#define | ICSS_EMAC_STORM_PREV_CTRL_DISABLE_MC (11u)
| IOCTL Storm Control Disable command for MC traffic. More...
#define | ICSS_EMAC_STORM_PREV_CTRL_SET_CREDITS_MC (12u)
| IOCTL Storm Control set credit command for MC traffic. More...
#define | ICSS_EMAC_STORM_PREV_CTRL_INIT_MC (13u)
| IOCTL Storm Control initialize command for MC traffic. More...
#define | ICSS_EMAC_STORM_PREV_CTRL_RESET_MC (14u)
| IOCTL Storm Control reset command for MC traffic. More...
#define | ICSS_EMAC_STORM_PREV_CTRL_ENABLE_UC (15u)
| IOCTL Storm Control Enable command for UC traffic. More...
#define | ICSS_EMAC_STORM_PREV_CTRL_DISABLE_UC (16u)
| IOCTL Storm Control Disable command for UC traffic. More...
#define | ICSS_EMAC_STORM_PREV_CTRL_SET_CREDITS_UC (17u)
| IOCTL Storm Control set credit command for UC traffic. More...
#define | ICSS_EMAC_STORM_PREV_CTRL_INIT_UC (18u)
| IOCTL Storm Control initialize command for UC traffic. More...
#define | ICSS_EMAC_STORM_PREV_CTRL_RESET_UC (19u)
| IOCTL Storm Control reset command for UC traffic. More...

## ICSS-EMAC Learning Control IOCTL Command Options
#define | ICSS_EMAC_LEARN_CTRL_UPDATE_TABLE (0u)
| IOCTL Learning Table update command. More...
#define | ICSS_EMAC_LEARN_CTRL_CLR_TABLE (1u)
| IOCTL Learning Table clear table command. More...
#define | ICSS_EMAC_LEARN_CTRL_AGEING (2u)
| IOCTL Learning Table age out entry command. More...
#define | ICSS_EMAC_LEARN_CTRL_FIND_MAC (3u)
| IOCTL Learning Table find port from MAC ID command. More...
#define | ICSS_EMAC_LEARN_CTRL_REMOVE_MAC (4u)
| IOCTL Learning Table remove a MAC ID from table command. More...
#define | ICSS_EMAC_LEARN_CTRL_INC_COUNTER (5u)
| IOCTL Learning Table increment counters (for ageing) command. More...
#define | ICSS_EMAC_LEARN_CTRL_INIT_TABLE (6u)
| IOCTL Learning Table initialize command. More...
#define | ICSS_EMAC_LEARN_CTRL_SET_PORTSTATE (7u)
| IOCTL Learning Table set port state command. More...

## ICSS-EMAC Statistics IOCTL Command Options
#define | ICSS_EMAC_IOCTL_STAT_CTRL_GET (0u)
| IOCTL Statistics get from PRU command. More...
#define | ICSS_EMAC_IOCTL_STAT_CTRL_CLEAR (1u)
| IOCTL Statistics clear all counters command. More...

## ICSS-EMAC IOCTL Command for selecting a module
#define | ICSS_EMAC_IOCTL_PORT_CTRL (0u)
| IOCTL select port control APIs command. More...
#define | ICSS_EMAC_IOCTL_LEARNING_CTRL (1u)
| IOCTL select learning Table APIs command. More...
#define | ICSS_EMAC_IOCTL_STORM_PREV_CTRL (2u)
| IOCTL select Storm Prevention APIs command. More...
#define | ICSS_EMAC_IOCTL_STATS_CTRL (3u)
| IOCTL select Statistics APIs command. More...
#define | ICSS_EMAC_IOCTL_PROMISCUOUS_CTRL (4u)
| IOCTL select Promiscuous Mode APIs command. More...
#define | ICSS_EMAC_IOCTL_MULTICAST_FILTER_CTRL (5u)
| IOCTL select Multicast filtering APIs command. More...
#define | ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL (6u)
| IOCTL select Vlan filtering APIs command. More...
#define | ICSS_EMAC_IOCTL_PORT_FLUSH_CTRL (7u)
| IOCTL select Port flush APIs command. More...
#define | ICSS_EMAC_IOCTL_SPECIAL_UNICAST_MAC_CTRL (8u)
| IOCTL select Special Unicast MAC address APIs command. More...
#define | ICSS_EMAC_IOCTL_PORT_FWD_CTRL (9u)
| IOCTL select Port Forwarding APIs command. More...

## ICSS-EMAC Multicast Filtering IOCTL Command Options
#define | ICSS_EMAC_IOCTL_MULTICAST_FILTER_CTRL_ENABLE (0u)
| IOCTL Multicast filter Control Enable command. More...
#define | ICSS_EMAC_IOCTL_MULTICAST_FILTER_CTRL_DISABLE (1u)
| IOCTL Multicast filter Control Disable command. More...
#define | ICSS_EMAC_IOCTL_MULTICAST_FILTER_CTRL_OVERRIDE_HASHMASK (2u)
| IOCTL Multicast filter Control override hashmask command. More...
#define | ICSS_EMAC_IOCTL_MULTICAST_FILTER_CTRL_ADD_MACID (3u)
| IOCTL Multicast filter Control allow MC MAC ID command. More...
#define | ICSS_EMAC_IOCTL_MULTICAST_FILTER_CTRL_REMOVE_MACID (4u)
| IOCTL Multicast filter Control do not allow MC MAC ID command. More...
#define | ICSS_EMAC_IOCTL_MULTICAST_FILTER_CTRL_GET_DROPPED (5u)
| IOCTL Multicast filter Control do not allow MC MAC ID command. More...

## ICSS-EMAC VLAN Filtering IOCTL Command Options
#define | ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_ENABLE_CMD (0u)
| IOCTL Vlan filter Control Enable command. More...
#define | ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_DISABLE_CMD (1u)
| IOCTL Vlan filter Control Disable command. More...
#define | ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_UNTAG_HOST_RCV_ALL_CMD (2u)
| IOCTL Vlan filter allow Untagged frames Host Receive command. More...
#define | ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_UNTAG_HOST_RCV_NAL_CMD (3u)
| IOCTL Vlan filter do not allow Untagged frames Host Receive command. More...
#define | ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_PRIOTAG_HOST_RCV_ALL_CMD (4u)
| IOCTL Vlan filter allow Priority Tag frames Host Receive command. More...
#define | ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_PRIOTAG_HOST_RCV_NAL_CMD (5u)
| IOCTL Vlan filter do not allow Priority Tag frames Host Receive command. More...
#define | ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_ADD_VID_CMD (6u)
| IOCTL Vlan filter 4096 VIDs, 1 bit VIDs => 4096 bits = 512 bytes, ADD VLAN ID to allow packet to host More...
#define | ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_REMOVE_VID_CMD (7u)
| IOCTL Vlan filter 4096 VIDs, 1 bit VIDs => 4096 bits = 512 bytes, Remove VLAN ID to do not allow packet to host More...

## ICSS-EMAC Special Unicast MAC IOCTL Command Options
#define | ICSS_EMAC_IOCTL_SPECIAL_UNICAST_MAC_CTRL_DISABLE_CMD (0u)
| IOCTL Special Unicast MAC Disable command. More...
#define | ICSS_EMAC_IOCTL_SPECIAL_UNICAST_MAC_CTRL_ENABLE_CMD (1u)
| IOCTL Special Unicast MAC Enable command. More...

## ICSS-EMAC Port Forwarding IOCTL Command Options
#define | ICSS_EMAC_IOCTL_PORT_FWD_CTRL_ENABLE_CMD (0u)
| IOCTL Port Forwarding Enable command. More...
#define | ICSS_EMAC_IOCTL_PORT_FWD_CTRL_DISABLE_CMD (1u)
| IOCTL Port Forwarding Disable command. More...

## Macro Definition Documentation

## ◆ ICSS_EMAC_MAX_PORTS_PER_INSTANCE

#define ICSS_EMAC_MAX_PORTS_PER_INSTANCE (2)

Maximum number of Ports in a single ICSS

## ◆ ICSS_EMAC_MODE_MAC1

#define ICSS_EMAC_MODE_MAC1 (1U)

Single EMAC Mode. Port 1 Enabled.

## ◆ ICSS_EMAC_MODE_MAC2

#define ICSS_EMAC_MODE_MAC2 (2U)

Single EMAC Mode. Port 2 Enabled.

## ◆ ICSS_EMAC_MODE_SWITCH

#define ICSS_EMAC_MODE_SWITCH (3U)

Switch Mode.

## ◆ ICSS_EMAC_MODE_DUALMAC

#define ICSS_EMAC_MODE_DUALMAC (4U)

Dual MAC Mode. Both Ports Enabled.

## ◆ ICSS_EMAC_MII_MODE

#define ICSS_EMAC_MII_MODE (0U)

Media-independent Interface.

## ◆ ICSS_EMAC_RGMII_MODE

#define ICSS_EMAC_RGMII_MODE (1U)

Reduced Gigabit Media-independent Interface

## ◆ ICSS_EMAC_LEARNING_DISABLE

#define ICSS_EMAC_LEARNING_DISABLE (0U)

Driver-based Learning Mode Disabled

## ◆ ICSS_EMAC_LEARNING_ENABLE

#define ICSS_EMAC_LEARNING_ENABLE (1U)

Driver-based Learning Mode Enabled

## ◆ ICSS_EMAC_ENABLE_PACING

#define ICSS_EMAC_ENABLE_PACING (0)

Interrupt pacing enabled.

## ◆ ICSS_EMAC_DISABLE_PACING

#define ICSS_EMAC_DISABLE_PACING (1)

Interrupt pacing disabled.

## ◆ ICSS_EMAC_INTR_PACING_MODE1

#define ICSS_EMAC_INTR_PACING_MODE1 (0)

Frame Count based Interrupt pacing.

## ◆ ICSS_EMAC_QUEUE1

#define ICSS_EMAC_QUEUE1 ((uint32_t)0U)

Priority Queue 1.

## ◆ ICSS_EMAC_QUEUE2

#define ICSS_EMAC_QUEUE2 ((uint32_t)1U)

Priority Queue 2.

## ◆ ICSS_EMAC_QUEUE3

#define ICSS_EMAC_QUEUE3 ((uint32_t)2U)

Priority Queue 3.

## ◆ ICSS_EMAC_QUEUE4

#define ICSS_EMAC_QUEUE4 ((uint32_t)3U)

Priority Queue 4.

## ◆ ICSS_EMAC_QUEUE5

#define ICSS_EMAC_QUEUE5 ((uint32_t)4U)

Priority Queue 5.

## ◆ ICSS_EMAC_QUEUE6

#define ICSS_EMAC_QUEUE6 ((uint32_t)5U)

Priority Queue 6.

## ◆ ICSS_EMAC_QUEUE7

#define ICSS_EMAC_QUEUE7 ((uint32_t)6U)

Priority Queue 7.

## ◆ ICSS_EMAC_QUEUE8

#define ICSS_EMAC_QUEUE8 ((uint32_t)7U)

Priority Queue 8.

## ◆ ICSS_EMAC_QUEUE9

#define ICSS_EMAC_QUEUE9 ((uint32_t)8U)

Priority Queue 9.

## ◆ ICSS_EMAC_QUEUE10

#define ICSS_EMAC_QUEUE10 ((uint32_t)9U)

Priority Queue 10.

## ◆ ICSS_EMAC_QUEUE11

#define ICSS_EMAC_QUEUE11 ((uint32_t)10U)

Priority Queue 11.

## ◆ ICSS_EMAC_QUEUE12

#define ICSS_EMAC_QUEUE12 ((uint32_t)11U)

Priority Queue 12.

## ◆ ICSS_EMAC_QUEUE13

#define ICSS_EMAC_QUEUE13 ((uint32_t)12U)

Priority Queue 13.

## ◆ ICSS_EMAC_QUEUE14

#define ICSS_EMAC_QUEUE14 ((uint32_t)13U)

Priority Queue 14.

## ◆ ICSS_EMAC_QUEUE15

#define ICSS_EMAC_QUEUE15 ((uint32_t)14U)

Priority Queue 15.

## ◆ ICSS_EMAC_QUEUE16

#define ICSS_EMAC_QUEUE16 ((uint32_t)15U)

Priority Queue 16.

## ◆ ICSS_EMAC_COLQUEUE

#define ICSS_EMAC_COLQUEUE ((uint32_t)16U)

Collision Queue.

## ◆ ICSS_EMAC_NUMQUEUES

#define ICSS_EMAC_NUMQUEUES ((uint32_t)17U)

Total Queues available.

## ◆ ICSS_EMAC_SWITCH_ERROR_BASE

#define ICSS_EMAC_SWITCH_ERROR_BASE ((uint32_t)0x21Fu)

Switch Error Base.

## ◆ ICSS_EMAC_SWITCH_ERROR_CODE

#define ICSS_EMAC_SWITCH_ERROR_CODE (ICSS_EMAC_SWITCH_ERROR_BASE)

Switch Error Code.

## ◆ ICSS_EMAC_SWITCH_ERROR_INFO

#define ICSS_EMAC_SWITCH_ERROR_INFO (ICSS_EMAC_SWITCH_ERROR_CODE)

Switch Error/Informational.

## ◆ ICSS_EMAC_SWITCH_ERROR_WARNING

#define ICSS_EMAC_SWITCH_ERROR_WARNING (ICSS_EMAC_SWITCH_ERROR_CODE | 0x1000u)

Switch Error/Warning.

## ◆ ICSS_EMAC_SWITCH_ERROR_MINOR

#define ICSS_EMAC_SWITCH_ERROR_MINOR (ICSS_EMAC_SWITCH_ERROR_CODE | 0x2000u)

Switch Error Minor.

## ◆ ICSS_EMAC_SWITCH_ERROR_MAJOR

#define ICSS_EMAC_SWITCH_ERROR_MAJOR (ICSS_EMAC_SWITCH_ERROR_CODE | 0x3000u)

Switch Error Major.

## ◆ ICSS_EMAC_SWITCH_ERROR_CRITICAL

#define ICSS_EMAC_SWITCH_ERROR_CRITICAL (ICSS_EMAC_SWITCH_ERROR_CODE | 0x4000u)

Switch Error Critical.

## ◆ ICSS_EMAC_SWITCH_SUCCESS

#define ICSS_EMAC_SWITCH_SUCCESS (0u)

Success code.

## ◆ ICSS_EMAC_PORT1_TX_ERROR_MASK

#define ICSS_EMAC_PORT1_TX_ERROR_MASK (0xFFFFu)

## ◆ ICSS_EMAC_PORT2_TX_ERROR_MASK

#define ICSS_EMAC_PORT2_TX_ERROR_MASK (0xFFFF0000u)

## ◆ ICSS_EMAC_ERR_DEV_NOT_INSTANTIATED

#define ICSS_EMAC_ERR_DEV_NOT_INSTANTIATED (ICSS_EMAC_SWITCH_ERROR_MAJOR + 1u)

Device is not instantiated yet.

Error codes

## ◆ ICSS_EMAC_ERR_SWITCH_INVALID_PARAM

#define ICSS_EMAC_ERR_SWITCH_INVALID_PARAM (ICSS_EMAC_SWITCH_ERROR_MAJOR + 2u)

Function or calling parameter is invalid.

## ◆ ICSS_EMAC_ERR_CH_INVALID

#define ICSS_EMAC_ERR_CH_INVALID (ICSS_EMAC_SWITCH_ERROR_CRITICAL + 3u)

Channel number invalid.

## ◆ ICSS_EMAC_ERR_CH_ALREADY_INIT

#define ICSS_EMAC_ERR_CH_ALREADY_INIT (ICSS_EMAC_SWITCH_ERROR_MAJOR + 4u)

Channel already initialized and setup.

## ◆ ICSS_EMAC_ERR_TX_CH_ALREADY_CLOSED

#define ICSS_EMAC_ERR_TX_CH_ALREADY_CLOSED (ICSS_EMAC_SWITCH_ERROR_MAJOR + 5u)

Tx Channel already closed. Channel close failed.

## ◆ ICSS_EMAC_ERR_TX_CH_NOT_OPEN

#define ICSS_EMAC_ERR_TX_CH_NOT_OPEN (ICSS_EMAC_SWITCH_ERROR_MAJOR + 6u)

Tx Channel not open.

## ◆ ICSS_EMAC_ERR_TX_NO_LINK

#define ICSS_EMAC_ERR_TX_NO_LINK (ICSS_EMAC_SWITCH_ERROR_MAJOR + 7u)

Tx Link not up.

## ◆ ICSS_EMAC_ERR_TX_OUT_OF_BD

#define ICSS_EMAC_ERR_TX_OUT_OF_BD (ICSS_EMAC_SWITCH_ERROR_MAJOR + 8u)

Tx ran out of Buffer descriptors to use.

## ◆ ICSS_EMAC_ERR_RX_CH_INVALID

#define ICSS_EMAC_ERR_RX_CH_INVALID (ICSS_EMAC_SWITCH_ERROR_CRITICAL + 9u)

Rx Channel invalid number.

## ◆ ICSS_EMAC_ERR_RX_CH_ALREADY_INIT

#define ICSS_EMAC_ERR_RX_CH_ALREADY_INIT (ICSS_EMAC_SWITCH_ERROR_MAJOR + 10u)

Rx Channel already setup.

## ◆ ICSS_EMAC_ERR_RX_CH_ALREADY_CLOSED

#define ICSS_EMAC_ERR_RX_CH_ALREADY_CLOSED (ICSS_EMAC_SWITCH_ERROR_MAJOR + 11u)

Rx Channel already closed. Channel close failed.

## ◆ ICSS_EMAC_ERR_RX_CH_NOT_OPEN

#define ICSS_EMAC_ERR_RX_CH_NOT_OPEN (ICSS_EMAC_SWITCH_ERROR_MAJOR + 12u)

Rx Channel not open yet.

## ◆ ICSS_EMAC_ERR_DEV_ALREADY_CREATED

#define ICSS_EMAC_ERR_DEV_ALREADY_CREATED (ICSS_EMAC_SWITCH_ERROR_MAJOR + 13u)

EMAC device already created.

## ◆ ICSS_EMAC_ERR_DEV_NOT_OPEN

#define ICSS_EMAC_ERR_DEV_NOT_OPEN (ICSS_EMAC_SWITCH_ERROR_MAJOR + 14u)

Device is not open or not ready.

## ◆ ICSS_EMAC_ERR_DEV_ALREADY_CLOSED

#define ICSS_EMAC_ERR_DEV_ALREADY_CLOSED (ICSS_EMAC_SWITCH_ERROR_MAJOR + 15u)

Device close failed. Device already closed.

## ◆ ICSS_EMAC_ERR_DEV_ALREADY_OPEN

#define ICSS_EMAC_ERR_DEV_ALREADY_OPEN (ICSS_EMAC_SWITCH_ERROR_MAJOR + 16u)

Device open failed. Device already open.

## ◆ ICSS_EMAC_ERR_RX_BUFFER_ALLOC_FAIL

#define ICSS_EMAC_ERR_RX_BUFFER_ALLOC_FAIL (ICSS_EMAC_SWITCH_ERROR_CRITICAL + 17u)

Rx Buffer Descriptor allocation failed.

## ◆ ICSS_EMAC_SWITCH_INTERNAL_FAILURE

#define ICSS_EMAC_SWITCH_INTERNAL_FAILURE (ICSS_EMAC_SWITCH_ERROR_MAJOR + 18u)

EMAC Internal failure.

## ◆ ICSS_EMAC_SWITCH_VLAN_UNAWARE_MODE

#define ICSS_EMAC_SWITCH_VLAN_UNAWARE_MODE (ICSS_EMAC_SWITCH_ERROR_MAJOR + 19u)

VLAN support not enabled in EMAC.

## ◆ ICSS_EMAC_SWITCH_ALE_TABLE_FULL

#define ICSS_EMAC_SWITCH_ALE_TABLE_FULL (ICSS_EMAC_SWITCH_ERROR_MAJOR + 20u)

ALE Table full.

## ◆ ICSS_EMAC_SWITCH_ADDR_NOTFOUND

#define ICSS_EMAC_SWITCH_ADDR_NOTFOUND (ICSS_EMAC_SWITCH_ERROR_MAJOR + 21u)

Multicast/Unicast/OUI Address not found in ALE.

## ◆ ICSS_EMAC_SWITCH_INVALID_VLANID

#define ICSS_EMAC_SWITCH_INVALID_VLANID (ICSS_EMAC_SWITCH_ERROR_MAJOR + 22u)

Invalid VLAN Id.

## ◆ ICSS_EMAC_SWITCH_INVALID_PORT

#define ICSS_EMAC_SWITCH_INVALID_PORT (ICSS_EMAC_SWITCH_ERROR_MAJOR + 23u)

Invalid Port Specified.

## ◆ ICSS_EMAC_SWITCH_BD_ALLOC_FAIL

#define ICSS_EMAC_SWITCH_BD_ALLOC_FAIL (ICSS_EMAC_SWITCH_ERROR_MAJOR + 24u)

Buffer Descriptor Allocation failure. OOM.

## ◆ ICSS_EMAC_ERR_BADPACKET

#define ICSS_EMAC_ERR_BADPACKET (ICSS_EMAC_SWITCH_ERROR_MAJOR + 25u)

Supplied packet was invalid.

## ◆ ICSS_EMAC_ERR_COLLISION_FAIL

#define ICSS_EMAC_ERR_COLLISION_FAIL (ICSS_EMAC_SWITCH_ERROR_MAJOR + 26u)

Collision queue was full.

## ◆ ICSS_EMAC_ERR_MACFATAL

#define ICSS_EMAC_ERR_MACFATAL (ICSS_EMAC_SWITCH_ERROR_CRITICAL + 26u)

Fatal Error - ICSS_EMAC_close required.

## ◆ ICSS_EMAC_MAXMTU

#define ICSS_EMAC_MAXMTU (1518U)

Maximum Valid size (incl header + VLAN TAG..., no CRC)

## ◆ ICSS_EMAC_MINMTU

#define ICSS_EMAC_MINMTU (14U)

Minimum Valid size ( DA + SA + Ethertype)

## ◆ ICSS_EMAC_PORT_0

#define ICSS_EMAC_PORT_0 (0)

Used to specify host side port.

## ◆ ICSS_EMAC_PORT_1

#define ICSS_EMAC_PORT_1 (1U)

Used to specify physical port 1 MII 0 (tx)

## ◆ ICSS_EMAC_PORT_2

#define ICSS_EMAC_PORT_2 (2U)

Used to specify physical port 2 MII 1 (tx)

## ◆ ICSS_EMAC_IOCTL_PORT_CTRL_DISABLE

#define ICSS_EMAC_IOCTL_PORT_CTRL_DISABLE (0u)

ICSS_EMAC_IOCTL_PORT_CTRL options.

Generic IOCTL Enable macro

## ◆ ICSS_EMAC_IOCTL_PORT_CTRL_ENABLE

#define ICSS_EMAC_IOCTL_PORT_CTRL_ENABLE (1u)

Generic IOCTL Disable macro.

## ◆ ICSS_EMAC_STORM_PREV_CTRL_ENABLE

#define ICSS_EMAC_STORM_PREV_CTRL_ENABLE (0u)

IOCTL Storm Control Enable command.

## ◆ ICSS_EMAC_STORM_PREV_CTRL_DISABLE

#define ICSS_EMAC_STORM_PREV_CTRL_DISABLE (1u)

IOCTL Storm Control Disable command.

## ◆ ICSS_EMAC_STORM_PREV_CTRL_SET_CREDITS

#define ICSS_EMAC_STORM_PREV_CTRL_SET_CREDITS (2u)

IOCTL Storm Control set credit command.

## ◆ ICSS_EMAC_STORM_PREV_CTRL_INIT

#define ICSS_EMAC_STORM_PREV_CTRL_INIT (3u)

IOCTL Storm Control initialize command.

## ◆ ICSS_EMAC_STORM_PREV_CTRL_RESET

#define ICSS_EMAC_STORM_PREV_CTRL_RESET (4u)

IOCTL Storm Control reset command.

## ◆ ICSS_EMAC_STORM_PREV_CTRL_ENABLE_BC

#define ICSS_EMAC_STORM_PREV_CTRL_ENABLE_BC (5u)

IOCTL Storm Control Enable command for BC traffic.

## ◆ ICSS_EMAC_STORM_PREV_CTRL_DISABLE_BC

#define ICSS_EMAC_STORM_PREV_CTRL_DISABLE_BC (6u)

IOCTL Storm Control Disable command for BC traffic.

## ◆ ICSS_EMAC_STORM_PREV_CTRL_SET_CREDITS_BC

#define ICSS_EMAC_STORM_PREV_CTRL_SET_CREDITS_BC (7u)

IOCTL Storm Control set credit command for BC traffic.

## ◆ ICSS_EMAC_STORM_PREV_CTRL_INIT_BC

#define ICSS_EMAC_STORM_PREV_CTRL_INIT_BC (8u)

IOCTL Storm Control initialize command for BC traffic.

## ◆ ICSS_EMAC_STORM_PREV_CTRL_RESET_BC

#define ICSS_EMAC_STORM_PREV_CTRL_RESET_BC (9u)

IOCTL Storm Control reset command for BC traffic.

## ◆ ICSS_EMAC_STORM_PREV_CTRL_ENABLE_MC

#define ICSS_EMAC_STORM_PREV_CTRL_ENABLE_MC (10u)

IOCTL Storm Control Enable command for MC traffic.

## ◆ ICSS_EMAC_STORM_PREV_CTRL_DISABLE_MC

#define ICSS_EMAC_STORM_PREV_CTRL_DISABLE_MC (11u)

IOCTL Storm Control Disable command for MC traffic.

## ◆ ICSS_EMAC_STORM_PREV_CTRL_SET_CREDITS_MC

#define ICSS_EMAC_STORM_PREV_CTRL_SET_CREDITS_MC (12u)

IOCTL Storm Control set credit command for MC traffic.

## ◆ ICSS_EMAC_STORM_PREV_CTRL_INIT_MC

#define ICSS_EMAC_STORM_PREV_CTRL_INIT_MC (13u)

IOCTL Storm Control initialize command for MC traffic.

## ◆ ICSS_EMAC_STORM_PREV_CTRL_RESET_MC

#define ICSS_EMAC_STORM_PREV_CTRL_RESET_MC (14u)

IOCTL Storm Control reset command for MC traffic.

## ◆ ICSS_EMAC_STORM_PREV_CTRL_ENABLE_UC

#define ICSS_EMAC_STORM_PREV_CTRL_ENABLE_UC (15u)

IOCTL Storm Control Enable command for UC traffic.

## ◆ ICSS_EMAC_STORM_PREV_CTRL_DISABLE_UC

#define ICSS_EMAC_STORM_PREV_CTRL_DISABLE_UC (16u)

IOCTL Storm Control Disable command for UC traffic.

## ◆ ICSS_EMAC_STORM_PREV_CTRL_SET_CREDITS_UC

#define ICSS_EMAC_STORM_PREV_CTRL_SET_CREDITS_UC (17u)

IOCTL Storm Control set credit command for UC traffic.

## ◆ ICSS_EMAC_STORM_PREV_CTRL_INIT_UC

#define ICSS_EMAC_STORM_PREV_CTRL_INIT_UC (18u)

IOCTL Storm Control initialize command for UC traffic.

## ◆ ICSS_EMAC_STORM_PREV_CTRL_RESET_UC

#define ICSS_EMAC_STORM_PREV_CTRL_RESET_UC (19u)

IOCTL Storm Control reset command for UC traffic.

## ◆ ICSS_EMAC_LEARN_CTRL_UPDATE_TABLE

#define ICSS_EMAC_LEARN_CTRL_UPDATE_TABLE (0u)

IOCTL Learning Table update command.

## ◆ ICSS_EMAC_LEARN_CTRL_CLR_TABLE

#define ICSS_EMAC_LEARN_CTRL_CLR_TABLE (1u)

IOCTL Learning Table clear table command.

## ◆ ICSS_EMAC_LEARN_CTRL_AGEING

#define ICSS_EMAC_LEARN_CTRL_AGEING (2u)

IOCTL Learning Table age out entry command.

## ◆ ICSS_EMAC_LEARN_CTRL_FIND_MAC

#define ICSS_EMAC_LEARN_CTRL_FIND_MAC (3u)

IOCTL Learning Table find port from MAC ID command.

## ◆ ICSS_EMAC_LEARN_CTRL_REMOVE_MAC

#define ICSS_EMAC_LEARN_CTRL_REMOVE_MAC (4u)

IOCTL Learning Table remove a MAC ID from table command.

## ◆ ICSS_EMAC_LEARN_CTRL_INC_COUNTER

#define ICSS_EMAC_LEARN_CTRL_INC_COUNTER (5u)

IOCTL Learning Table increment counters (for ageing) command.

## ◆ ICSS_EMAC_LEARN_CTRL_INIT_TABLE

#define ICSS_EMAC_LEARN_CTRL_INIT_TABLE (6u)

IOCTL Learning Table initialize command.

## ◆ ICSS_EMAC_LEARN_CTRL_SET_PORTSTATE

#define ICSS_EMAC_LEARN_CTRL_SET_PORTSTATE (7u)

IOCTL Learning Table set port state command.

## ◆ ICSS_EMAC_IOCTL_STAT_CTRL_GET

#define ICSS_EMAC_IOCTL_STAT_CTRL_GET (0u)

IOCTL Statistics get from PRU command.

## ◆ ICSS_EMAC_IOCTL_STAT_CTRL_CLEAR

#define ICSS_EMAC_IOCTL_STAT_CTRL_CLEAR (1u)

IOCTL Statistics clear all counters command.

## ◆ ICSS_EMAC_IOCTL_PORT_CTRL

#define ICSS_EMAC_IOCTL_PORT_CTRL (0u)

IOCTL select port control APIs command.

## ◆ ICSS_EMAC_IOCTL_LEARNING_CTRL

#define ICSS_EMAC_IOCTL_LEARNING_CTRL (1u)

IOCTL select learning Table APIs command.

## ◆ ICSS_EMAC_IOCTL_STORM_PREV_CTRL

#define ICSS_EMAC_IOCTL_STORM_PREV_CTRL (2u)

IOCTL select Storm Prevention APIs command.

## ◆ ICSS_EMAC_IOCTL_STATS_CTRL

#define ICSS_EMAC_IOCTL_STATS_CTRL (3u)

IOCTL select Statistics APIs command.

## ◆ ICSS_EMAC_IOCTL_PROMISCUOUS_CTRL

#define ICSS_EMAC_IOCTL_PROMISCUOUS_CTRL (4u)

IOCTL select Promiscuous Mode APIs command.

## ◆ ICSS_EMAC_IOCTL_MULTICAST_FILTER_CTRL

#define ICSS_EMAC_IOCTL_MULTICAST_FILTER_CTRL (5u)

IOCTL select Multicast filtering APIs command.

## ◆ ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL

#define ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL (6u)

IOCTL select Vlan filtering APIs command.

## ◆ ICSS_EMAC_IOCTL_PORT_FLUSH_CTRL

#define ICSS_EMAC_IOCTL_PORT_FLUSH_CTRL (7u)

IOCTL select Port flush APIs command.

## ◆ ICSS_EMAC_IOCTL_SPECIAL_UNICAST_MAC_CTRL

#define ICSS_EMAC_IOCTL_SPECIAL_UNICAST_MAC_CTRL (8u)

IOCTL select Special Unicast MAC address APIs command.

## ◆ ICSS_EMAC_IOCTL_PORT_FWD_CTRL

#define ICSS_EMAC_IOCTL_PORT_FWD_CTRL (9u)

IOCTL select Port Forwarding APIs command.

## ◆ ICSS_EMAC_IOCTL_MULTICAST_FILTER_CTRL_ENABLE

#define ICSS_EMAC_IOCTL_MULTICAST_FILTER_CTRL_ENABLE (0u)

IOCTL Multicast filter Control Enable command.

## ◆ ICSS_EMAC_IOCTL_MULTICAST_FILTER_CTRL_DISABLE

#define ICSS_EMAC_IOCTL_MULTICAST_FILTER_CTRL_DISABLE (1u)

IOCTL Multicast filter Control Disable command.

## ◆ ICSS_EMAC_IOCTL_MULTICAST_FILTER_CTRL_OVERRIDE_HASHMASK

#define ICSS_EMAC_IOCTL_MULTICAST_FILTER_CTRL_OVERRIDE_HASHMASK (2u)

IOCTL Multicast filter Control override hashmask command.

## ◆ ICSS_EMAC_IOCTL_MULTICAST_FILTER_CTRL_ADD_MACID

#define ICSS_EMAC_IOCTL_MULTICAST_FILTER_CTRL_ADD_MACID (3u)

IOCTL Multicast filter Control allow MC MAC ID command.

## ◆ ICSS_EMAC_IOCTL_MULTICAST_FILTER_CTRL_REMOVE_MACID

#define ICSS_EMAC_IOCTL_MULTICAST_FILTER_CTRL_REMOVE_MACID (4u)

IOCTL Multicast filter Control do not allow MC MAC ID command.

## ◆ ICSS_EMAC_IOCTL_MULTICAST_FILTER_CTRL_GET_DROPPED

#define ICSS_EMAC_IOCTL_MULTICAST_FILTER_CTRL_GET_DROPPED (5u)

IOCTL Multicast filter Control do not allow MC MAC ID command.

## ◆ ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_ENABLE_CMD

#define ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_ENABLE_CMD (0u)

IOCTL Vlan filter Control Enable command.

## ◆ ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_DISABLE_CMD

#define ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_DISABLE_CMD (1u)

IOCTL Vlan filter Control Disable command.

## ◆ ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_UNTAG_HOST_RCV_ALL_CMD

#define ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_UNTAG_HOST_RCV_ALL_CMD (2u)

IOCTL Vlan filter allow Untagged frames Host Receive command.

## ◆ ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_UNTAG_HOST_RCV_NAL_CMD

#define ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_UNTAG_HOST_RCV_NAL_CMD (3u)

IOCTL Vlan filter do not allow Untagged frames Host Receive command.

## ◆ ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_PRIOTAG_HOST_RCV_ALL_CMD

#define ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_PRIOTAG_HOST_RCV_ALL_CMD (4u)

IOCTL Vlan filter allow Priority Tag frames Host Receive command.

## ◆ ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_PRIOTAG_HOST_RCV_NAL_CMD

#define ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_PRIOTAG_HOST_RCV_NAL_CMD (5u)

IOCTL Vlan filter do not allow Priority Tag frames Host Receive command.

## ◆ ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_ADD_VID_CMD

#define ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_ADD_VID_CMD (6u)

IOCTL Vlan filter 4096 VIDs, 1 bit VIDs => 4096 bits = 512 bytes, ADD VLAN ID to allow packet to host

## ◆ ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_REMOVE_VID_CMD

#define ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_REMOVE_VID_CMD (7u)

IOCTL Vlan filter 4096 VIDs, 1 bit VIDs => 4096 bits = 512 bytes, Remove VLAN ID to do not allow packet to host

## ◆ ICSS_EMAC_IOCTL_SPECIAL_UNICAST_MAC_CTRL_DISABLE_CMD

#define ICSS_EMAC_IOCTL_SPECIAL_UNICAST_MAC_CTRL_DISABLE_CMD (0u)

IOCTL Special Unicast MAC Disable command.

## ◆ ICSS_EMAC_IOCTL_SPECIAL_UNICAST_MAC_CTRL_ENABLE_CMD

#define ICSS_EMAC_IOCTL_SPECIAL_UNICAST_MAC_CTRL_ENABLE_CMD (1u)

IOCTL Special Unicast MAC Enable command.

## ◆ ICSS_EMAC_IOCTL_PORT_FWD_CTRL_ENABLE_CMD

#define ICSS_EMAC_IOCTL_PORT_FWD_CTRL_ENABLE_CMD (0u)

IOCTL Port Forwarding Enable command.

## ◆ ICSS_EMAC_IOCTL_PORT_FWD_CTRL_DISABLE_CMD

#define ICSS_EMAC_IOCTL_PORT_FWD_CTRL_DISABLE_CMD (1u)

IOCTL Port Forwarding Disable command.

## ◆ ICSS_EMAC_LEARNING_PORT_STATE_LEARNING

#define ICSS_EMAC_LEARNING_PORT_STATE_LEARNING (0U)

Macros for different port states in learning module.

## ◆ ICSS_EMAC_LEARNING_PORT_STATE_NOT_LEARNING

#define ICSS_EMAC_LEARNING_PORT_STATE_NOT_LEARNING (1U)

## ◆ ICSS_EMAC_LEARNING_PORT_STATE_LOCKED

#define ICSS_EMAC_LEARNING_PORT_STATE_LOCKED (2U)

## ◆ ICSS_EMAC_OBJECT_SIZE_IN_BYTES

#define ICSS_EMAC_OBJECT_SIZE_IN_BYTES (42000)

## Typedef Documentation

## ◆ ICSS_EMAC_Handle

typedef struct ICSS_EMAC_Config_s* ICSS_EMAC_Handle

Alias for ICSS EMAC Handle containing base addresses and modules.

## ◆ ICSS_EMAC_CallBack

typedef int32_t(* ICSS_EMAC_CallBack) (void *arg0, void *arg1, void *arg2)

Definition for a generic callback function used in ICSS-EMAC.
While calling this, first argument is always of type ICSS_EMAC_Handle, second argument is specific to the callback (see ICSS_EMAC_CallBackObject), and third argument is userArg as specified in ICSS_EMAC_CallBackConfig.

## Function Documentation

## ◆ ICSS_EMAC_init()

void ICSS_EMAC_init | ( | void |  | ) |

This function initializes the ICSS_EMAC module.

## ◆ ICSS_EMAC_deinit()

void ICSS_EMAC_deinit | ( | void |  | ) |

This function de-initializes the ICSS_EMAC module.

## ◆ ICSS_EMAC_Params_init()

void ICSS_EMAC_Params_init | ( | ICSS_EMAC_Params * | params | ) |

Initialize the parmeters data structure with defaults.

Parameters

  params | [out] Initialized parameters

## ◆ ICSS_EMAC_open()

ICSS_EMAC_Handle ICSS_EMAC_open | ( | uint32_t | idx,
|  | const ICSS_EMAC_Params * | params
| ) |  |

API to initialize and configure ICSS in MAC/Switch Mode.

Parameters

  [in] | idx | ICSS_EMAC instance number
  [in] | params | Structure of type ICSS_EMAC_Params

Returns
  ICSS_EMAC_Handle in case of success, NULL otherwise

## ◆ ICSS_EMAC_close()

void ICSS_EMAC_close | ( | ICSS_EMAC_Handle | icssEmacHandle | ) |

API to stop MAC/Switch Mode.

Parameters

  [in] | icssEmacHandle | Handle to ICSS_EMAC instance

## ◆ ICSS_EMAC_ioctl()

int32_t ICSS_EMAC_ioctl | ( | ICSS_EMAC_Handle | icssEmacHandle,
|  | uint32_t | ioctlCommand,
|  | uint8_t | portNo,
|  | void * | ioctlParams
| ) |  |

IOCTL Function for ICSS EMAC.

        This Function can be used to configure various ICSS EMAC Functionalities.
        The Supported features are:
        (1)Port Enable/Disable       (2)StormControl
        (3)Learning configuration    (4)Statistics module
        (5)Multicast filterring      (6)VLAN filtering

Parameters

  [in] | icssEmacHandle | Handle to ICSS_EMAC instance
  [in] | ioctlCommand | Command from ICSS_EMAC_IOCTL_COMMANDS
  [in] | portNo | Port number for IOCTL
  [in,out] | ioctlParams | Pointer to structure of type ICSS_EMAC_IoctlCmd Please see following for setting ioctlParams.command ICSS_EMAC_IOCTL_STORM_PREV_CTRL_COMMANDS, ICSS_EMAC_IOCTL_LEARNING_CTRL_COMMANDS, ICSS_EMAC_IOCTL_STATISTICS_COMMANDS, ICSS_EMAC_IOCTL_MULTICAST_FILTER_CTRL_COMMANDS, ICSS_EMAC_IOCTL_VLAN_FILTER_CTRL_COMMANDS, ICSS_EMAC_IOCTL_SPECIAL_UNICAST_MAC_CTRL_COMMANDS

Returns
  For "ioctlCommand = ICSS_EMAC_IOCTL_LEARNING_CTRL" and "ioctlParams.command = ICSS_EMAC_LEARN_CTRL_FIND_MAC", return value of 0 means not found, 1 means Port 0, and 2 means Port 1
  For others, SystemP_SUCCESS in case of success, SystemP_FAILURE otherwise

## ◆ ICSS_EMAC_rxPktGet()

int32_t ICSS_EMAC_rxPktGet | ( | ICSS_EMAC_RxArgument * | rxArg,
|  | void * | userArg
| ) |  |

Retrieves a frame from a host queue and copies it in the allocated stack buffer.

Parameters

  [in] | rxArg | Pointer to ICSS_EMAC_RxArgument structure
  [in] | userArg | Custom Rx packet callback packet options only required for custom RxPacket implementations, default to NULL when calling ICSS_EMAC_RxPktGet which is default Rx Packet API

Returns
  Length of the frame received in number of bytes or SystemP_FAILURE on failure

## ◆ ICSS_EMAC_rxPktInfo()

int32_t ICSS_EMAC_rxPktInfo | ( | ICSS_EMAC_Handle | icssEmacHandle,
|  | int32_t * | portNumber,
|  | int32_t * | queueNumber
| ) |  |

API to retrieve the information about the received frame which is then used to dequeue the frame from the host queues.

Parameters

  [in] | icssEmacHandle | Handle to ICSS_EMAC instance
  [out] | portNumber | Return pointer of port number where frame was received
  [out] | queueNumber | Return pointer of host queue where the received frame is queued

Returns
  Length of packet or SystemP_FAILURE if no packet found

## ◆ ICSS_EMAC_txPacket()

int32_t ICSS_EMAC_txPacket | ( | const ICSS_EMAC_TxArgument * | txArg,
|  | void * | userArg
| ) |  |

API to queue a frame which has to be transmitted on the specified port queue.

Parameters

  [in] | txArg | Pointer to ICSS_EMAC_TxArgument
  [in] | userArg | Custom Tx packet callback packet options only required for custom TxPacket implementations, default to NULL when calling ICSS_EMAC_TxPacket which is default Tx Packet API

Returns
  - If "customTxCallBack" is not defined, code from ICSS_EMAC_ErrorCodes
  - If txArg.portNumber is ICSS_EMAC_PORT_0 and if Tx is triggered for both ports, then lower 16 bits contain the return code for ICSS_EMAC_PORT_1 and upper 16 bits contain the return code for ICSS_EMAC_PORT_2.
  - If txArg.portNumber is not ICSS_EMAC_PORT_0, then the lower 16 bits contain the return code.

- If "customTxCallBack" is defined, it returns the same value as return value from "customTxCallBack.callBack."