ETHFW API Guide
ethremotecfg_server.h File Reference

Go to the source code of this file.

Data Structures

struct  rdevEthSwitchServerInstPrm_t
 Ethernet Switch Remote device server instance initialization parameters. More...
 
struct  rdevEthSwitchServerCbFxn_t
 Ethernet Switch Remote Device Server Callback function table. More...
 
struct  rdevEthSwitchServerInitPrm_t
 Ethernet Switch Remote device server instance initialization parameters. More...
 
union  rdevEthSwitchServerMessageList_u
 Union of all ethswitch remote device messages. Used internally in the server/client implementation. More...
 

Macros

#define ETHREMOTECFG_SERVER_MAX_NAME_LEN   (128)
 Max length of ethernet switch remote device exported name. More...
 
#define ETHREMOTECFG_SERVER_MAX_INSTANCES   (4)
 
#define ETHREMOTEDEVICE_REMOTEDEVICE_FRAMEWORK_SERVICE   "rpmsg-kdrv"
 

Typedefs

Ethernet Switch Remote Device Server App Callback function pointers

On recieving a ethernet switch remote device command from a remote core, the server will invoke application registered callback for each CMD

typedef int32_t(* ethrdev_srv_cb_attach_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint8_t cpsw_type, uint64_t *pId, uint32_t *pCoreKey, uint32_t *pRxMtu, uint32_t *pTxMtu, uint32_t txMtuArraySize, uint32_t *pFeatures, uint32_t *pMacOnlyPort)
 
typedef int32_t(* ethrdev_srv_cb_attach_ext_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint8_t cpsw_type, uint64_t *pId, uint32_t *pCoreKey, uint32_t *pRxMtu, uint32_t *pTxMtu, uint32_t txMtuArraySize, uint32_t *pFeatures, uint32_t *pAllocFlowIdx, uint32_t *pTxCpswPsilDstId, uint8_t *macAddress, uint32_t *pMacOnlyPort)
 
typedef int32_t(* ethrdev_srv_cb_alloc_tx_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint64_t handle, uint32_t core_key, uint32_t *pTxCpswPsilDstId)
 
typedef int32_t(* ethrdev_srv_cb_alloc_rx_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint64_t handle, uint32_t core_key, uint32_t *pAllocFlowIdx)
 
typedef int32_t(* ethrdev_srv_cb_alloc_mac_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint64_t handle, uint32_t core_key, uint8_t *mac_address)
 
typedef int32_t(* ethrdev_srv_cb_register_mac_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint64_t handle, uint32_t core_key, uint8_t *mac_address, uint32_t flow_idx)
 
typedef int32_t(* ethrdev_srv_cb_unregister_mac_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint64_t handle, uint32_t core_key, uint8_t *mac_address, uint32_t flow_idx)
 
typedef int32_t(* ethrdev_srv_cb_register_rx_default_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint64_t handle, uint32_t core_key, uint32_t flow_idx)
 
typedef int32_t(* ethrdev_srv_cb_unregister_rx_default_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint64_t handle, uint32_t core_key, uint32_t flow_idx)
 
typedef int32_t(* ethrdev_srv_cb_free_tx_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint64_t handle, uint32_t core_key, uint32_t tx_cpsw_psil_dst_id)
 
typedef int32_t(* ethrdev_srv_cb_free_rx_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint64_t handle, uint32_t core_key, uint32_t alloc_flow_idx)
 
typedef int32_t(* ethrdev_srv_cb_free_mac_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint64_t handle, uint32_t core_key, u8 *mac_address)
 
typedef int32_t(* ethrdev_srv_cb_detach_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint64_t handle, uint32_t core_key)
 
typedef int32_t(* ethrdev_srv_cb_ioctl_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint64_t handle, uint32_t core_key, u32 cmd, const u8 *inargs, u32 inargs_len, u8 *outargs, uint32_t outargs_len)
 
typedef int32_t(* ethrdev_srv_cb_regwr_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint32_t regaddr, uint32_t regval, uint32_t *pRegval)
 
typedef int32_t(* ethrdev_srv_cb_regrd_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint32_t regaddr, uint32_t *pRegval)
 
typedef int32_t(* ethrdev_srv_cb_register_ipv4_mac_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint64_t handle, uint32_t core_key, uint8_t *mac_address, uint8_t *ipv4_addr)
 
typedef int32_t(* ethrdev_srv_cb_register_ipv6_mac_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint64_t handle, uint32_t core_key, uint8_t *mac_address, uint8_t *ipv6_addr)
 
typedef int32_t(* ethrdev_srv_cb_unregister_ipv4_mac_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint64_t handle, uint32_t core_key, uint8_t *ipv4_addr)
 
typedef int32_t(* ethrdev_srv_cb_unregister_ipv6_mac_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint64_t handle, uint32_t core_key, uint8_t *ipv6_addr)
 
typedef void(* ethrdev_srv_cb_client_notify_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint64_t handle, uint32_t core_key, enum rpmsg_kdrv_ethswitch_client_notify_type notifyid, uint8_t *notify_info, uint32_t notify_info_len)
 
typedef void(* ethrdev_srv_cb_init_device_data_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, struct rpmsg_kdrv_ethswitch_device_data *eth_dev_data)
 
typedef int32_t(* ethrdev_srv_cb_register_ethertype_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint64_t handle, uint32_t core_key, uint16_t ether_type, uint32_t flow_idx)
 
typedef int32_t(* ethrdev_srv_cb_unregister_ethertype_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint64_t handle, uint32_t core_key, uint16_t ether_type, uint32_t flow_idx)
 
typedef int32_t(* ethrdev_srv_cb_register_remotetimer_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint8_t *name, uint64_t handle, uint32_t core_key, uint8_t timer_id, uint8_t hwPushNum)
 
typedef int32_t(* ethrdev_srv_cb_unregister_remotetimer_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint8_t *name, uint64_t handle, uint32_t core_key, uint8_t hwPushNum)
 
typedef int32_t(* ethrdev_srv_cb_set_promisc_mode_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint64_t handle, uint32_t core_key, uint32_t enable)
 
typedef int32_t(* ethrdev_srv_cb_filter_add_mac_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint64_t handle, uint32_t core_key, uint8_t *mac_address, uint16_t vlan_id, uint32_t flow_idx)
 
typedef int32_t(* ethrdev_srv_cb_filter_del_mac_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint64_t handle, uint32_t core_key, uint8_t *mac_address, uint16_t vlan_id, uint32_t flow_idx)
 

Functions

union rdevEthSwitchServerMessageList_u __attribute__ ((packed)) rdevEthSwitchServerMessageList_t
 Union of all ethswitch remote device messages. Used internally in the server/client implementation. More...
 
static void rdevEthSwitchServerInitPrmSetDefault (rdevEthSwitchServerInitPrm_t *prm)
 Set EThernet Switch Remote Server init parameters to default state. More...
 
int32_t rdevEthSwitchServerInit (rdevEthSwitchServerInitPrm_t *prm)
 Initialize ethernet switch remote device instance. More...
 

Variables

struct rpmsg_kdrv_ethswitch_attach_request attach_req
 
struct rpmsg_kdrv_ethswitch_attach_response attach_res
 
struct rpmsg_kdrv_ethswitch_attach_extended_request attach_ext_req
 
struct rpmsg_kdrv_ethswitch_attach_extended_response attach_ext_res
 
struct rpmsg_kdrv_ethswitch_alloc_request alloc_req
 
struct rpmsg_kdrv_ethswitch_alloc_rx_response alloc_rx_res
 
struct rpmsg_kdrv_ethswitch_alloc_tx_response alloc_tx_res
 
struct rpmsg_kdrv_ethswitch_alloc_mac_response alloc_mac_res
 
struct rpmsg_kdrv_ethswitch_register_mac_request register_mac_req
 
struct rpmsg_kdrv_ethswitch_register_mac_response register_mac_res
 
struct rpmsg_kdrv_ethswitch_unregister_mac_request unregister_mac_req
 
struct rpmsg_kdrv_ethswitch_unregister_mac_response unregister_mac_res
 
struct rpmsg_kdrv_ethswitch_register_rx_default_request register_rx_default_req
 
struct rpmsg_kdrv_ethswitch_register_rx_default_response register_rx_default_res
 
struct rpmsg_kdrv_ethswitch_unregister_rx_default_request unregister_rx_default_req
 
struct rpmsg_kdrv_ethswitch_unregister_rx_default_response unregister_rx_default_res
 
struct rpmsg_kdrv_ethswitch_free_mac_request free_mac_req
 
struct rpmsg_kdrv_ethswitch_free_mac_response free_mac_res
 
struct rpmsg_kdrv_ethswitch_free_tx_request free_tx_req
 
struct rpmsg_kdrv_ethswitch_free_tx_response free_tx_res
 
struct rpmsg_kdrv_ethswitch_free_rx_request free_rx_req
 
struct rpmsg_kdrv_ethswitch_free_rx_response free_rx_res
 
struct rpmsg_kdrv_ethswitch_detach_request detach_req
 
struct rpmsg_kdrv_ethswitch_detach_response detach_res
 
struct rpmsg_kdrv_ethswitch_ioctl_request ioctl_req
 
struct rpmsg_kdrv_ethswitch_ioctl_response ioctl_res
 
struct rpmsg_kdrv_ethswitch_regwr_request regwr_req
 
struct rpmsg_kdrv_ethswitch_regwr_response regwr_res
 
struct rpmsg_kdrv_ethswitch_regrd_request regrd_req
 
struct rpmsg_kdrv_ethswitch_regrd_response regrd_res
 
struct rpmsg_kdrv_ethswitch_device_data device_data
 
struct rpmsg_kdrv_ethswitch_ping_request ping_req
 
struct rpmsg_kdrv_ethswitch_ping_response ping_res
 
struct rpmsg_kdrv_ethswitch_ipv4_register_mac_request ipv4_register_mac_req
 
struct rpmsg_kdrv_ethswitch_ipv4_register_mac_response ipv4_register_mac_res
 
struct rpmsg_kdrv_ethswitch_ipv6_register_mac_request ipv6_register_mac_req
 
struct rpmsg_kdrv_ethswitch_ipv6_register_mac_response ipv6_register_mac_res
 
struct rpmsg_kdrv_ethswitch_ipv4_unregister_mac_request ipv4_unregister_mac_req
 
struct rpmsg_kdrv_ethswitch_ipv4_unregister_mac_response ipv4_unregister_mac_res
 
struct rpmsg_kdrv_ethswitch_s2c_notify s2c_notify
 
struct rpmsg_kdrv_ethswitch_c2s_notify c2s_notify
 
struct rpmsg_kdrv_ethswitch_register_ethertype_request register_ethertype_req
 
struct rpmsg_kdrv_ethswitch_register_ethertype_response register_ethertype_res
 
struct rpmsg_kdrv_ethswitch_unregister_ethertype_request unregister_ethertype_req
 
struct rpmsg_kdrv_ethswitch_unregister_ethertype_response unregister_ethertype_res
 
struct rpmsg_kdrv_ethswitch_register_remotetimer_request register_remotetimer_req
 
struct rpmsg_kdrv_ethswitch_register_remotetimer_response register_remotetimer_res
 
struct rpmsg_kdrv_ethswitch_unregister_remotetimer_request unregister_remotetimer_req
 
struct rpmsg_kdrv_ethswitch_unregister_remotetimer_response unregister_remotetimer_res
 
struct rpmsg_kdrv_ethswitch_set_promisc_mode_request set_promisc_mode_req
 
struct rpmsg_kdrv_ethswitch_set_promisc_mode_response set_promisc_mode_res
 
struct rpmsg_kdrv_ethswitch_filter_add_mac_request filter_add_mac_req
 
struct rpmsg_kdrv_ethswitch_filter_add_mac_response filter_add_mac_res
 
struct rpmsg_kdrv_ethswitch_filter_del_mac_request filter_del_mac_req
 
struct rpmsg_kdrv_ethswitch_filter_del_mac_response filter_del_mac_res
 

Variable Documentation

◆ attach_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_ATTACH command. Sent from client to server

◆ attach_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_ATTACH command . Reply from server to client

◆ attach_ext_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_ATTACH_EXT command. Sent from client to server

◆ attach_ext_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_ATTACH_EXT command . Reply from server to client

◆ alloc_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_ALLOC_TX/RPMSG_KDRV_TP_ETHSWITCH_ALLOC_RX/RPMSG_KDRV_TP_ETHSWITCH_ALLOC_MAC command. Sent from client to server

◆ alloc_rx_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_ALLOC_RX command . Reply from server to client

◆ alloc_tx_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_ALLOC_TX command . Reply from server to client

◆ alloc_mac_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_ALLOC_MAC command . Reply from server to client

◆ register_mac_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_REGISTER_MAC command. Sent from client to server

◆ register_mac_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_REGISTER_MAC command. Reply from server to client

◆ unregister_mac_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_UNREGISTER_MAC command. Sent from client to server

◆ unregister_mac_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_UNREGISTER_MAC command. Reply from server to client

◆ register_rx_default_req

struct rpmsg_kdrv_ethswitch_register_rx_default_request register_rx_default_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_REGISTER_DEFAULTFLOW command. Sent from client to server

◆ register_rx_default_res

struct rpmsg_kdrv_ethswitch_register_rx_default_response register_rx_default_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_REGISTER_DEFAULTFLOW command. Reply from server to client

◆ unregister_rx_default_req

struct rpmsg_kdrv_ethswitch_unregister_rx_default_request unregister_rx_default_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_UNREGISTER_DEFAULTFLOW command. Sent from client to server

◆ unregister_rx_default_res

struct rpmsg_kdrv_ethswitch_unregister_rx_default_response unregister_rx_default_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_UNREGISTER_DEFAULTFLOW command. Reply from server to client

◆ free_mac_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_FREE_MAC command. Sent from client to server

◆ free_mac_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_FREE_MAC command. Reply from server to client

◆ free_tx_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_FREE_TX command. Sent from client to server

◆ free_tx_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_FREE_TX command. Reply from server to client

◆ free_rx_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_FREE_RX command. Sent from client to server

◆ free_rx_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_FREE_RX command. Reply from server to client

◆ detach_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_DETACH command. Sent from client to server

◆ detach_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_DETACH command. Reply from server to client

◆ ioctl_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_IOCTL command. Sent from client to server

◆ ioctl_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_IOCTL command. Reply from server to client

◆ regwr_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_REGWR command. Sent from client to server

◆ regwr_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_REGWR command. Reply from server to client

◆ regrd_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_REGRD command. Sent from client to server

◆ regrd_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_REGRD command. Reply from server to client

◆ device_data

Request Message associated with Remote Device Framework device attach command. Sent from server to client

◆ ping_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_PING_REQUEST command. Sent from client to server

◆ ping_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_PING_REQUEST command. Reply from server to client

◆ ipv4_register_mac_req

struct rpmsg_kdrv_ethswitch_ipv4_register_mac_request ipv4_register_mac_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_IPV4_MAC_REGISTER command. Sent from client to server

◆ ipv4_register_mac_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_IPV4_MAC_REGISTER command. Reply from server to client

◆ ipv6_register_mac_req

struct rpmsg_kdrv_ethswitch_ipv6_register_mac_request ipv6_register_mac_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_IPV6_MAC_REGISTER command. Sent from client to server

◆ ipv6_register_mac_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_IPV6_MAC_REGISTER command. Reply from server to client

◆ ipv4_unregister_mac_req

struct rpmsg_kdrv_ethswitch_ipv4_unregister_mac_request ipv4_unregister_mac_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_IPV4_MAC_UNREGISTER command. Sent from client to server

◆ ipv4_unregister_mac_res

struct rpmsg_kdrv_ethswitch_ipv4_unregister_mac_response ipv4_unregister_mac_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_IPV4_MAC_UNREGISTER command. Reply from server to client

◆ s2c_notify

Message associated with Server to Client Notify CMD

◆ c2s_notify

Message associated with Client to Server Notify CMD

◆ register_ethertype_req

struct rpmsg_kdrv_ethswitch_register_ethertype_request register_ethertype_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_REGISTER_ETHTYPE command. Sent from client to server

◆ register_ethertype_res

struct rpmsg_kdrv_ethswitch_register_ethertype_response register_ethertype_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_REGISTER_ETHTYPE command. Sent from server to client

◆ unregister_ethertype_req

struct rpmsg_kdrv_ethswitch_unregister_ethertype_request unregister_ethertype_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_UNREGISTER_ETHTYPE command. Sent from client to server

◆ unregister_ethertype_res

struct rpmsg_kdrv_ethswitch_unregister_ethertype_response unregister_ethertype_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_UNREGISTER_ETHTYPE command. Sent from server to client

◆ register_remotetimer_req

struct rpmsg_kdrv_ethswitch_register_remotetimer_request register_remotetimer_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_REGISTER_REMOTEIMER command. Sent from client to server

◆ register_remotetimer_res

struct rpmsg_kdrv_ethswitch_register_remotetimer_response register_remotetimer_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_REGISTER_REMOTEIMER command. Sent from server to client

◆ unregister_remotetimer_req

struct rpmsg_kdrv_ethswitch_unregister_remotetimer_request unregister_remotetimer_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_UNREGISTER_REMOTEIMER command. Sent from client to server

◆ unregister_remotetimer_res

struct rpmsg_kdrv_ethswitch_unregister_remotetimer_response unregister_remotetimer_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_UNREGISTER_REMOTEIMER command. Sent from server to client

◆ set_promisc_mode_req

struct rpmsg_kdrv_ethswitch_set_promisc_mode_request set_promisc_mode_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_SET_PROMISC_MODE command. Sent from client to server

◆ set_promisc_mode_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_SET_PROMISC_MODE command. Sent from server to client

◆ filter_add_mac_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_FILTER_ADD_MAC command. Sent from client to server

◆ filter_add_mac_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_FILTER_ADD_MAC command. Sent from server to client

◆ filter_del_mac_req

Request Message associated with RPMSG_KDRV_TP_ETHSWITCH_FILTER_DEL_MAC command. Sent from client to server

◆ filter_del_mac_res

Response Message associated with RPMSG_KDRV_TP_ETHSWITCH_FILTER_DEL_MAC command. Sent from server to client