ETHFW API Guide
|
EthFw Remote Client message definitions.
Remote clients communicate with Ethernet Firmware via IPC based APIs and need a common message structure definitions to understand the communication. This file defines the headers and message structures of remote client communication.
Macros | |
#define | ETHREMOTECFG_MACADDRLEN (6U) |
MAC Address length in octets. More... | |
#define | ETHREMOTECFG_IPV4ADDRLEN (4U) |
IPv4 Address length in octets. More... | |
#define | ETHREMOTECFG_ETHSWITCH_VLAN_USE_DFLT (0xFFFF) |
#define | ETHREMOTECFG_FWDATE_YEARLEN (4U) |
Number of octets in year. More... | |
#define | ETHREMOTECFG_FWDATE_MONTHLEN (3U) |
Number of octets in month. More... | |
#define | ETHREMOTECFG_FWDATE_DATELEN (2U) |
Number of octets in date. More... | |
#define | ETHREMOTECFG_FW_COMMITSHALEN (8U) |
GIT Commit SHA length in octets. More... | |
#define | ETHREMOTECFG_IPC_MSG_SIZE (496U + 32U) |
Max IPC message size. More... | |
#define | ETHREMOTECFG_IPC_MSG_PAYLOAD_SIZE (496U) |
Max payload size in an IPC messsage. More... | |
#define | ETHREMOTECFG_IPC_NUM_MSG_BUFS (256U) |
Max number of IPC buffers. More... | |
#define | ETHREMOTECFG_IPC_MSG_OBJ_SIZE (256U) |
Buffer size allocated to the channel. More... | |
#define | ETHREMOTECFG_IPC_DATA_SIZE |
IPC data size. More... | |
#define | ETHREMOTECFG_CMD_TYPE_COUNT (ETHREMOTECFG_CMD_TYPE_LAST + 1) |
Ethernet device C2S request type count. More... | |
#define | ETHREMOTECFG_NOTIFY_TYPE_COUNT (ETHREMOTECFG_NOTIFY_LAST + 1) |
Ethernet device S2C notify message type count. More... | |
#define | ETHREMOTECFG_TOKEN_NONE ((uint32_t)0xFFFFFFFFU) |
Remote client token value when none is assigned by the server. More... | |
#define | ETHREMOTECFG_NOTIFY_SERVICE_ENDPT_ID (30U) |
Remote notify service endpoint Id needed by server to send notify messages. More... | |
#define | ETHREMOTECFG_VIRTPORT_DENORM(n) ((EthRemoteCfg_VirtPort)((n) + ETHREMOTECFG_SWITCH_PORT_0)) |
De-normalize EthRemoteCfg_VirtPort. More... | |
Ethernet Remote Config IPC Endpoint Info. | |
#define | ETHREMOTECFG_AUTOSAR_REMOTE_SERVICE_NAME "ti.autosar.ethdevice" |
AUTOSAR service endpoint name. More... | |
#define | ETHREMOTECFG_FRAMEWORK_SERVICE_NAME "ti.ethfw.ethdevice" |
Linux/RTOS/QNX endpoint name. More... | |
#define | ETHREMOTECFG_REMOTE_NOTIFY_SERVICE "ti.ethfw.notifyservice" |
Notify service endpoint name. More... | |
Ethernet Remote Config Error Codes. | |
#define | ETHREMOTECFG_SOK (0) |
Success. More... | |
#define | ETHREMOTECFG_SINPROGRESS (1) |
Operation in progress. More... | |
#define | ETHREMOTECFG_EFAIL (-1) |
Failure. More... | |
#define | ETHREMOTECFG_EBADARGS (-2) |
Bad arguments (i.e. NULL pointer). More... | |
#define | ETHREMOTECFG_EINVALIDPARAMS (-3) |
Invalid parameters (i.e. value out-of-range). More... | |
#define | ETHREMOTECFG_ETIMEOUT (-4) |
Time out while waiting for a given condition to happen. More... | |
#define | ETHREMOTECFG_EALLOC (-8) |
Allocation failure. More... | |
#define | ETHREMOTECFG_EUNEXPECTED (-9) |
Unexpected condition occurred (sometimes unrecoverable). More... | |
#define | ETHREMOTECFG_EBUSY (-10) |
The resource is currently busy performing an operation. More... | |
#define | ETHREMOTECFG_EALREADYOPEN (-11) |
Already open error. More... | |
#define | ETHREMOTECFG_EPERM (-12) |
Operation not permitted. More... | |
#define | ETHREMOTECFG_ENOTSUPPORTED (-13) |
Operation not supported. More... | |
#define | ETHREMOTECFG_ENOTFOUND (-14) |
Resource not found. More... | |
Ethernet Firmware version information. | |
API version info for the Ethernet Firmware which any remote client should check to ensure compatibility. | |
#define | ETHREMOTECFG_FW_ETHSWITCH_VERSION_MAJOR (0U) |
Ethernet device API version major version. More... | |
#define | ETHREMOTECFG_FW_ETHSWITCH_VERSION_MINOR (5U) |
Ethernet device API version minor version. More... | |
#define | ETHREMOTECFG_FW_ETHSWITCH_VERSION_REVISION (0U) |
Ethernet device API version minor revision. More... | |
Ethernet device supported feature masks. | |
#define | ETHREMOTECFG_FEATURE_TXCSUM (1 << 0) |
Tx checksum offload feature. More... | |
#define | ETHREMOTECFG_FEATURE_MC_FILTER (1 << 1) |
Multicast filter feature. More... | |
#define ETHREMOTECFG_AUTOSAR_REMOTE_SERVICE_NAME "ti.autosar.ethdevice" |
AUTOSAR service endpoint name.
#define ETHREMOTECFG_FRAMEWORK_SERVICE_NAME "ti.ethfw.ethdevice" |
Linux/RTOS/QNX endpoint name.
#define ETHREMOTECFG_REMOTE_NOTIFY_SERVICE "ti.ethfw.notifyservice" |
Notify service endpoint name.
#define ETHREMOTECFG_SOK (0) |
Success.
#define ETHREMOTECFG_SINPROGRESS (1) |
Operation in progress.
#define ETHREMOTECFG_EFAIL (-1) |
Failure.
#define ETHREMOTECFG_EBADARGS (-2) |
Bad arguments (i.e. NULL pointer).
#define ETHREMOTECFG_EINVALIDPARAMS (-3) |
Invalid parameters (i.e. value out-of-range).
#define ETHREMOTECFG_ETIMEOUT (-4) |
Time out while waiting for a given condition to happen.
#define ETHREMOTECFG_EALLOC (-8) |
Allocation failure.
#define ETHREMOTECFG_EUNEXPECTED (-9) |
Unexpected condition occurred (sometimes unrecoverable).
#define ETHREMOTECFG_EBUSY (-10) |
The resource is currently busy performing an operation.
#define ETHREMOTECFG_EALREADYOPEN (-11) |
Already open error.
#define ETHREMOTECFG_EPERM (-12) |
Operation not permitted.
#define ETHREMOTECFG_ENOTSUPPORTED (-13) |
Operation not supported.
#define ETHREMOTECFG_ENOTFOUND (-14) |
Resource not found.
#define ETHREMOTECFG_MACADDRLEN (6U) |
MAC Address length in octets.
#define ETHREMOTECFG_IPV4ADDRLEN (4U) |
IPv4 Address length in octets.
#define ETHREMOTECFG_ETHSWITCH_VLAN_USE_DFLT (0xFFFF) |
Indicates to the Ethernet Firmware to use the default VLAN id for the type of port associated with the caller, i.e. virtual MAC or virtual switch.
#define ETHREMOTECFG_FWDATE_YEARLEN (4U) |
Number of octets in year.
#define ETHREMOTECFG_FWDATE_MONTHLEN (3U) |
Number of octets in month.
#define ETHREMOTECFG_FWDATE_DATELEN (2U) |
Number of octets in date.
#define ETHREMOTECFG_FW_COMMITSHALEN (8U) |
GIT Commit SHA length in octets.
#define ETHREMOTECFG_FW_ETHSWITCH_VERSION_MAJOR (0U) |
Ethernet device API version major version.
#define ETHREMOTECFG_FW_ETHSWITCH_VERSION_MINOR (5U) |
Ethernet device API version minor version.
#define ETHREMOTECFG_FW_ETHSWITCH_VERSION_REVISION (0U) |
Ethernet device API version minor revision.
#define ETHREMOTECFG_FEATURE_TXCSUM (1 << 0) |
Tx checksum offload feature.
#define ETHREMOTECFG_FEATURE_MC_FILTER (1 << 1) |
Multicast filter feature.
#define ETHREMOTECFG_IPC_MSG_SIZE (496U + 32U) |
Max IPC message size.
#define ETHREMOTECFG_IPC_MSG_PAYLOAD_SIZE (496U) |
Max payload size in an IPC messsage.
#define ETHREMOTECFG_IPC_NUM_MSG_BUFS (256U) |
Max number of IPC buffers.
#define ETHREMOTECFG_IPC_MSG_OBJ_SIZE (256U) |
Buffer size allocated to the channel.
#define ETHREMOTECFG_IPC_DATA_SIZE |
IPC data size.
#define ETHREMOTECFG_CMD_TYPE_COUNT (ETHREMOTECFG_CMD_TYPE_LAST + 1) |
Ethernet device C2S request type count.
#define ETHREMOTECFG_NOTIFY_TYPE_COUNT (ETHREMOTECFG_NOTIFY_LAST + 1) |
Ethernet device S2C notify message type count.
#define ETHREMOTECFG_TOKEN_NONE ((uint32_t)0xFFFFFFFFU) |
Remote client token value when none is assigned by the server.
#define ETHREMOTECFG_NOTIFY_SERVICE_ENDPT_ID (30U) |
Remote notify service endpoint Id needed by server to send notify messages.
#define ETHREMOTECFG_VIRTPORT_DENORM | ( | n | ) | ((EthRemoteCfg_VirtPort)((n) + ETHREMOTECFG_SWITCH_PORT_0)) |
De-normalize EthRemoteCfg_VirtPort.
Macro to denormalize VirtPort number. It takes a zero-based virtport number and converts it to a EthRemoteCfg_VirtPort enum.
enum EthRemoteCfg_CmdType |
Ethernet Firmware commands.
The commands supported by Ethernet Firmware. Initially, remote clients will send a command request message to the server which will carry out the operation and then send the command response back. Both, the request and response messages will carry one of these command ids.
Enumerator | |
---|---|
ETHREMOTECFG_CMD_VIRT_PORT_INFO | Command to offer the virtual ports queried by the remote core. Clients can query EthFw to provide the details regarding allocated virtual switch and virtual MAC ports. Request (C2S): EthRemoteCfg_CommonReq Response (S2C): EthRemoteCfg_OfferVirtPortRes |
ETHREMOTECFG_CMD_ATTACH | Command to attach to the Ethernet device. All remote clients should first attach before issuing any further commands to the Ethernet device. Request (C2S): EthRemoteCfg_AttachReq Response (S2C): EthRemoteCfg_AttachRes |
ETHREMOTECFG_CMD_ATTACH_EXT | Command to attach to the Ethernet device which returns extended attach info. All remote clients should first attach before issuing any further commands to the Ethernet device. Remote clients that require only a single data path can use a single single ETHREMOTECFG_CMD_ATTACH_EXT command which will return all the parameters required to establish data path including destination MAC address, Rx flow, Tx channel. Request (C2S): EthRemoteCfg_AttachReq Response (S2C): EthRemoteCfg_AttachExtRes |
ETHREMOTECFG_CMD_DETACH | Command to detach remote client from the Ethernet device. This is inverse operation of ETHREMOTECFG_CMD_ATTACH and ETHREMOTECFG_CMD_ATTACH_EXT. All resources allocated to the remote client like Tx channel, Rx flow, MAC address are freed by the server core. Request (C2S): EthRemoteCfg_CommonReq Response (S2C): EthRemoteCfg_StatusRes |
ETHREMOTECFG_CMD_PORT_LINK_STATUS | Command to query link status of a port. Command allows clients to query for the link status of a port. Server also returns the link speed and duplexity of the virtual port. Request (C2S): EthRemoteCfg_CommonReq Response (S2C): EthRemoteCfg_PortLinkStatusRes |
ETHREMOTECFG_CMD_ALLOC_TX | Command to allocate Tx channel. Client should use the allocated Tx channel as Tx DMA channel CPSW PSIL destination thread id when configuring the Tx DMA channel. Request (C2S): EthRemoteCfg_AllocTxReq Response (S2C): EthRemoteCfg_AllocTxRes |
ETHREMOTECFG_CMD_ALLOC_RX | Command to allocate Rx flow. Client should use the allocated Rx flow id to configure the DNA Rx flow to establish Rx data flow path on remote client. Request (C2S): EthRemoteCfg_AllocRxReq Response (S2C): EthRemoteCfg_AllocRxRes |
ETHREMOTECFG_CMD_ALLOC_MAC | Command to allocate a MAC address to the client. Commands allows client to allocate a host port destination MAC address which it can register using ETHREMOTECFG_CMD_REGISTER_MAC. Request (C2S): EthRemoteCfg_CommonReq Response (S2C): EthRemoteCfg_AllocMacRes |
ETHREMOTECFG_CMD_FREE_TX | Command to free previously allocated Tx channel. This is inverse operation of ETHREMOTECFG_CMD_ALLOC_TX and frees the previously allocated Tx channels PSIL destination thread. Request (C2S): EthRemoteCfg_FreeTxReq Response (S2C): EthRemoteCfg_StatusRes |
ETHREMOTECFG_CMD_FREE_RX | Command to free previously allocated Rx flow id. This is inverse operation of ETHREMOTECFG_CMD_ALLOC_RX and frees the previously allocated Rx flow id. Request (C2S): EthRemoteCfg_FreeRxReq Response (S2C): EthRemoteCfg_StatusRes |
ETHREMOTECFG_CMD_FREE_MAC | Command to free previously allocated MAC address. This is inverse operation of ETHREMOTECFG_CMD_ALLOC_MAC and frees the previously allocated MAC address. Request (C2S): EthRemoteCfg_FreeMacReq Response (S2C): EthRemoteCfg_StatusRes |
ETHREMOTECFG_CMD_REGISTER_MAC | Command to register a destination MAC address by the remote client to a specific Rx flow id. Command allows remote client to register all traffic received on the host port with a specific destination MAC address to be routed to the given Rx flow id. Request (C2S): EthRemoteCfg_MacAddrRxFlowReq Response (S2C): EthRemoteCfg_StatusRes |
ETHREMOTECFG_CMD_DEREGISTER_MAC | Command to de-register a destination MAC address by the remote client. This is inverse operation of ETHREMOTECFG_CMD_REGISTER_MAC and disables the routing of traffic with given destination MAC address to a specific Rx flow id. Once de-registered further traffic with the given destination MAC address will be routed to default Rx flow. Request (C2S): EthRemoteCfg_MacAddrRxFlowReq Response (S2C): EthRemoteCfg_StatusRes |
ETHREMOTECFG_CMD_SET_RX_DEFAULTFLOW | Command to register default flow routing to client. Commands allows remote client to receive traffic directed to the default flow. Default flow is the flow to which Ethernet device will direct traffic if it does not match any classifier which has a thread id configured. Default flow registration is possible only if no core including server core has registered for the default flow. Request (C2S): EthRemoteCfg_RxDefaultFlowRegisterReq Response (S2C): EthRemoteCfg_StatusRes |
ETHREMOTECFG_CMD_DEL_RX_DEFAULTFLOW | Command to de-register default flow routing to client. This is inverse operation of ETHREMOTECFG_CMD_SET_RX_DEFAULTFLOW and disables the routing of default flow traffic to the given Rx flow id. Once default flow is de-registered, all traffic destined to default flow will be routed to reserved flow and will be dropped. Request (C2S): EthRemoteCfg_RxDefaultFlowRegisterReq Response (S2C): EthRemoteCfg_StatusRes |
ETHREMOTECFG_CMD_REGISTER_IPv4 | Command to associate IPv4 address with MAC address. Command allows server core to register IPv4 address with a MAC address. ARP queries from external nodes will be received on host port. The ARP queries can be routed to only a single core. This is typically the server core which maintains ARP database of all the IP entries: MAC address mapping used by all clients in all remote cores. The remote client must explicitly register its IP address:MAC address with the server core using this command. Request (C2S): EthRemoteCfg_IPv4AddrRegisterReq Response (S2C): EthRemoteCfg_StatusRes |
ETHREMOTECFG_CMD_DEREGISTER_IPv4 | Command to remove IPv4 address:MAC address mapping. Command removes ARP entry of IP address:MAC address mapping. This is inverse operation of ETHREMOTECFG_CMD_REGISTER_IPv4. Request (C2S): EthRemoteCfg_IPv4AddrDeregisterReq Response (S2C): EthRemoteCfg_StatusRes |
ETHREMOTECFG_CMD_JOIN_VLAN | Command to join a VLAN. Used by remote clients to join a VLAN. Note that the remote client must be allowed in the VLAN, which is a static configuration on server side. Request (C2S): EthRemoteCfg_VlanJoinReq Response (S2C): EthRemoteCfg_StatusRes |
ETHREMOTECFG_CMD_LEAVE_VLAN | Command to leave a VLAN. Used by remote clients to leave VLAN previously joined through ETHREMOTECFG_CMD_JOIN_VLAN. Request (C2S): EthRemoteCfg_VlanLeaveReq Response (S2C): EthRemoteCfg_StatusRes |
ETHREMOTECFG_CMD_ADD_FILTER_MAC | Command to add multicast MAC address to receive filter. Command allows remote core client to add a multicast address to receive filter. Server side differentiates three types of multicast addresses:
Request (C2S): EthRemoteCfg_FilterMacAddReq Response (S2C): EthRemoteCfg_StatusRes |
ETHREMOTECFG_CMD_DEL_FILTER_MAC | Command to delete multicast MAC address from receive filter. Command allows remote client to delete a multicast address from receive filter. Request (C2S): EthRemoteCfg_FilterMacDelReq Response (S2C): EthRemoteCfg_StatusRes |
ETHREMOTECFG_CMD_REGISTER_MATCH_ETHTYPE | Command to setup an EtherType-based packet route. Commands allows remote client to register all traffic received on the host port with a specific EtherType to be routed to the given Rx flow id. Request (C2S): EthRemoteCfg_MatchEthertypeAddReq Response (S2C): EthRemoteCfg_StatusRes |
ETHREMOTECFG_CMD_DEREGISTER_MATCH_ETHTYPE | Command to tear-down an EtherType-based packet route. This is inverse operation of ETHREMOTECFG_CMD_REGISTER_MATCH_ETHTYPE and disables the routing of traffic with given EtherType to a specific Rx flow id. Once unregistered further traffic with the given EtherType will be routed to default Rx flow. Request (C2S): EthRemoteCfg_MatchEthertypeDelReq Response (S2C): EthRemoteCfg_StatusRes |
ETHREMOTECFG_CMD_REGISTER_REMOTE_TIMER | Command to register a remote timer with EthFw for multicore time synchronization. Commands allows remote core client to register a timer which it intends to use for multicore time synchronization. Master core will setup the time sync router for timer periodic events towards CPTS hardware push events. Request (C2S): EthRemoteCfg_RemoteTimerRegisterReq Response (S2C): EthRemoteCfg_StatusRes |
ETHREMOTECFG_CMD_DEREGISTER_REMOTE_TIMER | Command to de-register a remote timer with EthFw. Commands allows remote core client to de-register a timer used by for multicore time synchronization with CPTS timer. Request (C2S): EthRemoteCfg_RemoteTimerDeregisterReq Response (S2C): EthRemoteCfg_StatusRes |
ETHREMOTECFG_CMD_GET_SERVER_STATUS | Command to query the remote configuration server status. Command allows remote client to query what is the current status of the server state machine. Request (C2S): EthRemoteCfg_CommonReq Response (S2C): EthRemoteCfg_ServerStatusRes |
ETHREMOTECFG_CMD_TEARDOWN_COMPLETION | Command to notify client's DMA teardown completion. Command send by remote client after tearing down the DMA channels in response to server notification ETHREMOTECFG_NOTIFY_HWERROR. Request (C2S): EthRemoteCfg_CommonReq Response (S2C): EthRemoteCfg_StatusRes |
ETHREMOTECFG_CMD_DUMP | Command from remote client to Server to dump CPSW stats. Command to dump network statistics, forwarding table, policer table and other server internal tables on master core's UART console. Request (C2S): EthRemoteCfg_CommonReq Response (S2C): EthRemoteCfg_StatusRes |
ETHREMOTECFG_CMD_TYPE_LAST | Last command id. |
Remote core id used by server to identify the application running on the core.
Server-to-client (S2C) notify types.
Enumerator | |
---|---|
ETHREMOTECFG_NOTIFY_FWINFO | Notify type for sending EthFw version info to the remote clients. Params (S2C): EthRemoteCfg_DeviceData |
ETHREMOTECFG_NOTIFY_HWPUSH | Notify type for sending CPTS HW push events to the remote clients. Params (S2C): EthRemoteCfg_NotifyServiceHwPushMsg |
ETHREMOTECFG_NOTIFY_HWERROR | Notify type for hardware error, typically requires a reset to recover. Params (S2C): EthRemoteCfg_CommonNotify |
ETHREMOTECFG_NOTIFY_HWRECOVERY_COMPLETE | Notify type for hardware recovery completion. Params (S2C): EthRemoteCfg_CommonNotify |
ETHREMOTECFG_NOTIFY_CUSTOM | Custom notify type. Params (S2C): EthRemoteCfg_CommonNotify |
ETHREMOTECFG_NOTIFY_LAST | Last notification type. |
enum EthRemoteCfg_MsgType |
Ethernet Firmware server status.
Virtual port id.