![]() |
ETHFW API Guide
|
This section contains APIs for CPSW Proxy Client APIs.
The CPSW proxy client resides on the remote cores and enables clients on remote cores to configure the Ethernet Switch via RPC
The Cpsw Proxy APIs for switch configuration are RPC APIs
Data Structures | |
| struct | CpswProxy_Config |
| Cpsw Proxy Client Configuration structure. More... | |
Functions | |
| CpswProxy_Handle | CpswProxy_init (const CpswProxy_Config *cfg) |
| Initialize CPSW proxy client with the given configuration. More... | |
| void | CpswProxy_deInit (CpswProxy_Handle hProxy) |
| Deinit CPSW proxy client. More... | |
| void | CpswProxy_start (CpswProxy_Handle hProxy) |
| Start CPSW proxy client. More... | |
| void | CpswProxy_attach (CpswProxy_Handle hProxy, Enet_Type enetType, Enet_Handle *pCpswHandle, uint32_t *coreKey, uint32_t *rxMtu, uint32_t *txMtu) |
| Attach to Ethernet Switch Remote Device. More... | |
| void | CpswProxy_attachExtended (CpswProxy_Handle hProxy, Enet_Type enetType, Enet_Handle *pCpswHandle, uint32_t *coreKey, uint32_t *rxMtu, uint32_t *txMtu, uint32_t *txPSILThreadId, uint32_t *rxFlowStartIdx, uint32_t *rxFlowIdx, uint8_t *macAddress) |
| Attach to Ethernet Switch Remote Device with extended response. More... | |
| void | CpswProxy_detach (CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey) |
| Detach from Ethernet Switch Remote Device. More... | |
| void | CpswProxy_allocTxCh (CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint32_t *txPSILThreadId) |
| Alloc Tx Channel CPSW PSIL Destination thread id. More... | |
| void | CpswProxy_freeTxCh (CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint32_t txChNum) |
| Free Tx Channel CPSW PSIL Destination thread id. More... | |
| void | CpswProxy_allocRxFlow (CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint32_t *rxFlowStartIdx, uint32_t *rxFlowIdx) |
| Alloc Rx flow Id. More... | |
| void | CpswProxy_freeRxFlow (CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint32_t rxFlowIdx) |
| Free Rx flow Id. More... | |
| void | CpswProxy_allocMac (CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint8_t *macAddress) |
| Alloc Destination MAC address. More... | |
| void | CpswProxy_freeMac (CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, const uint8_t *macAddress) |
| Free Tx Channel CPSW PSIL Destination thread id. More... | |
| void | CpswProxy_registerDstMacRxFlow (CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint32_t rxFlowStartIdx, uint32_t rxFlowOffsetIdx, const uint8_t *macAddress) |
| Register Destination MAC address with the given flow index. More... | |
| void | CpswProxy_unregisterDstMacRxFlow (CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint32_t rxFlowStartIdx, uint32_t rxFlowOffsetIdx, const uint8_t *macAddress) |
| Unregister Destination MAC address from the given flow index. More... | |
| void | CpswProxy_registerEthertypeRxFlow (CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint32_t rxFlowStartIdx, uint32_t rxFlowOffsetIdx, uint16_t etherType) |
| Register the given EtherType to the given rx flow id. More... | |
| void | CpswProxy_unregisterEthertypeRxFlow (CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint32_t rxFlowStartIdx, uint32_t rxFlowOffsetIdx, uint16_t etherType) |
| Unregister the given EtherType to the given rx flow id. More... | |
| void | CpswProxy_registerDefaultRxFlow (CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint32_t rxFlowStartIdx, uint32_t rxFlowOffsetIdx) |
| Register Default Flow to the given flow index. More... | |
| void | CpswProxy_unregisterDefaultRxFlow (CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint32_t rxFlowStartIdx, uint32_t rxFlowOffsetIdx) |
| Unregister Default Flow from the given flow index. More... | |
| void | CpswProxy_registerIPV4Addr (CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint8_t *macAddr, uint8_t *ipv4Addr) |
| Register association of IPv4 address with MAC address by adding ARP entry in the master core. More... | |
| void | CpswProxy_unregisterIPV4Addr (CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint8_t *ipv4Addr) |
| Unregister association of IPv4 address with MAC address by removing ARP entry in the master core. More... | |
| void | CpswProxy_addHostPortEntry (CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, const uint8_t *macAddr) |
| Add the given unicast macAddr as host port MAC address. More... | |
| void | CpswProxy_delAddrEntry (CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, const uint8_t *macAddr) |
| Remove macAddress from the switch address resolution table. More... | |
| void | CpswProxy_ioctl (CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint32_t cmd, Enet_IoctlPrms *prms) |
| Invoke Cpsw IOCTL. More... | |
| bool | CpswProxy_isPhyLinked (CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, Enet_MacPort portNum) |
| Query if the link for PHY associated with the given MAC Port is up. More... | |
| void | CpswProxy_sendNotify (CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint8_t *notifyInfo, uint32_t notifyInfoLength) |
| Send custom notification info from client to server. More... | |
| void | CpswProxy_registerRemoteTimer (CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint8_t timerId, uint8_t hwPushNum) |
| Register remote core's timer for synchronization. More... | |
| void | CpswProxy_unregisterRemoteTimer (CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint8_t hwPushNum) |
| Unregister remote core's timer for synchronization. More... | |
| int32_t | CpswProxy_registerHwPushNotifyCb (CpswProxy_Handle hProxy, CpswRemoteNotifyService_hwPushNotifyCbFxn cbFxn) |
| Register hardware push notification callback. More... | |
Typedefs | |
| typedef void(* | CpswProxy_deviceDataNotifyCbFxn) (struct rpmsg_kdrv_ethswitch_device_data *eth_dev_data) |
| Application Callback function pointers to notify when remote ethernet device data is received on remote core. More... | |
| typedef struct CpswProxy_Obj_s * | CpswProxy_Handle |
| CPSW Proxy handle. More... | |
| typedef void(* CpswProxy_deviceDataNotifyCbFxn) (struct rpmsg_kdrv_ethswitch_device_data *eth_dev_data) |
Application Callback function pointers to notify when remote ethernet device data is received on remote core.
The client will attach to the server and the server will send the ethernet device data to the server. This data is passed onto the application by means of this callback.
| eth_dev_data | Pointer to device data |
| typedef struct CpswProxy_Obj_s* CpswProxy_Handle |
CPSW Proxy handle.
CPSW Proxy opaque handle.
| CpswProxy_Handle CpswProxy_init | ( | const CpswProxy_Config * | cfg | ) |
Initialize CPSW proxy client with the given configuration.
Application will get a handle to Cpsw Proxy which will be used in all CPSW Proxy APIs. Only a single proxy instance per remote core is supported currently.
| cfg | Configuration of the CPSW Proxy client |
| void CpswProxy_deInit | ( | CpswProxy_Handle | hProxy | ) |
Deinit CPSW proxy client.
Deletes the CPW proxy client instance.
| hProxy | Cpsw Proxy Handle |
| void CpswProxy_start | ( | CpswProxy_Handle | hProxy | ) |
Start CPSW proxy client.
Application can invoke Cpsw_proxy RPC APIs only after the client is started
| hProxy | Handle to Cpsw Proxy |
| void CpswProxy_attach | ( | CpswProxy_Handle | hProxy, |
| Enet_Type | enetType, | ||
| Enet_Handle * | pCpswHandle, | ||
| uint32_t * | coreKey, | ||
| uint32_t * | rxMtu, | ||
| uint32_t * | txMtu | ||
| ) |
Attach to Ethernet Switch Remote Device.
Clients must first attach to the ethernet switch remote device. CpswProxy_attach() returns the core_key and id which are used as params for all further client fucntions.
Note: The API will send the RPC msg, block for response and if the response status is not success will abort execution. The API will be modified to return error status to allow the application to handle the error in next version.
| hProxy | Handle to Cpsw Proxy |
| enetType | Enet instance type |
| pCpswHandle | Pointer to unique opaque handle populated by this function |
| coreKey | Pointer to Core key populated by this function |
| rxMtu | Pointer to maximum receive packet length. Populated by this function |
| txMtu | Array of maximum transmit packet length per priority supported by ethernet switch |
| void CpswProxy_attachExtended | ( | CpswProxy_Handle | hProxy, |
| Enet_Type | enetType, | ||
| Enet_Handle * | pCpswHandle, | ||
| uint32_t * | coreKey, | ||
| uint32_t * | rxMtu, | ||
| uint32_t * | txMtu, | ||
| uint32_t * | txPSILThreadId, | ||
| uint32_t * | rxFlowStartIdx, | ||
| uint32_t * | rxFlowIdx, | ||
| uint8_t * | macAddress | ||
| ) |
Attach to Ethernet Switch Remote Device with extended response.
Clients must first attach to the ethernet switch remote device. CpswProxy_attachExtended() returns the core_key and id which are used as params for all further client functions.
For remote core clients that require only one rx/one tx and one dst MAC address, CpswProxy_attachExtended() allows a single attach call to return all the required params. Client can avoid further calls to alloctx/allocrx, etc.
Note: The API will send the RPC msg, block for response and if the response status is not success will abort execution. The API will be modified to return error status to allow the application to handle the error in next version.
| hProxy | Handle to Cpsw Proxy |
| enetType | Enet instance type |
| pCpswHandle | Pointer to unique opaque handle populated by this function |
| coreKey | Pointer to Core key populated by this function |
| rxMtu | Pointer to maximum receive packet length. Populated by this function |
| txMtu | Array of maximum transmit packet length per priority supported by ethernet switch |
| txPSILThreadId | Pointer to allocated Tx Channel CPSW PSIL destination thread id populated by this function |
| rxFlowStartIdx | Pointer to allocated Rx Flow Index Base value populated by this function: Absolute RxFlowIdx = (rxFlowStartIdx + rxFlowIdx) |
| rxFlowIdx | Pointer to allocated allocated Rx Flow Index offset value populated by this function |
| macAddress | Pointer to allocated destination MAC address allocated to remote core populated by this function |
| void CpswProxy_detach | ( | CpswProxy_Handle | hProxy, |
| Enet_Handle | hEnet, | ||
| uint32_t | coreKey | ||
| ) |
Detach from Ethernet Switch Remote Device.
Note: The API will send the RPC msg, block for response and if the response status is not success will abort execution. The API will be modified to return error status to allow the application to handle the error in next version.
| hProxy | Handle to Cpsw Proxy |
| hEnet | Unique opaque handle returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| coreKey | Unique core_key returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| void CpswProxy_allocTxCh | ( | CpswProxy_Handle | hProxy, |
| Enet_Handle | hEnet, | ||
| uint32_t | coreKey, | ||
| uint32_t * | txPSILThreadId | ||
| ) |
Alloc Tx Channel CPSW PSIL Destination thread id.
Note: The API will send the RPC msg, block for response and if the response status is not success will abort execution. The API will be modified to return error status to allow the application to handle the error in next version.
| hProxy | Handle to Cpsw Proxy |
| hEnet | Unique opaque handle returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| coreKey | Unique core_key returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| txPSILThreadId | Allocated Tx Channel CPSW PSIL Destination thread id populated by this function |
| void CpswProxy_freeTxCh | ( | CpswProxy_Handle | hProxy, |
| Enet_Handle | hEnet, | ||
| uint32_t | coreKey, | ||
| uint32_t | txChNum | ||
| ) |
Free Tx Channel CPSW PSIL Destination thread id.
Note: The API will send the RPC msg, block for response and if the response status is not success will abort execution. The API will be modified to return error status to allow the application to handle the error in next version.
| hProxy | Handle to Cpsw Proxy |
| hEnet | Unique opaque handle returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| coreKey | Unique core_key returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| txChNum | Tx Channel CPSW PSIL Destination thread id to be freed |
| void CpswProxy_allocRxFlow | ( | CpswProxy_Handle | hProxy, |
| Enet_Handle | hEnet, | ||
| uint32_t | coreKey, | ||
| uint32_t * | rxFlowStartIdx, | ||
| uint32_t * | rxFlowIdx | ||
| ) |
Alloc Rx flow Id.
Note: The API will send the RPC msg, block for response and if the response status is not success will abort execution. The API will be modified to return error status to allow the application to handle the error in next version.
| hProxy | Handle to Cpsw Proxy |
| hEnet | Unique opaque handle returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| coreKey | Unique core_key returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| rxFlowStartIdx | Pointer to allocated Rx Flow Index Base value populated by this function. Absolute RxFlowIdx = (rxFlowStartIdx + rxFlowIdx) |
| rxFlowIdx | Pointer to allocated allocated Rx flow Index offset value populated by this function |
| void CpswProxy_freeRxFlow | ( | CpswProxy_Handle | hProxy, |
| Enet_Handle | hEnet, | ||
| uint32_t | coreKey, | ||
| uint32_t | rxFlowIdx | ||
| ) |
Free Rx flow Id.
Note: The API will send the RPC msg, block for response and if the response status is not success will abort execution. The API will be modified to return error status to allow the application to handle the error in next version.
| hProxy | Handle to Cpsw Proxy |
| hEnet | Unique opaque handle returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| coreKey | Unique core_key returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| rxFlowIdx | Rx flow Id to be freed |
| void CpswProxy_allocMac | ( | CpswProxy_Handle | hProxy, |
| Enet_Handle | hEnet, | ||
| uint32_t | coreKey, | ||
| uint8_t * | macAddress | ||
| ) |
Alloc Destination MAC address.
Note: The API will send the RPC msg, block for response and if the response status is not success will abort execution. The API will be modified to return error status to allow the application to handle the error in next version.
| hProxy | Handle to Cpsw Proxy |
| hEnet | Unique opaque handle returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| coreKey | Unique core_key returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| macAddress | Destination MAC address. Populated by this function with allocated DST MAC address |
| void CpswProxy_freeMac | ( | CpswProxy_Handle | hProxy, |
| Enet_Handle | hEnet, | ||
| uint32_t | coreKey, | ||
| const uint8_t * | macAddress | ||
| ) |
Free Tx Channel CPSW PSIL Destination thread id.
Note: The API will send the RPC msg, block for response and if the response status is not success will abort execution. The API will be modified to return error status to allow the application to handle the error in next version.
| hProxy | Handle to Cpsw Proxy |
| hEnet | Unique opaque handle returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| coreKey | Unique core_key returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| macAddress | Destination MAC address to be freed |
| void CpswProxy_registerDstMacRxFlow | ( | CpswProxy_Handle | hProxy, |
| Enet_Handle | hEnet, | ||
| uint32_t | coreKey, | ||
| uint32_t | rxFlowStartIdx, | ||
| uint32_t | rxFlowOffsetIdx, | ||
| const uint8_t * | macAddress | ||
| ) |
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.
Note: The API will send the RPC msg, block for response and if the response status is not success will abort execution. The API will be modified to return error status to allow the application to handle the error in next version.
| hProxy | Handle to Cpsw Proxy |
| hEnet | Unique opaque handle returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| coreKey | Unique core_key returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| rxFlowStartIdx | Rx flow Index Base value. Absolute RxFlowIdx = (rxFlowStartIdx + rxFlowIdx) |
| rxFlowOffsetIdx | Flow Id from to which the traffic with the given DST MAC address will be directed |
| macAddress | Destination MAC address to be registered |
| void CpswProxy_unregisterDstMacRxFlow | ( | CpswProxy_Handle | hProxy, |
| Enet_Handle | hEnet, | ||
| uint32_t | coreKey, | ||
| uint32_t | rxFlowStartIdx, | ||
| uint32_t | rxFlowOffsetIdx, | ||
| const uint8_t * | macAddress | ||
| ) |
Unregister Destination MAC address from the given flow index.
Note: The API will send the RPC msg, block for response and if the response status is not success will abort execution. The API will be modified to return error status to allow the application to handle the error in next version.
| hProxy | Handle to Cpsw Proxy |
| hEnet | Unique opaque handle returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| coreKey | Unique core_key returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| rxFlowStartIdx | Rx Flow Index Base value. Absolute RxFlowIdx = (rxFlowStartIdx + rxFlowIdx) |
| rxFlowOffsetIdx | Flow Id from to which the traffic with the given DST MAC address will no longer be directed |
| macAddress | Destination MAC address to be unregistered |
| void CpswProxy_registerEthertypeRxFlow | ( | CpswProxy_Handle | hProxy, |
| Enet_Handle | hEnet, | ||
| uint32_t | coreKey, | ||
| uint32_t | rxFlowStartIdx, | ||
| uint32_t | rxFlowOffsetIdx, | ||
| uint16_t | etherType | ||
| ) |
Register the given EtherType to the given rx flow id.
Any packets received with given EtherType mac will have the specific flow id.
Note: The API will send the RPC msg, block for response and if the response status is not success will abort execution. The API will be modified to return error status to allow the application to handle the error in next version.
| hProxy | Handle to Cpsw Proxy |
| hEnet | Unique opaque handle returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| coreKey | Unique core_key returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| rxFlowStartIdx | Rx Flow Index Base value. Absolute RxFlowIdx = (rxFlowStartIdx + rxFlowIdx) |
| rxFlowOffsetIdx | rxFlowOffsetIdx to which the EtherType packets be directed |
| etherType | Ethertype to be associated with the given rx flow id |
| void CpswProxy_unregisterEthertypeRxFlow | ( | CpswProxy_Handle | hProxy, |
| Enet_Handle | hEnet, | ||
| uint32_t | coreKey, | ||
| uint32_t | rxFlowStartIdx, | ||
| uint32_t | rxFlowOffsetIdx, | ||
| uint16_t | etherType | ||
| ) |
Unregister the given EtherType to the given rx flow id.
Any packets received with given EtherType MAC will be directed to the default flow.
Note: The API will send the RPC msg, block for response and if the response status is not success will abort execution. The API will be modified to return error status to allow the application to handle the error in next version.
| hProxy | Handle to Cpsw Proxy |
| hEnet | Unique opaque handle returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| coreKey | Unique core_key returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| rxFlowStartIdx | Rx Flow Index Base value. Absolute RxFlowIdx = (rxFlowStartIdx + rxFlowIdx) |
| rxFlowOffsetIdx | rxFlowOffsetIdx to which the EtherType packets were directed |
| etherType | Ethertype to be disassociated from the given rx flow id |
| void CpswProxy_registerDefaultRxFlow | ( | CpswProxy_Handle | hProxy, |
| Enet_Handle | hEnet, | ||
| uint32_t | coreKey, | ||
| uint32_t | rxFlowStartIdx, | ||
| uint32_t | rxFlowOffsetIdx | ||
| ) |
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.
Note: The API will send the RPC msg, block for response and if the response status is not success will abort execution. The API will be modified to return error status to allow the application to handle the error in next version.
| hProxy | Handle to Cpsw Proxy |
| hEnet | Unique opaque handle returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| coreKey | Unique core_key returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| rxFlowStartIdx | Rx Flow Index Base value. Absolute RxFlowIdx = (rxFlowStartIdx + rxFlowIdx) |
| rxFlowOffsetIdx | Default Flow Id from to which the default flow will no longer be directed |
| void CpswProxy_unregisterDefaultRxFlow | ( | CpswProxy_Handle | hProxy, |
| Enet_Handle | hEnet, | ||
| uint32_t | coreKey, | ||
| uint32_t | rxFlowStartIdx, | ||
| uint32_t | rxFlowOffsetIdx | ||
| ) |
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
Note: The API will send the RPC msg, block for response and if the response status is not success will abort execution. The API will be modified to return error status to allow the application to handle the error in next version.
| hProxy | Handle to Cpsw Proxy |
| hEnet | Unique opaque handle returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| coreKey | Unique core_key returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| rxFlowStartIdx | Rx Flow Index Base value. Absolute RxFlowIdx = (rxFlowStartIdx + rxFlowIdx) |
| rxFlowOffsetIdx | Default Flow Id from to which the default flow will no longer be directed |
| void CpswProxy_registerIPV4Addr | ( | CpswProxy_Handle | hProxy, |
| Enet_Handle | hEnet, | ||
| uint32_t | coreKey, | ||
| uint8_t * | macAddr, | ||
| uint8_t * | ipv4Addr | ||
| ) |
Register association of IPv4 address with MAC address by adding ARP entry in the master core.
Note: The API will send the RPC msg, block for response and if the response status is not success will abort execution. The API will be modified to return error status to allow the application to handle the error in next version.
| hProxy | Handle to Cpsw Proxy |
| hEnet | Unique opaque handle returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| coreKey | Unique core_key returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| macAddr | MAC address with which the IPv4 address will be associated |
| ipv4Addr | IPv4 address to be added to ARP database |
| void CpswProxy_unregisterIPV4Addr | ( | CpswProxy_Handle | hProxy, |
| Enet_Handle | hEnet, | ||
| uint32_t | coreKey, | ||
| uint8_t * | ipv4Addr | ||
| ) |
Unregister association of IPv4 address with MAC address by removing ARP entry in the master core.
Note: The API will send the RPC msg, block for response and if the response status is not success will abort execution. The API will be modified to return error status to allow the application to handle the error in next version.
| hProxy | Handle to Cpsw Proxy |
| hEnet | Unique opaque handle returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| coreKey | Unique core_key returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| ipv4Addr | IPv4 address to be unregistered |
| void CpswProxy_addHostPortEntry | ( | CpswProxy_Handle | hProxy, |
| Enet_Handle | hEnet, | ||
| uint32_t | coreKey, | ||
| const uint8_t * | macAddr | ||
| ) |
Add the given unicast macAddr as host port MAC address.
Any packets received with destination mac will be switched to the host port.
Note: The API will send the RPC msg, block for response and if the response status is not success will abort execution. The API will be modified to return error status to allow the application to handle the error in next version.
| hProxy | Handle to Cpsw Proxy |
| hEnet | Unique opaque handle returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| coreKey | Unique core_key returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| macAddr | Unicast MAC address to be added to the switch address resolution table as host port entry |
| void CpswProxy_delAddrEntry | ( | CpswProxy_Handle | hProxy, |
| Enet_Handle | hEnet, | ||
| uint32_t | coreKey, | ||
| const uint8_t * | macAddr | ||
| ) |
Remove macAddress from the switch address resolution table.
Note: The API will send the RPC msg, block for response and if the response status is not success will abort execution. The API will be modified to return error status to allow the application to handle the error in next version.
| hProxy | Handle to Cpsw Proxy |
| hEnet | Unique opaque handle returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| coreKey | Unique core_key returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| macAddr | MAC address to be deleted from the switch address resolution table |
| void CpswProxy_ioctl | ( | CpswProxy_Handle | hProxy, |
| Enet_Handle | hEnet, | ||
| uint32_t | coreKey, | ||
| uint32_t | cmd, | ||
| Enet_IoctlPrms * | prms | ||
| ) |
Invoke Cpsw IOCTL.
Note: The API will send the RPC msg, block for response and if the response status is not success will abort execution. The API will be modified to return error status to allow the application to handle the error in next version.
NOTE: Due to limitation in IPC, maximum size of inArgs and outArgs is 128 bytes If Cpsw IOCTL iargs_len/outargs_len is greater than 128 bytes for a specific IOCTL cmd then CpswProxy_ioctl will fail
| hProxy | Handle to Cpsw Proxy |
| hEnet | Unique opaque handle returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| coreKey | Unique core_key returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| cmd | CPSW IOCTL CMD id. Refer CPSW LLD documentation for list of CPSW LLD IOCTLs |
| prms | CPSW IOCTL params. Refer CPSW LLD documentation for details of this structure |
| bool CpswProxy_isPhyLinked | ( | CpswProxy_Handle | hProxy, |
| Enet_Handle | hEnet, | ||
| uint32_t | coreKey, | ||
| Enet_MacPort | portNum | ||
| ) |
Query if the link for PHY associated with the given MAC Port is up.
Note: The API will send the RPC msg, block for response and if the response status is not success will abort execution. The API will be modified to return error status to allow the application to handle the error in next version.
| hProxy | Handle to Cpsw Proxy |
| hEnet | Unique opaque handle returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| coreKey | Unique core_key returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| portNum | MAC port for which PHY link status is queried |
| void CpswProxy_sendNotify | ( | CpswProxy_Handle | hProxy, |
| Enet_Handle | hEnet, | ||
| uint32_t | coreKey, | ||
| uint8_t * | notifyInfo, | ||
| uint32_t | notifyInfoLength | ||
| ) |
Send custom notification info from client to server.
The buffer notifyInfo of notifyInfoLength will be sent to the server The client and server application interpretation of the notify info should match. The proxy just passes the info to the remote core
| hProxy | Handle to Cpsw Proxy |
| hEnet | Unique opaque handle returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| coreKey | Unique core_key returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| notifyInfo | Notify info to be sent to server |
| notifyInfoLength | Notify info length |
| void CpswProxy_registerRemoteTimer | ( | CpswProxy_Handle | hProxy, |
| Enet_Handle | hEnet, | ||
| uint32_t | coreKey, | ||
| uint8_t | timerId, | ||
| uint8_t | hwPushNum | ||
| ) |
Register remote core's timer for synchronization.
Note: The API will send the RPC msg, block for response and if the response status is not success will abort execution. The API will be modified to return error status to allow the application to handle the error in next version.
The timerId is used to indicate Ethfw about which timer's event is to be routed to CPTS hardware push via Timesync router(TSR).
| hProxy | Handle to Cpsw Proxy |
| hEnet | Unique opaque handle returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| coreKey | Unique core_key returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| timerId | Input Id number of timer in TSR |
| hwPushNum | Hardware push number of CPTS |
| void CpswProxy_unregisterRemoteTimer | ( | CpswProxy_Handle | hProxy, |
| Enet_Handle | hEnet, | ||
| uint32_t | coreKey, | ||
| uint8_t | hwPushNum | ||
| ) |
Unregister remote core's timer for synchronization.
Note: The API will send the RPC msg, block for response and if the response status is not success will abort execution. The API will be modified to return error status to allow the application to handle the error in next version.
The timerId is used to indicate Ethfw to stop routing done via Timesync router(TSR).
| hProxy | Handle to Cpsw Proxy |
| hEnet | Unique opaque handle returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| coreKey | Unique core_key returned by CpswProxy_attach() or CpswProxy_attachExtended() |
| hwPushNum | Hardware push number of CPTS |
| int32_t CpswProxy_registerHwPushNotifyCb | ( | CpswProxy_Handle | hProxy, |
| CpswRemoteNotifyService_hwPushNotifyCbFxn | cbFxn | ||
| ) |
Register hardware push notification callback.
| hProxy | Handle to Cpsw Proxy |
| cbFxn | Callback function to be called when event occurs |