![]() |
ETHFW API Guide
|
This section contains APIs for Ethernet Switch Remote Device Server APIs.
The ethernet switch remote device server resides on the master core and enables clients on remote cores to configure the Ethernet Switch
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... | |
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... | |
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" |
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) |
| #define ETHREMOTECFG_SERVER_MAX_NAME_LEN (128) |
Max length of ethernet switch remote device exported name.
The Remote Device Server advertises a name to each of the remote cores it supports connecting to the server.
| #define ETHREMOTECFG_SERVER_MAX_INSTANCES (4) |
Max number of remote clients supported by ethernet switch remote device server
| #define ETHREMOTEDEVICE_REMOTEDEVICE_FRAMEWORK_SERVICE "rpmsg-kdrv" |
Service name of the remote device framework
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_ATTACH
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| cpsw | type CPSW TYPE of type enum rpmsg_kdrv_ethswitch_cpsw_type |
| pId | Pointer to Unique Opaque Handle populated by callback handler |
| pCoreKey | Pointer to Core key populated by callback handler |
| pRxMtu | Pointer to Maximum receive packet length . Populated by callback handler |
| pTxMtu | Array of Maximum transmit packet length per priority supported by ethernet switch |
| txMtuArraySize | Number of priority supported |
| pFeatures | Pointer to feature bitmap. Bitmask of type RPMSG_KDRV_TP_ETHSWITCH_FEATURE_xxx |
| pMacOnlyPort | MAC-only port number (1-based). 0 for non MAC only ports. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_ATTACH_EXT
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| cpsw | type CPSW TYPE of type enum rpmsg_kdrv_ethswitch_cpsw_type |
| pId | Pointer to Unique Opaque Handle populated by callback handler |
| pCoreKey | Pointer to Core key populated by callback handler |
| pRxMtu | Pointer to Maximum receive packet length . Populated by callback handler |
| pTxMtu | Array of Maximum transmit packet length per priority supported by ethernet switch |
| txMtuArraySize | Number of priority supported |
| pFeatures | Pointer to feature bitmap. Bitmask of type RPMSG_KDRV_TP_ETHSWITCH_FEATURE_xxx |
| pAllocFlowIdx | Pointer to allocated Rx Flow Index populated by callback handler |
| pTxCpswPsilDstId | Pointer to allocated Tx Channel CPSW PSIL destination thread id populated by callback handler |
| macAddress | Pointer to allocated destination mac address allocated to remote core populated by callback handler |
| pMacOnlyPort | MAC-only port number (1-based). 0 for non MAC only ports. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_ALLOC_TX
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| pTxCpswPsilDstId | Pointer to allocated Tx Channel CPSW PSIL destination thread id populated by callback handler |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_ALLOC_RX
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| pAllocFlowIdx | Pointer to allocated Rx Flow Index populated by callback handler |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_ALLOC_MAC
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| macAddress | Pointer to allocated destination mac address allocated to remote core populated by callback handler |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_REGISTER_MAC
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| macAddress | Destination mac address to be registered |
| flow_idx | Rx Flow Index to eb associated with the destination MAC address |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_UNREGISTER_MAC
| virtPort | Virtual port id. |
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| macAddress | Destination mac address to be unregistered |
| flow_idx | Rx Flow Index to eb disassociated with the destination MAC address |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_REGISTER_DEFAULTFLOW
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| flow_idx | Rx Flow Index to which default flow traffic will be routed |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_UNREGISTER_DEFAULTFLOW
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| flow_idx | Rx Flow Index to which default flow mapping is to be removed. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_FREE_TX
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| tx_cpsw_psil_dst_id | Allocated Tx Channel CPSW PSIL destination thread id to be freed |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_FREE_RX
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| alloc_flow_idx | Allocated Rx Flow Index to be freed |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_FREE_MAC
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| mac_address | Destination mac address to be freed |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| typedef int32_t(* ethrdev_srv_cb_detach_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint64_t handle, uint32_t core_key) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_DETACH
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_IOCTL
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| cmd | IOCTL id supported by CPSW LLD. Refer CPSW LLD documentation for list of CPSW LLD IOCTLs |
| inargs | CPSW IOCTL CMD input arguments .Byte array is typecast to the inArgs structure associated with the IOCTL |
| inargs_len | CPSW IOCTL CMD input arguments length |
| outargs | CPSW IOCTL CMD output arguments .Byte array is typecast to the outArgs structure associated with the IOCTL. Populated by callback handler |
| outargs_len | CPSW IOCTL CMD output arguments length |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_REGWR
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| regaddr | Register address to be written to |
| regval | Register value to be written |
| pRegval | Pointer to register value after register write. Populated by callback handler |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| typedef int32_t(* ethrdev_srv_cb_regrd_handler_t) (EthRemoteCfg_VirtPort virtPort, uint32_t host_id, uint32_t regaddr, uint32_t *pRegval) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_REGRD
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| regaddr | Register address to be read from |
| pRegval | Pointer to register value read from regaddr. Populated by callback handler |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_IPV4_MAC_REGISTER
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| mac_address | Destination mac address with which the IPv4 address will be associated in the ARP database |
| ipv4_addr | IPv4 address to be added in the ARP database with associated MAC address |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_IPV6_MAC_REGISTER
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| mac_address | Destination mac address with which the IPv6 address will be associated in the ARP database |
| ipv6_addr | IPv6 address to be added in the ARP database with associated MAC address |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_IPV4_MAC_UNREGISTER
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| ipv4_addr | IPv4 address to be removed from the ARP database |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_IPV6_MAC_UNREGISTER
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| ipv6_addr | IPv6 address to be removed from the ARP database |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_C2S_NOTIFY
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| notifyid | Client to server notify id of type enum rpmsg_kdrv_ethswitch_client_notify_type |
| notify_info | Notify info associated with the notify id |
| notify_info_len | Notify info length |
| 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) |
Server Callback Handler for Remote Device Framework Device attach
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| eth_dev_data | Ethernet Switch Remote Device Data to be populated by the callback handler |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_REGISTER_ETHTYPE
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| ether_type | Ethertype to be registered |
| flow_idx | Rx Flow Index to eb associated with the destination MAC address |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_UNREGISTER_ETHTYPE
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| ether_type | Ethertype to be unregistered |
| flow_idx | Rx Flow Index to eb disassociated with the destination MAC address |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_REGISTER_REMOTEIMER
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| name | Remote Core name |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| timer_id | Timer to be registered with CPTS for time synchronization |
| hwPushNum | CPTS hardware push number used for time synchronization |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_UNREGISTER_REMOTEIMER
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| name | Remote Core name |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| hwPushNum | CPTS hardware push number used for time synchronization |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_SET_PROMISC_MODE
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| enable | Promiscuous mode (enable or disable) |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_FILTER_ADD_MAC
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| macAddress | Destination mac address to be added to the receive filter |
| vlan_id | VLAN Id |
| flow_idx | Rx Flow Index for which the multicast MAC association will be added |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| 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) |
Server Callback Handler for RPMSG_KDRV_TP_ETHSWITCH_FILTER_DEL_MAC
| virtPort | Virtual port id. |
| host_id | Remote Core Id |
| handle | Unique Opaque Handle returned by attach / attach ext CMD |
| core_key | Core key returned by attach / attach ext CMD |
| macAddress | Destination mac address to be deleted from the receive filter |
| vlan_id | VLAN Id |
| flow_idx | Rx Flow Index for which the multicast MAC association will be deleted |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | Error allocating response message or sending message. |
| union rdevEthSwitchServerMessageList_u __attribute__ | ( | (packed) | ) |
Union of all ethswitch remote device messages. Used internally in the server/client implementation.
|
static |
Set EThernet Switch Remote Server init parameters to default state.
Recommend to call this API before callnig rdevEthSwitchServerInit.
| prm | [out] Parameters set to default |
| int32_t rdevEthSwitchServerInit | ( | rdevEthSwitchServerInitPrm_t * | prm | ) |
Initialize ethernet switch remote device instance.
| prm | [in] Initialization parameters |