ETHFW API Guide
Ethernet Switch Remote Device

Introduction

The remote device framework enables access to devices from remote cores One core is designated as master core with exclusive register access. Remote cores may configure the device using the remote device framework

The ethernet switch device (CPSW9G) is available as a remote device This module defines the Ethernet Switch Remote Device interface

Data Structures

struct  rpmsg_kdrv_ethswitch_message_header
 
struct  rpmsg_kdrv_ethswitch_common_request_info
 
struct  rpmsg_kdrv_ethswitch_common_response_info
 
struct  rpmsg_kdrv_ethswitch_attach_request
 
struct  rpmsg_kdrv_ethswitch_attach_response
 
struct  rpmsg_kdrv_ethswitch_attach_extended_request
 
struct  rpmsg_kdrv_ethswitch_attach_extended_response
 
struct  rpmsg_kdrv_ethswitch_alloc_request
 Alloc request CMD params. More...
 
struct  rpmsg_kdrv_ethswitch_alloc_rx_response
 Alloc request CMD params. More...
 
struct  rpmsg_kdrv_ethswitch_alloc_tx_response
 Alloc Tx channel CMD response msg. More...
 
struct  rpmsg_kdrv_ethswitch_alloc_mac_response
 Alloc MAC CMD response msg. More...
 
struct  rpmsg_kdrv_ethswitch_register_rx_default_request
 Register Rx Default flow CMD request params. More...
 
struct  rpmsg_kdrv_ethswitch_register_rx_default_response
 Register Rx Default flow CMD response params. More...
 
struct  rpmsg_kdrv_ethswitch_register_mac_request
 Register MAC address CMD request params. More...
 
struct  rpmsg_kdrv_ethswitch_register_mac_response
 Register MAC address CMD response params. More...
 
struct  rpmsg_kdrv_ethswitch_unregister_mac_request
 UnRegister MAC address CMD request params. More...
 
struct  rpmsg_kdrv_ethswitch_unregister_mac_response
 UnRegister MAC address CMD response params. More...
 
struct  rpmsg_kdrv_ethswitch_free_mac_request
 Free MAC address CMD request params. More...
 
struct  rpmsg_kdrv_ethswitch_free_mac_response
 Free MAC address CMD response params. More...
 
struct  rpmsg_kdrv_ethswitch_free_tx_request
 Free Tx Channel CMD request params. More...
 
struct  rpmsg_kdrv_ethswitch_free_tx_response
 Free Tx Channel CMD response params. More...
 
struct  rpmsg_kdrv_ethswitch_unregister_rx_default_request
 Unregister Default Flow CMD request params. More...
 
struct  rpmsg_kdrv_ethswitch_unregister_rx_default_response
 Unregister Default Flow CMD response params. More...
 
struct  rpmsg_kdrv_ethswitch_free_rx_request
 Free Rx Flow CMD request params. More...
 
struct  rpmsg_kdrv_ethswitch_free_rx_response
 Free Rx Flow CMD response params. More...
 
struct  rpmsg_kdrv_ethswitch_detach_request
 Detach CMD request params. More...
 
struct  rpmsg_kdrv_ethswitch_detach_response
 Detach CMD response params. More...
 
struct  rpmsg_kdrv_ethswitch_ioctl_request
 IOCTL CMD request params. More...
 
struct  rpmsg_kdrv_ethswitch_ioctl_response
 IOCTL CMD response params. More...
 
struct  rpmsg_kdrv_ethswitch_regwr_request
 Register Write CMD request params. More...
 
struct  rpmsg_kdrv_ethswitch_regwr_response
 Register Write CMD response params. More...
 
struct  rpmsg_kdrv_ethswitch_regrd_request
 Register Read CMD request params. More...
 
struct  rpmsg_kdrv_ethswitch_regrd_response
 Register Read CMD response params. More...
 
struct  rpmsg_kdrv_ethswitch_ipv4_register_mac_request
 Register IPv4:MAC Address mapping CMD request params. More...
 
struct  rpmsg_kdrv_ethswitch_ipv6_register_mac_request
 Register IPv6:MAC Address mapping CMD request params. More...
 
struct  rpmsg_kdrv_ethswitch_ipv4_register_mac_response
 Register IPv4:MAC Address mapping CMD response params. More...
 
struct  rpmsg_kdrv_ethswitch_ipv6_register_mac_response
 Register IPv6:MAC Address mapping CMD response params. More...
 
struct  rpmsg_kdrv_ethswitch_ipv4_unregister_mac_request
 Unregister IPv4:MAC Address mapping CMD request params. More...
 
struct  rpmsg_kdrv_ethswitch_ipv6_unregister_mac_request
 Unregister IPv6:MAC Address mapping CMD request params. More...
 
struct  rpmsg_kdrv_ethswitch_ipv4_unregister_mac_response
 Unregister IPv4:MAC Address mapping CMD response params. More...
 
struct  rpmsg_kdrv_ethswitch_ipv6_unregister_mac_response
 Unregister IPv6:MAC Address mapping CMD response params. More...
 
struct  rpmsg_kdrv_ethswitch_register_ethertype_request
 Register Ethertype CMD request params. More...
 
struct  rpmsg_kdrv_ethswitch_register_ethertype_response
 Register Ethertype CMD response params. More...
 
struct  rpmsg_kdrv_ethswitch_unregister_ethertype_request
 UnRegister Ethertype CMD request params. More...
 
struct  rpmsg_kdrv_ethswitch_unregister_ethertype_response
 UnRegister Ethertype CMD response params. More...
 
struct  rpmsg_kdrv_ethswitch_register_remotetimer_request
 Register Remote timer CMD request params. More...
 
struct  rpmsg_kdrv_ethswitch_register_remotetimer_response
 Register Remote timer CMD response params. More...
 
struct  rpmsg_kdrv_ethswitch_unregister_remotetimer_request
 UnRegister Remote timer CMD request params. More...
 
struct  rpmsg_kdrv_ethswitch_unregister_remotetimer_response
 UnRegister Remote timer CMD response params. More...
 
struct  rpmsg_kdrv_ethswitch_set_promisc_mode_request
 Set promiscuous mode CMD request params. More...
 
struct  rpmsg_kdrv_ethswitch_set_promisc_mode_response
 Set promiscuous mode CMD response params. More...
 
struct  rpmsg_kdrv_ethswitch_filter_add_mac_request
 Add multicast MAC address to receive filter CMD request params. More...
 
struct  rpmsg_kdrv_ethswitch_filter_add_mac_response
 Add multicast MAC address to receive filter CMD response params. More...
 
struct  rpmsg_kdrv_ethswitch_filter_del_mac_request
 Delete multicast MAC address from receive filter CMD request params. More...
 
struct  rpmsg_kdrv_ethswitch_filter_del_mac_response
 Delete multicast MAC address from receive filter CMD response params. More...
 
struct  rpmsg_kdrv_ethswitch_firmware_version_info
 Firmware version info returned by remote device attach to the ethernet switch device. More...
 
struct  rpmsg_kdrv_ethswitch_device_data
 Ethernet Switch Remote Device Data. More...
 
struct  rpmsg_kdrv_ethswitch_ping_request
 Ethernet Switch Remote Device Ping Request. More...
 
struct  rpmsg_kdrv_ethswitch_ping_response
 Ethernet Switch Remote Device Ping Response. More...
 
struct  rpmsg_kdrv_ethswitch_s2c_notify
 Ethernet Switch Remote Device Server to Client Notify. More...
 
struct  rpmsg_kdrv_ethswitch_c2s_notify
 Ethernet Switch Remote Device Client to Server Notify. More...
 

Functions

struct rpmsg_kdrv_ethswitch_message_header __attribute__ ((packed))
 

Enumerations

enum  rpmsg_kdrv_ethswitch_message_type {
  RPMSG_KDRV_TP_ETHSWITCH_ATTACH = 0x00, RPMSG_KDRV_TP_ETHSWITCH_ATTACH_EXT = 0x01, RPMSG_KDRV_TP_ETHSWITCH_ALLOC_TX = 0x02, RPMSG_KDRV_TP_ETHSWITCH_ALLOC_RX = 0x03,
  RPMSG_KDRV_TP_ETHSWITCH_REGISTER_DEFAULTFLOW = 0x04, RPMSG_KDRV_TP_ETHSWITCH_ALLOC_MAC = 0x05, RPMSG_KDRV_TP_ETHSWITCH_REGISTER_MAC = 0x06, RPMSG_KDRV_TP_ETHSWITCH_UNREGISTER_MAC = 0x07,
  RPMSG_KDRV_TP_ETHSWITCH_UNREGISTER_DEFAULTFLOW = 0x08, RPMSG_KDRV_TP_ETHSWITCH_FREE_MAC = 0x09, RPMSG_KDRV_TP_ETHSWITCH_FREE_TX = 0x0A, RPMSG_KDRV_TP_ETHSWITCH_FREE_RX = 0x0B,
  RPMSG_KDRV_TP_ETHSWITCH_DETACH = 0x0C, RPMSG_KDRV_TP_ETHSWITCH_IOCTL = 0x0D, RPMSG_KDRV_TP_ETHSWITCH_REGWR = 0x0E, RPMSG_KDRV_TP_ETHSWITCH_REGRD = 0x0F,
  RPMSG_KDRV_TP_ETHSWITCH_IPV4_MAC_REGISTER = 0x10, RPMSG_KDRV_TP_ETHSWITCH_IPV6_MAC_REGISTER = 0x11, RPMSG_KDRV_TP_ETHSWITCH_IPV4_MAC_UNREGISTER = 0x12, RPMSG_KDRV_TP_ETHSWITCH_IPV6_MAC_UNREGISTER = 0x13,
  RPMSG_KDRV_TP_ETHSWITCH_PING_REQUEST = 0x14, RPMSG_KDRV_TP_ETHSWITCH_S2C_NOTIFY = 0x15, RPMSG_KDRV_TP_ETHSWITCH_C2S_NOTIFY = 0x16, RPMSG_KDRV_TP_ETHSWITCH_REGISTER_ETHTYPE = 0x17,
  RPMSG_KDRV_TP_ETHSWITCH_UNREGISTER_ETHTYPE = 0x18, RPMSG_KDRV_TP_ETHSWITCH_REGISTER_REMOTEIMER = 0x19, RPMSG_KDRV_TP_ETHSWITCH_UNREGISTER_REMOTEIMER = 0x1A, RPMSG_KDRV_TP_ETHSWITCH_SET_PROMISC_MODE = 0x1B,
  RPMSG_KDRV_TP_ETHSWITCH_FILTER_ADD_MAC = 0x1C, RPMSG_KDRV_TP_ETHSWITCH_FILTER_DEL_MAC = 0x1D, RPMSG_KDRV_TP_ETHSWITCH_MAX = 0x1E
}
 Ethernet Switch Remote Device commands. More...
 
enum  rpmsg_kdrv_ethswitch_cpsw_type { RPMSG_KDRV_TP_ETHSWITCH_CPSWTYPE_MCU, RPMSG_KDRV_TP_ETHSWITCH_CPSWTYPE_MAIN, RPMSG_KDRV_TP_ETHSWITCH_CPSWTYPE_MAX }
 CPSW Type supported by Ethernet Switch Remote Device. More...
 
enum  rpmsg_kdrv_ethswitch_client_notify_type { RPMSG_KDRV_TP_ETHSWITCH_CLIENTNOTIFY_DUMPSTATS, RPMSG_KDRV_TP_ETHSWITCH_CLIENTNOTIFY_CUSTOM, RPMSG_KDRV_TP_ETHSWITCH_CLIENTNOTIFY_MAX }
 Etheret Remote Device Client to Server notify types. More...
 

Macros

#define RPMSG_KDRV_TP_ETHSWITCH_MESSAGE_DATA_LEN   (192)
 
#define RPMSG_KDRV_TP_ETHSWITCH_IOCTL_INARGS_LEN   (192)
 
#define RPMSG_KDRV_TP_ETHSWITCH_IOCTL_OUTARGS_LEN   (192)
 
#define RPMSG_KDRV_TP_ETHSWITCH_CPSW_PRIORITY_NUM   (8)
 
#define RPMSG_KDRV_TP_ETHSWITCH_MACADDRLEN   (6)
 
#define RPMSG_KDRV_TP_ETHSWITCH_IPV4ADDRLEN   (4)
 
#define RPMSG_KDRV_TP_ETHSWITCH_IPV6ADDRLEN   (16)
 
#define RPMSG_KDRV_TP_ETHSWITCH_VLAN_USE_DFLT   (0xFFFF)
 
#define RPMSG_KDRV_TP_ETHSWITCH_YEARLEN   (4)
 
#define RPMSG_KDRV_TP_ETHSWITCH_MONTHLEN   (3)
 
#define RPMSG_KDRV_TP_ETHSWITCH_DATELEN   (2)
 
#define RPMSG_KDRV_TP_ETHSWITCH_COMMITSHALEN   (8)
 

Ethernet Switch Remote Device Version Info

API version info for the ethernet switch remote device Any remote core client should check API version is compatible with this API version

#define RPMSG_KDRV_TP_ETHSWITCH_VERSION_MAJOR   (0)
 
#define RPMSG_KDRV_TP_ETHSWITCH_VERSION_MINOR   (2)
 
#define RPMSG_KDRV_TP_ETHSWITCH_VERSION_REVISION   (0)
 

Ethernet Switch Remote Device CMD response code

#define RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK   (0)
 
#define RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EAGAIN   (-1)
 
#define RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL   (-2)
 
#define RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EACCESS   (-3)
 

Ethernet Switch Remote Device CPSW IP Supported Feature Bitmask

#define RPMSG_KDRV_TP_ETHSWITCH_FEATURE_TXCSUM   (1 << 0)
 
#define RPMSG_KDRV_TP_ETHSWITCH_FEATURE_MAC_ONLY   (1 << 2)
 
#define RPMSG_KDRV_TP_ETHSWITCH_FEATURE_MC_FILTER   (1 << 3)
 

Macro Definition Documentation

◆ RPMSG_KDRV_TP_ETHSWITCH_VERSION_MAJOR

#define RPMSG_KDRV_TP_ETHSWITCH_VERSION_MAJOR   (0)

Ethernet Switch Remote Device API version major version

◆ RPMSG_KDRV_TP_ETHSWITCH_VERSION_MINOR

#define RPMSG_KDRV_TP_ETHSWITCH_VERSION_MINOR   (2)

Ethernet Switch Remote Device API version minor version

◆ RPMSG_KDRV_TP_ETHSWITCH_VERSION_REVISION

#define RPMSG_KDRV_TP_ETHSWITCH_VERSION_REVISION   (0)

Ethernet Switch Remote Device API version minor revision

◆ RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK

#define RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK   (0)

Ethernet Switch Remote Device CMD response code : Success

◆ RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EAGAIN

#define RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EAGAIN   (-1)

Ethernet Switch Remote Device CMD response code : Try again

Reponse indicates temporary failure of cmd and client can retry the cmd again

◆ RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL

#define RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL   (-2)

Ethernet Switch Remote Device CMD response code : Failure

◆ RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EACCESS

#define RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EACCESS   (-3)

Ethernet Switch Remote Device CMD response code : Failure to insufficient permission

Reponse indicates the command failed because remote core does not have sufficient privileges

◆ RPMSG_KDRV_TP_ETHSWITCH_MESSAGE_DATA_LEN

#define RPMSG_KDRV_TP_ETHSWITCH_MESSAGE_DATA_LEN   (192)

Maximum length of ethernet switch remote device message data in rpmsg_kdrv_ethswitch_ping_request

◆ RPMSG_KDRV_TP_ETHSWITCH_IOCTL_INARGS_LEN

#define RPMSG_KDRV_TP_ETHSWITCH_IOCTL_INARGS_LEN   (192)

Maximum length of input arguments for RPMSG_KDRV_TP_ETHSWITCH_IOCTL

◆ RPMSG_KDRV_TP_ETHSWITCH_IOCTL_OUTARGS_LEN

#define RPMSG_KDRV_TP_ETHSWITCH_IOCTL_OUTARGS_LEN   (192)

Maximum length of output arguments for RPMSG_KDRV_TP_ETHSWITCH_IOCTL

◆ RPMSG_KDRV_TP_ETHSWITCH_CPSW_PRIORITY_NUM

#define RPMSG_KDRV_TP_ETHSWITCH_CPSW_PRIORITY_NUM   (8)

Number of priorities supported by CPSW

◆ RPMSG_KDRV_TP_ETHSWITCH_MACADDRLEN

#define RPMSG_KDRV_TP_ETHSWITCH_MACADDRLEN   (6)

MAC Address length in octets

◆ RPMSG_KDRV_TP_ETHSWITCH_IPV4ADDRLEN

#define RPMSG_KDRV_TP_ETHSWITCH_IPV4ADDRLEN   (4)

IPv4 Address length in octets

◆ RPMSG_KDRV_TP_ETHSWITCH_IPV6ADDRLEN

#define RPMSG_KDRV_TP_ETHSWITCH_IPV6ADDRLEN   (16)

IPv6 Address length in octets

◆ RPMSG_KDRV_TP_ETHSWITCH_FEATURE_TXCSUM

#define RPMSG_KDRV_TP_ETHSWITCH_FEATURE_TXCSUM   (1 << 0)

Feature: Tx Checksum Offload Enabled

◆ RPMSG_KDRV_TP_ETHSWITCH_FEATURE_MAC_ONLY

#define RPMSG_KDRV_TP_ETHSWITCH_FEATURE_MAC_ONLY   (1 << 2)

Feature: MAC-only mode enabled

◆ RPMSG_KDRV_TP_ETHSWITCH_FEATURE_MC_FILTER

#define RPMSG_KDRV_TP_ETHSWITCH_FEATURE_MC_FILTER   (1 << 3)

Feature: Multicast filter enabled

◆ RPMSG_KDRV_TP_ETHSWITCH_VLAN_USE_DFLT

#define RPMSG_KDRV_TP_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.

◆ RPMSG_KDRV_TP_ETHSWITCH_YEARLEN

#define RPMSG_KDRV_TP_ETHSWITCH_YEARLEN   (4)

Number of octets in year

◆ RPMSG_KDRV_TP_ETHSWITCH_MONTHLEN

#define RPMSG_KDRV_TP_ETHSWITCH_MONTHLEN   (3)

Number of octets in month

◆ RPMSG_KDRV_TP_ETHSWITCH_DATELEN

#define RPMSG_KDRV_TP_ETHSWITCH_DATELEN   (2)

Number of octets in date

◆ RPMSG_KDRV_TP_ETHSWITCH_COMMITSHALEN

#define RPMSG_KDRV_TP_ETHSWITCH_COMMITSHALEN   (8)

GIT Commit SHA length in octets

Enumeration Type Documentation

◆ rpmsg_kdrv_ethswitch_message_type

Ethernet Switch Remote Device commands.

The remote device supports a set of commands. Associated with each CMD is a request_params structure that the remote device client populates The master core which hosts the remote device server processes the command and responds with response params structure associated with the command

Notify CMDs are one way messages and do not have a response param structure associated with them

Enumerator
RPMSG_KDRV_TP_ETHSWITCH_ATTACH 

CMD to attach to the ethernet switch remote device.

All remote core clients should first attach before issuing any further commands to the ethernet switch device Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_attach_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_attach_response

RPMSG_KDRV_TP_ETHSWITCH_ATTACH_EXT 

CMD to attach to the ethernet switch remote device which returns extended attach info.

All remote core clients should first attach before issuing any further commands to the ethernet switch device Remote core clients that require only a single data path can use a single RPMSG_KDRV_TP_ETHSWITCH_ATTACH_EXT command which will return all the params required to establish data path including dst mac, rx flow, tx channel. This is typically used by linux virtual mac netdev as there are no client instances on the core running linux virtual mac netdev Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_attach_extended_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_attach_extended_response

RPMSG_KDRV_TP_ETHSWITCH_ALLOC_TX 

CMD to allocate Tx channel.

The remote core should use the allocated TX channel as Tx DMA channel CPSW PSIL destination thread id when configuring the Tx DMA channel

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_alloc_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_alloc_tx_response

RPMSG_KDRV_TP_ETHSWITCH_ALLOC_RX 

CMD to allocate Rx flow.

The remote core should use the allocated Rx flow id to configure the Udma Rx flow to establish Rx data flow path on remote core

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_alloc_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_alloc_rx_response

RPMSG_KDRV_TP_ETHSWITCH_REGISTER_DEFAULTFLOW 

CMD to register default flow from remote core.

Commands allows remote core to receive traffic directed to the default flow. Default flow is the flow to which CPSW 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 master core has registered for the default flow.

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_register_rx_default_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_register_rx_default_response

RPMSG_KDRV_TP_ETHSWITCH_ALLOC_MAC 

CMD to allocate a DST MAC addr to the remote core client.

Commands allows remote core client to allocate a host port destination mac address which it can register using RPMSG_KDRV_TP_ETHSWITCH_REGISTER_MAC

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_alloc_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_alloc_mac_response

RPMSG_KDRV_TP_ETHSWITCH_REGISTER_MAC 

CMD to register a DST MAC addr by the remote core client to a specific rx flow id.

Commands allows remote core 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

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_register_mac_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_register_mac_response

RPMSG_KDRV_TP_ETHSWITCH_UNREGISTER_MAC 

CMD to unregister a DST MAC addr by the remote core client.

This is inverse operation of RPMSG_KDRV_TP_ETHSWITCH_REGISTER_MAC and disables the routing of traffic with given destination mac addr to a specific rx flow id. Once unregistered further traffic with the given destination mac addr will be routed to default rx flow

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_unregister_mac_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_unregister_mac_response

RPMSG_KDRV_TP_ETHSWITCH_UNREGISTER_DEFAULTFLOW 

CMD to unregister default flow routing to the remote core.

This is inverse operation of RPMSG_KDRV_TP_ETHSWITCH_REGISTER_DEFAULTFLOW and disables the routing of default flow traffic to the given rx flow id Once default flow is unregistered all traffic destined to default flow will be routed to reserved flow and will be dropped

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_unregister_rx_default_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_unregister_rx_default_response

RPMSG_KDRV_TP_ETHSWITCH_FREE_MAC 

CMD to free previously allocated mac addr.

This is inverse operation of RPMSG_KDRV_TP_ETHSWITCH_ALLOC_MAC and frees the previously allocated MAC addr

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_free_mac_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_free_mac_response

RPMSG_KDRV_TP_ETHSWITCH_FREE_TX 

CMD to free previously allocated tx channel CPSW PSIL destination thread.

This is inverse operation of RPMSG_KDRV_TP_ETHSWITCH_ALLOC_TX and frees the previously allocated TX Channels PSIL destination thread

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_free_tx_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_free_tx_response

RPMSG_KDRV_TP_ETHSWITCH_FREE_RX 

CMD to free previously allocated rx flow id.

This is inverse operation of RPMSG_KDRV_TP_ETHSWITCH_ALLOC_RX and frees the previously allocated Rx flow id

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_free_rx_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_free_rx_response

RPMSG_KDRV_TP_ETHSWITCH_DETACH 

CMD to detach remote core from the ethernet switch device.

This is inverse operation of RPMSG_KDRV_TP_ETHSWITCH_ATTACH/RPMSG_KDRV_TP_ETHSWITCH_ATTACH_EXT All resources allocated to the remote core like Tx Ch, Rx Flow, Mac Addr are freed by the master core

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_detach_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_detach_response

RPMSG_KDRV_TP_ETHSWITCH_IOCTL 

CMD to invoke CPSW LLD IOCTL from remote core.

Command allows invocation of any CPSW LLD IOCTL from the remote core The master core will check if the remote core has permission to invoke the specific IOCTL CMD and IOCTL cmd may fail if remote core does not have the required permission

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_ioctl_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_ioctl_response

RPMSG_KDRV_TP_ETHSWITCH_REGWR 

CMD to write to a specific register from remote core.

Command allows remote core to write a specific register. Master core will check if remote core is permitted to perform register write and will allow register write only if permitted

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_regwr_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_regwr_response

RPMSG_KDRV_TP_ETHSWITCH_REGRD 

CMD to read from a specific register from remote core.

Command allows remote core to read a specific register. Master core will check if remote core is permitted to perform register read and will allow register write only if permitted

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_regrd_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_regrd_response

RPMSG_KDRV_TP_ETHSWITCH_IPV4_MAC_REGISTER 

CMD to associate IPv4 address with MAC address.

Command allows remote 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 master 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 registers its IP address: MAC address with the master core using this CMD

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_ipv4_register_mac_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_ipv4_register_mac_response

RPMSG_KDRV_TP_ETHSWITCH_IPV6_MAC_REGISTER 

CMD to associate IPv6 address with MAC address.

Command allows remote core to register IPV6 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 master 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 registers its <IP address: MAC address> with the master core using this CMD

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_ipv6_register_mac_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_ipv6_register_mac_response

RPMSG_KDRV_TP_ETHSWITCH_IPV4_MAC_UNREGISTER 

CMD to remove IPv4 address: MAC address mapping.

Command removes ARP entry of IP address: MAC addres mapping. This is inverse operation of RPMSG_KDRV_TP_ETHSWITCH_IPV4_MAC_REGISTER

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_ipv4_unregister_mac_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_ipv4_unregister_mac_response

RPMSG_KDRV_TP_ETHSWITCH_IPV6_MAC_UNREGISTER 

CMD to remove IPv6 address: MAC address mapping.

Command removes ARP entry of IP address: MAC addres mapping. This is inverse operation of RPMSG_KDRV_TP_ETHSWITCH_IPV6_MAC_REGISTER

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_ipv6_unregister_mac_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_ipv6_unregister_mac_response

RPMSG_KDRV_TP_ETHSWITCH_PING_REQUEST 

CMD to request remote device to respond to ping request from client.

Command to request remote device server running on master core to respond to ping request. The server will copy the ping msg sent by client and send back ping response. This cmd is primarily used for debug/heartbeat check purpose

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_ping_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_ping_response

RPMSG_KDRV_TP_ETHSWITCH_S2C_NOTIFY 

Notify CMD from remote device server to client.

Notify commands are remote device commands that do not require acknowledgement. This is a notify cmd from server to client. The server runs on master core and client runs on remote cores

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_s2c_notify Response Message (Sent from server to client): NONE (Notify commands do nto have any response)

RPMSG_KDRV_TP_ETHSWITCH_C2S_NOTIFY 

Notify CMD from remote device client to server.

Notify commands are remote device commands that do not require acknowledgement. This is a notify cmd from client to server. The server runs on master core and client runs on remote cores

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_c2s_notify Response Message (Sent from server to client): NONE (Notify commands do nto have any response)

RPMSG_KDRV_TP_ETHSWITCH_REGISTER_ETHTYPE 

CMD to register a Ethertype by the remote core client to a specific rx flow id.

Commands allows remote core client to register all traffic received on the host port with a specific ethertype to be routed to the given rx flow id

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_register_ethertype_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_register_ethertype_response

RPMSG_KDRV_TP_ETHSWITCH_UNREGISTER_ETHTYPE 

CMD to unregister a Ethertype by the remote core client.

This is inverse operation of RPMSG_KDRV_TP_ETHSWITCH_REGISTER_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

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_unregister_ethertype_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_unregister_ethertype_response

RPMSG_KDRV_TP_ETHSWITCH_REGISTER_REMOTEIMER 

CMD to register a remote timer with ethfw for time synchronization.

Commands allows remote core client to register a timer used by it to be synchronized with CPTS timer using timer sync router and hardware push events

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_register_remotetimer_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_register_remotetimer_response

RPMSG_KDRV_TP_ETHSWITCH_UNREGISTER_REMOTEIMER 

CMD to unregister remote timer with ethfw for time synchronization.

Commands allows remote core client to unregister a timer used by for synchronization with CPTS timer

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_unregister_remotetimer_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_unregister_remotetimer_response

RPMSG_KDRV_TP_ETHSWITCH_SET_PROMISC_MODE 

CMD to set promiscuous mode.

Commands allows remote core client to set promiscuous mode

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_set_promisc_mode_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_set_promisc_mode_response

RPMSG_KDRV_TP_ETHSWITCH_FILTER_ADD_MAC 

CMD to add multicast MAC address to receive filter.

Commands allows remote core client to add a multicast address to receive filter

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_filter_add_mac_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_filter_add_mac_response

RPMSG_KDRV_TP_ETHSWITCH_FILTER_DEL_MAC 

CMD to delete multicast MAC address to receive filter.

Commands allows remote core client to delete a multicast address from receive filter

Command parameters: Request Message (Sent from client to server): struct rpmsg_kdrv_ethswitch_filter_del_mac_request Response Message (Sent from server to client): struct rpmsg_kdrv_ethswitch_filter_del_mac_response

RPMSG_KDRV_TP_ETHSWITCH_MAX 

Max value of Ethernet Switch Remote Device. For internal use only.

◆ rpmsg_kdrv_ethswitch_cpsw_type

CPSW Type supported by Ethernet Switch Remote Device.

Enumerator
RPMSG_KDRV_TP_ETHSWITCH_CPSWTYPE_MCU 

Etheret Remote Device CPSW Type : CPSW2G (2 port switch)

RPMSG_KDRV_TP_ETHSWITCH_CPSWTYPE_MAIN 

Etheret Remote Device CPSW Type : CPSW5G or 9G (5 or 9 port switch)

RPMSG_KDRV_TP_ETHSWITCH_CPSWTYPE_MAX 

Max Etheret Remote Device CPSW Type. For internal use

◆ rpmsg_kdrv_ethswitch_client_notify_type

Etheret Remote Device Client to Server notify types.

Enumerator
RPMSG_KDRV_TP_ETHSWITCH_CLIENTNOTIFY_DUMPSTATS 

Client to server notify command to dump CPSW stats on master core UART console

RPMSG_KDRV_TP_ETHSWITCH_CLIENTNOTIFY_CUSTOM 

Client to server notify command that is app specific. Application on server will receive callback and can typecast the notify info to handle the notify

RPMSG_KDRV_TP_ETHSWITCH_CLIENTNOTIFY_MAX 

Client to server notify command max. For internal use

Function Documentation

◆ __attribute__()

struct rpmsg_kdrv_ethswitch_c2s_notify __attribute__ ( (packed)  )