AM64x MCU+ SDK  10.00.00

Introduction

Sub Modules

 CPSW MAC Port
 

Data Structures

struct  EnetMacPort_Interface
 MAC port interface. More...
 
struct  EnetMacPort_LinkCfg
 Link speed and duplexity configuration. More...
 
struct  EnetMacPort_GenericInArgs
 Generic MAC port input args. More...
 
struct  EnetMacPort_SetIngressDscpPriorityMapInArgs
 Input args for ENET_MACPORT_IOCTL_SET_INGRESS_DSCP_PRI_MAP command. More...
 
struct  EnetMacPort_SetPriorityRegenMapInArgs
 Input args for ENET_MACPORT_IOCTL_SET_PRI_REGEN_MAP command. More...
 
struct  EnetMacPort_SetEgressPriorityMapInArgs
 Input args for ENET_MACPORT_IOCTL_SET_EGRESS_QOS_PRI_MAP command. More...
 
struct  EnetMacPort_EnableEgressTrafficShapingInArgs
 Input args for ENET_MACPORT_IOCTL_ENABLE_EGRESS_TRAFFIC_SHAPING command. More...
 
struct  EnetMacPort_SetCreditBasedShaperInArgs
 Input args for ENET_MACPORT_IOCTL_SET_CREDIT_BASED_SHAPING command. More...
 
struct  EnetMacPort_GetCreditBasedShaperInArgs
 Input args for ENET_MACPORT_IOCTL_GET_CREDIT_BASED_SHAPING command. More...
 
struct  EnetMacPort_SetPreemptMinFragSizeInArgs
 Input args for ENET_MACPORT_IOCTL_SET_PREEMPT_MIN_FRAG_SIZE. More...
 
struct  EnetMacPort_QueuePreemptCfg
 MacPort Queue Preempt Config. More...
 
struct  EnetMacPort_SetPreemptQueueInArgs
 Input args for ENET_MACPORT_IOCTL_SET_PREEMPT_QUEUE. More...
 

Functions

static bool EnetMacPort_isMii (const EnetMacPort_Interface *mii)
 Check if interface is MII. More...
 
static bool EnetMacPort_isRmii (const EnetMacPort_Interface *mii)
 Check if interface is RMII. More...
 
static bool EnetMacPort_isGmii (const EnetMacPort_Interface *mii)
 Check if interface is GMII. More...
 
static bool EnetMacPort_isRgmii (const EnetMacPort_Interface *mii)
 Check if interface is RGMII. More...
 
static bool EnetMacPort_isSgmii (const EnetMacPort_Interface *mii)
 Check if interface is SGMII. More...
 
static bool EnetMacPort_isQsgmii (const EnetMacPort_Interface *mii)
 Check if interface is QSGMII. More...
 
static bool EnetMacPort_isXfi (const EnetMacPort_Interface *mii)
 Check if interface is XFI. More...
 

Enumerations

enum  EnetMacPort_Ioctl {
  ENET_MACPORT_IOCTL_GET_VERSION = ENET_MACPORT_PUBLIC_IOCTL(0U), ENET_MACPORT_IOCTL_PRINT_REGS = ENET_MACPORT_PUBLIC_IOCTL(1U), ENET_MACPORT_IOCTL_SET_INGRESS_DSCP_PRI_MAP = ENET_MACPORT_PUBLIC_IOCTL(2U), ENET_MACPORT_IOCTL_GET_INGRESS_DSCP_PRI_MAP = ENET_MACPORT_PUBLIC_IOCTL(3U),
  ENET_MACPORT_IOCTL_SET_PRI_REGEN_MAP = ENET_MACPORT_PUBLIC_IOCTL(4U), ENET_MACPORT_IOCTL_GET_PRI_REGEN_MAP = ENET_MACPORT_PUBLIC_IOCTL(5U), ENET_MACPORT_IOCTL_SET_EGRESS_QOS_PRI_MAP = ENET_MACPORT_PUBLIC_IOCTL(6U), ENET_MACPORT_IOCTL_GET_EGRESS_QOS_PRI_MAP = ENET_MACPORT_PUBLIC_IOCTL(7U),
  ENET_MACPORT_IOCTL_ENABLE_EGRESS_TRAFFIC_SHAPING = ENET_MACPORT_PUBLIC_IOCTL(8U), ENET_MACPORT_IOCTL_DISABLE_EGRESS_TRAFFIC_SHAPING = ENET_MACPORT_PUBLIC_IOCTL(9U), ENET_MACPORT_IOCTL_GET_EGRESS_TRAFFIC_SHAPING = ENET_MACPORT_PUBLIC_IOCTL(10U), ENET_MACPORT_IOCTL_GET_MAXLEN = ENET_MACPORT_PUBLIC_IOCTL(11U),
  ENET_MACPORT_IOCTL_GET_LINK_CFG = ENET_MACPORT_PUBLIC_IOCTL(12U), ENET_MACPORT_IOCTL_SET_CREDIT_BASED_SHAPING = ENET_MACPORT_PUBLIC_IOCTL(13U), ENET_MACPORT_IOCTL_GET_CREDIT_BASED_SHAPING = ENET_MACPORT_PUBLIC_IOCTL(14U), ENET_MACPORT_IOCTL_IET_RELEASE_PREEMPT_TRAFFIC = ENET_MACPORT_PUBLIC_IOCTL(15U),
  ENET_MACPORT_IOCTL_IET_HOLD_PREEMPT_TRAFFIC = ENET_MACPORT_PUBLIC_IOCTL(16U), ENET_MACPORT_IOCTL_GET_QUEUE_PREEMPT_STATUS = ENET_MACPORT_PUBLIC_IOCTL(17U), ENET_MACPORT_IOCTL_SET_PREEMPT_QUEUE = ENET_MACPORT_PUBLIC_IOCTL(18U), ENET_MACPORT_IOCTL_GET_PREEMPT_MIN_FRAG_SIZE = ENET_MACPORT_PUBLIC_IOCTL(19U),
  ENET_MACPORT_IOCTL_SET_PREEMPT_MIN_FRAG_SIZE = ENET_MACPORT_PUBLIC_IOCTL(20U), ENET_MACPORT_IOCTL_GET_PREEMPT_VERIFY_STATUS = ENET_MACPORT_PUBLIC_IOCTL(21U), ENET_MACPORT_IOCTL_DISABLE_PREEMPT_VERIFICATION = ENET_MACPORT_PUBLIC_IOCTL(22U), ENET_MACPORT_IOCTL_ENABLE_PREEMPT_VERIFICATION = ENET_MACPORT_PUBLIC_IOCTL(23U),
  ENET_MACPORT_IOCTL_GET_PREEMPTION_ACTIVE_STATUS = ENET_MACPORT_PUBLIC_IOCTL(24U), ENET_MACPORT_IOCTL_GET_PREEMPTION_ENABLE_STATUS = ENET_MACPORT_PUBLIC_IOCTL(25U), ENET_MACPORT_IOCTL_DISABLE_PREEMPTION = ENET_MACPORT_PUBLIC_IOCTL(26U), ENET_MACPORT_IOCTL_ENABLE_PREEMPTION = ENET_MACPORT_PUBLIC_IOCTL(27U)
}
 MAC port IOCTL commands. More...
 
enum  EnetMac_LayerType { ENET_MAC_LAYER_MII = 1U, ENET_MAC_LAYER_GMII = 0U, ENET_MAC_LAYER_XGMII = 2U }
 MAC interface layer type. More...
 
enum  EnetMac_SublayerType {
  ENET_MAC_SUBLAYER_STANDARD = 0U, ENET_MAC_SUBLAYER_REDUCED, ENET_MAC_SUBLAYER_SERIAL, ENET_MAC_SUBLAYER_QUAD_SERIAL_MAIN,
  ENET_MAC_SUBLAYER_QUAD_SERIAL_SUB
}
 MAC interface sublayer type. More...
 
enum  EnetMac_VariantType { ENET_MAC_VARIANT_NONE = 0U, ENET_MAC_VARIANT_FORCED }
 MAC interface variant (only for specific interface types). More...
 
enum  EnetMac_SgmiiMode {
  ENET_MAC_SGMIIMODE_INVALID = 0U, ENET_MAC_SGMIIMODE_FIBER_WITH_PHY, ENET_MAC_SGMIIMODE_SGMII_WITH_PHY, ENET_MAC_SGMIIMODE_SGMII_AUTONEG_MASTER,
  ENET_MAC_SGMIIMODE_SGMII_AUTONEG_SLAVE, ENET_MAC_SGMIIMODE_SGMII_FORCEDLINK
}
 SGMII mode. More...
 
enum  EnetMacPort_VlanType { ENET_MACPORT_VLAN_TYPE_NONE = 0x00U, ENET_MACPORT_VLAN_TYPE_SINGLE_TAG = 0x01U, ENET_MACPORT_VLAN_TYPE_STACKED_TAGS = 0x02U }
 VLAN usage type. More...
 
enum  EnetMacPort_PreemptVerifyStatus {
  ENET_MAC_VERIFYSTATUS_UNKNOWN = 0U, ENET_MAC_VERIFYSTATE_INITIAL, ENET_MAC_VERIFYSTATE_VERIFYING, ENET_MAC_VERIFYSTATUS_SUCCEEDED,
  ENET_MAC_VERIFYSTATUS_FAILED, ENET_MAC_VERIFYSTATUS_DISABLED, ENET_MAC_VERIFYSTATUS_RXRESPOND_ERROR, ENET_MAC_VERIFYSTATUS_RXVERIFY_ERROR
}
 MacPort IET Verification status. More...
 
enum  EnetMacPort_QueuePreemptMode { ENET_MAC_QUEUE_PREEMPT_MODE_EXPRESS, ENET_MAC_QUEUE_PREEMPT_MODE_PREEMPT }
 Queue preemptive mode: express or preemptive. More...
 

Macros

#define ENET_MACPORT_PUBLIC_IOCTL(x)
 Helper macro to create IOCTL commands for MAC port module. More...
 
#define ENET_MACPORT_PRIVATE_IOCTL(x)
 Helper macro to create private IOCTL commands for MAC Port module. More...
 

Macro Definition Documentation

◆ ENET_MACPORT_PUBLIC_IOCTL

#define ENET_MACPORT_PUBLIC_IOCTL (   x)
Value:
ENET_IOCTL_MACPORT_BASE | \
ENET_IOCTL_MIN(x))

Helper macro to create IOCTL commands for MAC port module.

◆ ENET_MACPORT_PRIVATE_IOCTL

#define ENET_MACPORT_PRIVATE_IOCTL (   x)
Value:
ENET_IOCTL_MACPORT_BASE | \
ENET_IOCTL_MIN(x))

Helper macro to create private IOCTL commands for MAC Port module.

Enumeration Type Documentation

◆ EnetMacPort_Ioctl

MAC port IOCTL commands.

Enumerator
ENET_MACPORT_IOCTL_GET_VERSION 

Get the hardware version of the MAC port module.

IOCTL parameters:

ENET_MACPORT_IOCTL_PRINT_REGS 

Print MAC port registers.

IOCTL parameters:

ENET_MACPORT_IOCTL_SET_INGRESS_DSCP_PRI_MAP 

Set ingress DSCP priority (TOS) map.

NOTE:

  • For ICSSG upto 7 DSCP values can have traffic class mapping, All others will be treated as best effort traffic.
  • For ICSSG only IPv4 based priority mapping is supported and Ipv6 based is not supported.
  • For ICSSG incase of local generated traffic for switch mode expecting both ports has same mapping and if it is undirected traffic priorities are taken from Port1 mapping

IOCTL parameters:

ENET_MACPORT_IOCTL_GET_INGRESS_DSCP_PRI_MAP 

Get ingress DSCP priority (TOS) map.

IOCTL parameters:

ENET_MACPORT_IOCTL_SET_PRI_REGEN_MAP 

Set VLAN priority regeneration map.

IOCTL parameters:

ENET_MACPORT_IOCTL_GET_PRI_REGEN_MAP 

Get VLAN priority regeneration map.

IOCTL parameters:

ENET_MACPORT_IOCTL_SET_EGRESS_QOS_PRI_MAP 

Set QoS egress priority map.

IOCTL parameters:

ENET_MACPORT_IOCTL_GET_EGRESS_QOS_PRI_MAP 

Get QoS egress priority map.

IOCTL parameters:

ENET_MACPORT_IOCTL_ENABLE_EGRESS_TRAFFIC_SHAPING 

Enable egress traffic shaping configuration.

IOCTL parameters:

ENET_MACPORT_IOCTL_DISABLE_EGRESS_TRAFFIC_SHAPING 

Disable egress traffic shaping configuration.

IOCTL parameters:

ENET_MACPORT_IOCTL_GET_EGRESS_TRAFFIC_SHAPING 

Get egress traffic shaping configuration.

IOCTL parameters:

ENET_MACPORT_IOCTL_GET_MAXLEN 

Get MRU and MTU.

IOCTL parameters:

ENET_MACPORT_IOCTL_GET_LINK_CFG 

Get MAC port's speed and duplexity.

IOCTL parameters:

ENET_MACPORT_IOCTL_SET_CREDIT_BASED_SHAPING 

Set Idleslope for Credit Based Shaper on MAC Port.

IOCTL parameters:

ENET_MACPORT_IOCTL_GET_CREDIT_BASED_SHAPING 

Get Idleslope of Credit Based Shaper on MAC Port queue.

IOCTL parameters:

ENET_MACPORT_IOCTL_IET_RELEASE_PREEMPT_TRAFFIC 

IET release preemptible traffic.

IOCTL parameters:

ENET_MACPORT_IOCTL_IET_HOLD_PREEMPT_TRAFFIC 

IET hold preemptible traffic.

IOCTL parameters:

ENET_MACPORT_IOCTL_GET_QUEUE_PREEMPT_STATUS 

Get macport queue preemption status.

IOCTL parameters:

ENET_MACPORT_IOCTL_SET_PREEMPT_QUEUE 

Set macport queue preemption mode.

IOCTL parameters:

ENET_MACPORT_IOCTL_GET_PREEMPT_MIN_FRAG_SIZE 

Get minimum fragment size.

IOCTL parameters:

ENET_MACPORT_IOCTL_SET_PREEMPT_MIN_FRAG_SIZE 

Set minimum fragment size.

IOCTL parameters:

ENET_MACPORT_IOCTL_GET_PREEMPT_VERIFY_STATUS 

Get IET verification status.

IOCTL parameters:

ENET_MACPORT_IOCTL_DISABLE_PREEMPT_VERIFICATION 

Disable IET verification.

IOCTL parameters:

ENET_MACPORT_IOCTL_ENABLE_PREEMPT_VERIFICATION 

Enable IET verification.

IOCTL parameters:

ENET_MACPORT_IOCTL_GET_PREEMPTION_ACTIVE_STATUS 

Get preemption active status.

IOCTL parameters:

ENET_MACPORT_IOCTL_GET_PREEMPTION_ENABLE_STATUS 

Get preemption enable status.

IOCTL parameters:

ENET_MACPORT_IOCTL_DISABLE_PREEMPTION 

Disable frame preemption.

IOCTL parameters:

ENET_MACPORT_IOCTL_ENABLE_PREEMPTION 

Enable IET frame preemption.

IOCTL parameters:

◆ EnetMac_LayerType

MAC interface layer type.

Enumerator
ENET_MAC_LAYER_MII 

Media-Independent Interface (MII) layer

ENET_MAC_LAYER_GMII 

Gigabit Media-Independent Interface (GMII) layer

ENET_MAC_LAYER_XGMII 

10-Gigabit Media-Independent Interface (XGMII) layer

◆ EnetMac_SublayerType

MAC interface sublayer type.

Enumerator
ENET_MAC_SUBLAYER_STANDARD 

Standard interface sublayer

ENET_MAC_SUBLAYER_REDUCED 

Reduced interface sublayer

ENET_MAC_SUBLAYER_SERIAL 

Serial interface sublayer

ENET_MAC_SUBLAYER_QUAD_SERIAL_MAIN 

Quad-serial interface sublayer (main port)

ENET_MAC_SUBLAYER_QUAD_SERIAL_SUB 

Quad-serial interface sublayer (sub port)

◆ EnetMac_VariantType

MAC interface variant (only for specific interface types).

Enumerator
ENET_MAC_VARIANT_NONE 

No variant

ENET_MAC_VARIANT_FORCED 

Forced mode (out of band)

◆ EnetMac_SgmiiMode

SGMII mode.

Enumerator
ENET_MAC_SGMIIMODE_INVALID 

Invalid mode. Set to when port is used in non Q/SGMII mode

ENET_MAC_SGMIIMODE_FIBER_WITH_PHY 

SGMII in fiber mode with PHY connection

ENET_MAC_SGMIIMODE_SGMII_WITH_PHY 

SGMII in SGMII mode with PHY connection

ENET_MAC_SGMIIMODE_SGMII_AUTONEG_MASTER 

SGMII in MAC to MAC with auto-neg master mode

ENET_MAC_SGMIIMODE_SGMII_AUTONEG_SLAVE 

SGMII in MAC to MAC with auto-neg slave mode

ENET_MAC_SGMIIMODE_SGMII_FORCEDLINK 

SGMII in MAC to MAC with forced master mode

◆ EnetMacPort_VlanType

VLAN usage type.

Enumerator
ENET_MACPORT_VLAN_TYPE_NONE 

No VLAN tag

ENET_MACPORT_VLAN_TYPE_SINGLE_TAG 

Single VLAN tag

ENET_MACPORT_VLAN_TYPE_STACKED_TAGS 

Stacked VLAN tag

◆ EnetMacPort_PreemptVerifyStatus

MacPort IET Verification status.

Enumerator
ENET_MAC_VERIFYSTATUS_UNKNOWN 

Unknown status

ENET_MAC_VERIFYSTATE_INITIAL 

Initial state

ENET_MAC_VERIFYSTATE_VERIFYING 

Verifying state

ENET_MAC_VERIFYSTATUS_SUCCEEDED 

Verify Success

ENET_MAC_VERIFYSTATUS_FAILED 

Verify Failure

ENET_MAC_VERIFYSTATUS_DISABLED 

Verification Disabled

ENET_MAC_VERIFYSTATUS_RXRESPOND_ERROR 

Received Verify Packet with Errors

ENET_MAC_VERIFYSTATUS_RXVERIFY_ERROR 

Received Verify Packet with Errors

◆ EnetMacPort_QueuePreemptMode

Queue preemptive mode: express or preemptive.

Enumerator
ENET_MAC_QUEUE_PREEMPT_MODE_EXPRESS 

Express queue

ENET_MAC_QUEUE_PREEMPT_MODE_PREEMPT 

Preemptive queue

Function Documentation

◆ EnetMacPort_isMii()

static bool EnetMacPort_isMii ( const EnetMacPort_Interface mii)
inlinestatic

Check if interface is MII.

Parameters
miiMAC port interface
Returns
true if MAC port interface is MII, otherwise false.

◆ EnetMacPort_isRmii()

static bool EnetMacPort_isRmii ( const EnetMacPort_Interface mii)
inlinestatic

Check if interface is RMII.

Parameters
miiMAC port interface
Returns
true if MAC port interface is RMII, otherwise false.

◆ EnetMacPort_isGmii()

static bool EnetMacPort_isGmii ( const EnetMacPort_Interface mii)
inlinestatic

Check if interface is GMII.

Parameters
miiMAC port interface
Returns
true if MAC port interface is GMII, otherwise false.

◆ EnetMacPort_isRgmii()

static bool EnetMacPort_isRgmii ( const EnetMacPort_Interface mii)
inlinestatic

Check if interface is RGMII.

Parameters
miiMAC port interface
Returns
true if MAC port interface is RGMII, otherwise false.

◆ EnetMacPort_isSgmii()

static bool EnetMacPort_isSgmii ( const EnetMacPort_Interface mii)
inlinestatic

Check if interface is SGMII.

Parameters
miiMAC port interface
Returns
true if MAC port interface is SGMII, otherwise false.

◆ EnetMacPort_isQsgmii()

static bool EnetMacPort_isQsgmii ( const EnetMacPort_Interface mii)
inlinestatic

Check if interface is QSGMII.

Parameters
miiMAC port interface
Returns
true if MAC port interface is QSGMII, otherwise false.

◆ EnetMacPort_isXfi()

static bool EnetMacPort_isXfi ( const EnetMacPort_Interface mii)
inlinestatic

Check if interface is XFI.

Parameters
miiMAC port interface
Returns
true if MAC port interface is XFI, otherwise false.
ENET_IOCTL_TYPE_PUBLIC
@ ENET_IOCTL_TYPE_PUBLIC
Definition: enet_ioctl.h:209
ENET_IOCTL_TYPE_PRIVATE
@ ENET_IOCTL_TYPE_PRIVATE
Definition: enet_ioctl.h:212