![]() |
ETHFW API Guide
|
This section contains APIs for Ethernet Switch Remote Device Client APIs.
The ethernet switch remote device client resides on different remote cores. The client attach to the ethernet switch remote device server using the remote device framework Once connected to the server the client can configure the ethernet switch using the client APIs
Data Structures | |
| struct | rdevEthSwitchClientInitPrms_t |
| Ethernet Switch Remote Device Client Device Connect params. More... | |
Functions | |
| int32_t | rdevEthSwitchClient_connect (rdevEthSwitchClientInitPrms_t *initPrms) |
| Connect to Ethernet Switch Remote Device. More... | |
| int32_t | rdevEthSwitchClient_disconnect (uint32_t device_id) |
| Disconnect to Ethernet Switch Remote Device. More... | |
| int32_t | rdevEthSwitchClient_sendping (uint32_t device_id, char *ping_msg, uint32_t ping_len, char *respMsg, uint32_t respMaxLen) |
| Send Ping to Ethernet Switch Remote Device. More... | |
| int32_t | rdevEthSwitchClient_ipv4macunregister (uint32_t device_id, uint64_t id, uint32_t core_key, uint8_t *ipv4_address) |
| Unregister association of IPv4 address with MAC address by removing ARP entry in the master core. More... | |
| int32_t | rdevEthSwitchClient_ipv6macregister (uint32_t device_id, uint64_t id, uint32_t core_key, uint8_t *mac_address, uint8_t *ipv6_address) |
| Register association of IPv6 address with MAC address by adding ARP entry in the master core. More... | |
| int32_t | rdevEthSwitchClient_ipv4macregister (uint32_t device_id, uint64_t id, uint32_t core_key, uint8_t *mac_address, uint8_t *ipv4_address) |
| Register association of IPv4 address with MAC address by adding ARP entry in the master core. More... | |
| int32_t | rdevEthSwitchClient_regrd (uint32_t device_id, uint32_t regaddr, uint32_t *pregval) |
| Register Read Function. More... | |
| int32_t | rdevEthSwitchClient_regwr (uint32_t device_id, uint32_t regaddr, uint32_t regval, uint32_t *post_wr_regval) |
| Register Write Function. More... | |
| int32_t | rdevEthSwitchClient_ioctl (uint32_t device_id, uint64_t id, uint32_t core_key, uint32_t cmd, const void *inargs, uint32_t inargs_len, void *outargs, uint32_t outargs_len) |
| Invoke Cpsw IOCTL. More... | |
| int32_t | rdevEthSwitchClient_detach (uint32_t device_id, uint64_t id, uint32_t core_key) |
| Detach from Ethernet Switch Remote Device. More... | |
| int32_t | rdevEthSwitchClient_freerx (uint32_t device_id, uint64_t id, uint32_t core_key, uint32_t alloc_flow_idx) |
| Free Rx Flow Id. More... | |
| int32_t | rdevEthSwitchClient_freetx (uint32_t device_id, uint64_t id, uint32_t core_key, uint32_t tx_cpsw_psil_dst_id) |
| Free Tx Channel CPSW PSIL Destination thread id. More... | |
| int32_t | rdevEthSwitchClient_freemac (uint32_t device_id, uint64_t id, uint32_t core_key, uint8_t *mac_address) |
| Free Tx Channel CPSW PSIL Destination thread id. More... | |
| int32_t | rdevEthSwitchClient_unregisterrxdefault (uint32_t device_id, uint64_t id, uint32_t core_key, uint32_t default_flow_idx) |
| Unregister Default Flow from the given flow index. More... | |
| int32_t | rdevEthSwitchClient_unregistermac (uint32_t device_id, uint64_t id, uint32_t core_key, uint32_t flow_idx, uint8_t *mac_address) |
| Unregister Destination MAC address from the given flow index. More... | |
| int32_t | rdevEthSwitchClient_registermac (uint32_t device_id, uint64_t id, uint32_t core_key, uint32_t flow_idx, uint8_t *mac_address) |
| Register Destination MAC address with the given flow index. More... | |
| int32_t | rdevEthSwitchClient_allocmac (uint32_t device_id, uint64_t id, uint32_t core_key, uint8_t *mac_address, uint32_t mac_address_len) |
| Alloc Destination MAC address. More... | |
| int32_t | rdevEthSwitchClient_registerrxdefault (uint32_t device_id, uint64_t id, uint32_t core_key, uint32_t default_flow_idx) |
| Register Default Flow to the given flow index. More... | |
| int32_t | rdevEthSwitchClient_allocrx (uint32_t device_id, uint64_t id, uint32_t core_key, uint32_t *rx_flow_allocidx) |
| Alloc Rx Flow Id. More... | |
| int32_t | rdevEthSwitchClient_alloctx (uint32_t device_id, uint64_t id, uint32_t core_key, uint32_t *tx_cpsw_psil_dst_id) |
| Alloc Tx Channel CPSW PSIL Destination thread id. More... | |
| int32_t | rdevEthSwitchClient_attach (uint32_t device_id, uint8_t enetType, uint64_t *id, uint32_t *core_key, uint32_t *rx_mtu, uint32_t tx_mtu[], uint32_t tx_mtu_array_size, uint32_t *features, uint32_t *mac_only_port) |
| Attach to Ethernet Switch Remote Device. More... | |
| int32_t | rdevEthSwitchClient_attachext (uint32_t device_id, uint8_t enetType, uint64_t *id, uint32_t *core_key, uint32_t *rx_mtu, uint32_t tx_mtu[], uint32_t tx_mtu_array_size, uint32_t *features, uint32_t *tx_cpsw_psil_dst_id, uint32_t *rx_flow_allocidx, uint8_t *mac_address, uint32_t mac_address_len, uint32_t *mac_only_port) |
| Attach to Ethernet Switch Remote Device with extended response. More... | |
| int32_t | rdevEthSwitchClient_sendNotify (uint32_t device_id, u64 id, u32 core_key, enum rpmsg_kdrv_ethswitch_client_notify_type notify_id, uint8_t *notify_info, uint32_t notify_info_len) |
| Send Notify From Client to server. More... | |
| uint32_t | rdevEthSwitchClient_printText (void *priv, void *data) |
| Remote Device Framework print function callback. More... | |
| int32_t | rdevEthSwitchClient_registerethtype (uint32_t device_id, uint64_t id, uint32_t core_key, uint32_t flow_idx, uint16_t ether_type) |
| Register Ethertype with the given flow index. More... | |
| int32_t | rdevEthSwitchClient_unregisterethtype (uint32_t device_id, uint64_t id, uint32_t core_key, uint32_t flow_idx, uint16_t ether_type) |
| Unregister Ethertype from the given flow index. More... | |
| int32_t | rdevEthSwitchClient_registerremotetimer (uint32_t device_id, uint64_t id, uint32_t core_key, uint8_t timerid, uint8_t hwPushNum) |
| Register remote timer with CPTS using timerid. More... | |
| int32_t | rdevEthSwitchClient_unregisterremotetimer (uint32_t device_id, uint64_t id, uint32_t core_key, uint8_t hwPushNum) |
| Unregister remote timer from CPTS using timerid. More... | |
| int32_t | rdevEthSwitchClient_setPromiscMode (uint32_t device_id, uint64_t id, uint32_t core_key, uint32_t enable) |
| Set promiscuous mode. More... | |
| int32_t | rdevEthSwitchClient_filterAddMac (uint32_t device_id, uint64_t id, uint32_t core_key, uint32_t flow_idx, uint8_t *mac_address, uint16_t vlan_id) |
| Add multicast address to receive filter. More... | |
| int32_t | rdevEthSwitchClient_filterDelMac (uint32_t device_id, uint64_t id, uint32_t core_key, uint32_t flow_idx, uint8_t *mac_address, uint16_t vlan_id) |
| Delete multicast address from receive filter. More... | |
| int32_t rdevEthSwitchClient_connect | ( | rdevEthSwitchClientInitPrms_t * | initPrms | ) |
Connect to Ethernet Switch Remote Device.
The client must first connect to the Ethernet Switch Remote Device server After connect the client can invoke the Ethernet Switch Remote Device Client APIs to configure the remote ethernet switch device
| initPrms | Server Connect params |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of incorrect init parameters or any failure connecting to remote server side. |
| int32_t rdevEthSwitchClient_disconnect | ( | uint32_t | device_id | ) |
Disconnect to Ethernet Switch Remote Device.
The client can disconnect from the Ethernet Switch Remote Device server.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any failure disconnecting from server side. |
| int32_t rdevEthSwitchClient_sendping | ( | uint32_t | device_id, |
| char * | ping_msg, | ||
| uint32_t | ping_len, | ||
| char * | respMsg, | ||
| uint32_t | respMaxLen | ||
| ) |
Send Ping to Ethernet Switch Remote Device.
The server will respond to ping request
| device_id | Device id returned by rdevEthSwitchClient_connect |
| ping_msg | Ping message sent by client app |
| ping_len | Length of ping msg |
| respMsg | Response to ping message received from server |
| respMaxLen | Length of response ping msg |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_ipv4macunregister | ( | uint32_t | device_id, |
| uint64_t | id, | ||
| uint32_t | core_key, | ||
| uint8_t * | ipv4_address | ||
| ) |
Unregister association of IPv4 address with MAC address by removing ARP entry in the master core.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| id | Unique Opaque Handle returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| core_key | Unique core_key returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| ipv4_address | IPV4 address to be unregistered |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_ipv6macregister | ( | uint32_t | device_id, |
| uint64_t | id, | ||
| uint32_t | core_key, | ||
| uint8_t * | mac_address, | ||
| uint8_t * | ipv6_address | ||
| ) |
Register association of IPv6 address with MAC address by adding ARP entry in the master core.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| id | Unique Opaque Handle returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| core_key | Unique core_key returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| mac_address | MAC address with which the IPv4 address will be associated |
| ipv6_address | IPV4 address to be added to ARP database |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_ipv4macregister | ( | uint32_t | device_id, |
| uint64_t | id, | ||
| uint32_t | core_key, | ||
| uint8_t * | mac_address, | ||
| uint8_t * | ipv4_address | ||
| ) |
Register association of IPv4 address with MAC address by adding ARP entry in the master core.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| id | Unique Opaque Handle returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| core_key | Unique core_key returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| mac_address | MAC address with which the IPv4 address will be associated |
| ipv4_address | IPV4 address to be added to ARP database |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_regrd | ( | uint32_t | device_id, |
| uint32_t | regaddr, | ||
| uint32_t * | pregval | ||
| ) |
Register Read Function.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| regaddr | Register Address to be read from |
| pregval | Pointer to register value which will be populated by this function |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_regwr | ( | uint32_t | device_id, |
| uint32_t | regaddr, | ||
| uint32_t | regval, | ||
| uint32_t * | post_wr_regval | ||
| ) |
Register Write Function.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| regaddr | Register Address to be read from |
| regval | Register value to be written |
| post_wr_regval | Pointer to register value after register write populated by this function |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_ioctl | ( | uint32_t | device_id, |
| uint64_t | id, | ||
| uint32_t | core_key, | ||
| uint32_t | cmd, | ||
| const void * | inargs, | ||
| uint32_t | inargs_len, | ||
| void * | outargs, | ||
| uint32_t | outargs_len | ||
| ) |
Invoke Cpsw IOCTL.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| id | Unique Opaque Handle returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| core_key | Unique core_key returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| cmd | CPSW IOCTL CMD id. 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 input arguments .Byte array is typecast to the outArgs structure associated with the IOCTL. Populated by this function |
| outargs_len | CPSW IOCTL CMD output arguments length |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_detach | ( | uint32_t | device_id, |
| uint64_t | id, | ||
| uint32_t | core_key | ||
| ) |
Detach from Ethernet Switch Remote Device.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| id | Unique Opaque Handle returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| core_key | Unique core_key returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_freerx | ( | uint32_t | device_id, |
| uint64_t | id, | ||
| uint32_t | core_key, | ||
| uint32_t | alloc_flow_idx | ||
| ) |
Free Rx Flow Id.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| id | Unique Opaque Handle returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| core_key | Unique core_key returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| alloc_flow_idx | Rx Flow Id to be freed |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_freetx | ( | uint32_t | device_id, |
| uint64_t | id, | ||
| uint32_t | core_key, | ||
| uint32_t | tx_cpsw_psil_dst_id | ||
| ) |
Free Tx Channel CPSW PSIL Destination thread id.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| id | Unique Opaque Handle returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| core_key | Unique core_key returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| tx_cpsw_psil_dst_id | Tx Channel CPSW PSIL Destination thread id to be freed |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_freemac | ( | uint32_t | device_id, |
| uint64_t | id, | ||
| uint32_t | core_key, | ||
| uint8_t * | mac_address | ||
| ) |
Free Tx Channel CPSW PSIL Destination thread id.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| id | Unique Opaque Handle returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| core_key | Unique core_key returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| mac_address | Destination mac address to be freed |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_unregisterrxdefault | ( | uint32_t | device_id, |
| uint64_t | id, | ||
| uint32_t | core_key, | ||
| uint32_t | default_flow_idx | ||
| ) |
Unregister Default Flow from the given flow index.
This function disables routing of default traffic (traffic not matching any classifier with thread id configured) to the given rx flow_idx. Once disabled, all default traffic will be routed to the reserved flow resulting in all packets of default flow being dropped
| device_id | Device id returned by rdevEthSwitchClient_connect |
| id | Unique Opaque Handle returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| core_key | Unique core_key returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| default_flow_idx | Default Flow Id from to which the default flow will no longer be directed |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_unregistermac | ( | uint32_t | device_id, |
| uint64_t | id, | ||
| uint32_t | core_key, | ||
| uint32_t | flow_idx, | ||
| uint8_t * | mac_address | ||
| ) |
Unregister Destination MAC address from the given flow index.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| id | Unique Opaque Handle returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| core_key | Unique core_key returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| flow_idx | Flow Id from to which the traffic with the given DST mac address will no longer be directed |
| mac_address | Destination mac address to be unregistered |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_registermac | ( | uint32_t | device_id, |
| uint64_t | id, | ||
| uint32_t | core_key, | ||
| uint32_t | flow_idx, | ||
| uint8_t * | mac_address | ||
| ) |
Register Destination MAC address with the given flow index.
This function registers the destination mac to the given rx flow index. This causes all packets with the given destination mac address to be routed to the given rx flow index.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| id | Unique Opaque Handle returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| core_key | Unique core_key returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| flow_idx | Flow Id to which the traffic with the given DST mac address will directed |
| mac_address | Destination mac address to be registered |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_allocmac | ( | uint32_t | device_id, |
| uint64_t | id, | ||
| uint32_t | core_key, | ||
| uint8_t * | mac_address, | ||
| uint32_t | mac_address_len | ||
| ) |
Alloc Destination MAC address.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| id | Unique Opaque Handle returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| core_key | Unique core_key returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| mac_address | Destination mac address .Populated by this function with allocated DST MAC address |
| mac_address_len | Destination mac address buffer length |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_registerrxdefault | ( | uint32_t | device_id, |
| uint64_t | id, | ||
| uint32_t | core_key, | ||
| uint32_t | default_flow_idx | ||
| ) |
Register Default Flow to the given flow index.
This function enables routing of default traffic (traffic not matching any classifier with thread id configured) to the given rx flow_idx.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| id | Unique Opaque Handle returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| core_key | Unique core_key returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| default_flow_idx | Default Flow Id from to which the default flow will no longer be directed |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_allocrx | ( | uint32_t | device_id, |
| uint64_t | id, | ||
| uint32_t | core_key, | ||
| uint32_t * | rx_flow_allocidx | ||
| ) |
Alloc Rx Flow Id.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| id | Unique Opaque Handle returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| core_key | Unique core_key returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| rx_flow_allocidx | Allocated Rx Flow Index populated by this function |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_alloctx | ( | uint32_t | device_id, |
| uint64_t | id, | ||
| uint32_t | core_key, | ||
| uint32_t * | tx_cpsw_psil_dst_id | ||
| ) |
Alloc Tx Channel CPSW PSIL Destination thread id.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| id | Unique Opaque Handle returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| core_key | Unique core_key returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| tx_cpsw_psil_dst_id | Allocated Tx Channel CPSW PSIL Destination thread id populated by this function |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_attach | ( | uint32_t | device_id, |
| uint8_t | enetType, | ||
| uint64_t * | id, | ||
| uint32_t * | core_key, | ||
| uint32_t * | rx_mtu, | ||
| uint32_t | tx_mtu[], | ||
| uint32_t | tx_mtu_array_size, | ||
| uint32_t * | features, | ||
| uint32_t * | mac_only_port | ||
| ) |
Attach to Ethernet Switch Remote Device.
Clients must first attach to the ethernet switch remote device.Attach returns the core_key and id which are used as params for all further client fucntions except regrd / regwr functions
| device_id | Device id returned by rdevEthSwitchClient_connect |
| enetType | CPSW TYPE of type enum rpmsg_kdrv_ethswitch_cpsw_type |
| id | Pointer to Unique Opaque Handle populated by this function |
| core_key | Pointer to Core key populated by this function |
| rx_mtu | Pointer to Maximum receive packet length . Populated by this function |
| tx_mtu | Array of Maximum transmit packet length per priority supported by ethernet switch |
| tx_mtu_array_size | Size of tx_mtu array.Must be sufficient to store MTU size for all priorities supported by the CPSW |
| features | Pointer to feature bitmap. Bitmask of type RPMSG_KDRV_TP_ETHSWITCH_FEATURE_xxx |
| mac_only_port | Pointer to MAC-only port. 1-relative MAC-only port number, 0 for non MAC-only ports |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_attachext | ( | uint32_t | device_id, |
| uint8_t | enetType, | ||
| uint64_t * | id, | ||
| uint32_t * | core_key, | ||
| uint32_t * | rx_mtu, | ||
| uint32_t | tx_mtu[], | ||
| uint32_t | tx_mtu_array_size, | ||
| uint32_t * | features, | ||
| uint32_t * | tx_cpsw_psil_dst_id, | ||
| uint32_t * | rx_flow_allocidx, | ||
| uint8_t * | mac_address, | ||
| uint32_t | mac_address_len, | ||
| uint32_t * | mac_only_port | ||
| ) |
Attach to Ethernet Switch Remote Device with extended response.
Clients must first attach to the ethernet switch remote device.Attach returns the core_key and id which are used as params for all further client fucntions except regrd / regwr functions For remote core clients that require only one rx/one tx and one dst mac address, rdevEthSwitchClient_attachext allows a single attach call to return all the required params Client can avoid further calls to alloctx/allocrx etc.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| enetType | CPSW TYPE of type enum rpmsg_kdrv_ethswitch_cpsw_type |
| id | Pointer to Unique Opaque Handle populated by this function |
| core_key | Pointer to Core key populated by this function |
| rx_mtu | Pointer to Maximum receive packet length . Populated by this function |
| tx_mtu | Array of Maximum transmit packet length per priority supported by ethernet switch |
| tx_mtu_array_size | Size of tx_mtu array.Must be sufficient to store MTU size for all priorities supported by the CPSW |
| features | Pointer to feature bitmap. Bitmask of type RPMSG_KDRV_TP_ETHSWITCH_FEATURE_xxx |
| tx_cpsw_psil_dst_id | Pointer to allocated Tx Channel CPSW PSIL destination thread id populated by this function |
| rx_flow_allocidx | Pointer to allocated Rx Flow Index populated by this function |
| mac_address | Pointer to allocated destination mac address allocated to remote core populated by this function |
| mac_address_len | Destination mac address buffer length |
| mac_only_port | Pointer to MAC-only port. 1-relative MAC-only port number, 0 for non MAC-only ports |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_sendNotify | ( | uint32_t | device_id, |
| u64 | id, | ||
| u32 | core_key, | ||
| enum rpmsg_kdrv_ethswitch_client_notify_type | notify_id, | ||
| uint8_t * | notify_info, | ||
| uint32_t | notify_info_len | ||
| ) |
Send Notify From Client to server.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| id | Unique Opaque Handle returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| core_key | Unique core_key returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| notify_id | 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 |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| uint32_t rdevEthSwitchClient_printText | ( | void * | priv, |
| void * | data | ||
| ) |
Remote Device Framework print function callback.
This function is for internal use of the remote device framework which expects all its clients to provide a printText callback
| priv | Context Pointer associated with printText call |
| data | Formatted string buffer to be printed |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| int32_t rdevEthSwitchClient_registerethtype | ( | uint32_t | device_id, |
| uint64_t | id, | ||
| uint32_t | core_key, | ||
| uint32_t | flow_idx, | ||
| uint16_t | ether_type | ||
| ) |
Register Ethertype with the given flow index.
This function registers the ethertype to the given rx flow index. This causes all packets with the given ethertype to be routed to the given rx flow index.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| id | Unique Opaque Handle returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| core_key | Unique core_key returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| flow_idx | Flow Id to which the traffic with the given DST mac address will directed |
| ether_type | Ethertype to be registered |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_unregisterethtype | ( | uint32_t | device_id, |
| uint64_t | id, | ||
| uint32_t | core_key, | ||
| uint32_t | flow_idx, | ||
| uint16_t | ether_type | ||
| ) |
Unregister Ethertype from the given flow index.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| id | Unique Opaque Handle returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| core_key | Unique core_key returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| flow_idx | Flow Id from to which the traffic with the given DST mac address will no longer be directed |
| ether_type | Ethertype to be unregistered |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_registerremotetimer | ( | uint32_t | device_id, |
| uint64_t | id, | ||
| uint32_t | core_key, | ||
| uint8_t | timerid, | ||
| uint8_t | hwPushNum | ||
| ) |
Register remote timer with CPTS using timerid.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| id | Unique Opaque Handle returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| core_key | Unique core_key returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| timerid | Timer Id used for configuring timesync router |
| hwPushNum | Hardware push number of CPTS |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_unregisterremotetimer | ( | uint32_t | device_id, |
| uint64_t | id, | ||
| uint32_t | core_key, | ||
| uint8_t | hwPushNum | ||
| ) |
Unregister remote timer from CPTS using timerid.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| id | Unique Opaque Handle returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| core_key | Unique core_key returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| hwPushNum | Hardware push number of CPTS |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_setPromiscMode | ( | uint32_t | device_id, |
| uint64_t | id, | ||
| uint32_t | core_key, | ||
| uint32_t | enable | ||
| ) |
Set promiscuous mode.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| id | Unique Opaque Handle returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| core_key | Unique core_key returned by rdevEthSwitchClient_attach/rdevEthSwitchClient_attachext |
| enable | Promiscuous mode (enable or disable) |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_filterAddMac | ( | uint32_t | device_id, |
| uint64_t | id, | ||
| uint32_t | core_key, | ||
| uint32_t | flow_idx, | ||
| uint8_t * | mac_address, | ||
| uint16_t | vlan_id | ||
| ) |
Add multicast address to receive filter.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| id | Unique Opaque Handle returned by rdevEthSwitchClient_attach or rdevEthSwitchClient_attachext |
| core_key | Unique core_key returned by rdevEthSwitchClient_attach or rdevEthSwitchClient_attachext |
| flow_idx | Flow Id to which the traffic with the given MAC address will be directed. Applicable only for multicast addresses with exclusive access |
| mac_address | Multicast MAC address to be added |
| vlan_id | VLAN id |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |
| int32_t rdevEthSwitchClient_filterDelMac | ( | uint32_t | device_id, |
| uint64_t | id, | ||
| uint32_t | core_key, | ||
| uint32_t | flow_idx, | ||
| uint8_t * | mac_address, | ||
| uint16_t | vlan_id | ||
| ) |
Delete multicast address from receive filter.
| device_id | Device id returned by rdevEthSwitchClient_connect |
| id | Unique Opaque Handle returned by rdevEthSwitchClient_attach or rdevEthSwitchClient_attachext |
| core_key | Unique core_key returned by rdevEthSwitchClient_attach or rdevEthSwitchClient_attachext |
| flow_idx | Flow Id to which the traffic with the given MAC address will no longer be directed. Applicable only for multicast addresses with exclusive access |
| mac_address | Multicast MAC address to be deleted |
| vlan_id | VLAN id |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_OK | Success. |
| RPMSG_KDRV_TP_ETHSWITCH_CMDSTATUS_EFAIL | In case of any error while executing the command on the server side or an argument mismatch. |