63 #ifndef __CPSWPROXY_H__ 64 #define __CPSWPROXY_H__ 68 #include <ethremotecfg/protocol/cpsw_remote_notify_service.h> 70 #include <ti/drv/enet/enet.h> 107 #define CPSWPROXY_SOK (0) 110 #define CPSWPROXY_SINPROGRESS (1) 113 #define CPSWPROXY_EFAIL (-1) 116 #define CPSWPROXY_EBADARGS (-2) 119 #define CPSWPROXY_EINVALIDPARAMS (-3) 122 #define CPSWPROXY_ETIMEOUT (-4) 125 #define CPSWPROXY_EALLOC (-8) 128 #define CPSWPROXY_EUNEXPECTED (-9) 131 #define CPSWPROXY_EBUSY (-10) 134 #define CPSWPROXY_EALREADYOPEN (-11) 137 #define CPSWPROXY_EPERM (-12) 140 #define CPSWPROXY_ENOTSUPPORTED (-13) 143 #define CPSWPROXY_ENOTFOUND (-14) 146 #define CPSWPROXY_EUNKNOWNIOCTL (-15) 149 #define CPSWPROXY_EMALFORMEDIOCTL (-16) 168 typedef struct CpswProxy_Config_s
197 uint32_t masterEndpt);
270 Enet_Handle *pCpswHandle,
274 Enet_MacPort *macPort);
316 Enet_Handle *pCpswHandle,
320 uint32_t *txPSILThreadId,
321 uint32_t *rxFlowStartIdx,
324 Enet_MacPort *macPort);
363 uint32_t *txPSILThreadId);
407 uint32_t *rxFlowStartIdx,
408 uint32_t *rxFlowIdx);
432 uint32_t rxFlowStartIdx,
454 uint8_t *macAddress);
474 const uint8_t *macAddress);
502 uint32_t rxFlowStartIdx,
503 uint32_t rxFlowOffsetIdx,
504 const uint8_t *macAddress);
528 uint32_t rxFlowStartIdx,
529 uint32_t rxFlowOffsetIdx,
530 const uint8_t *macAddress);
556 uint32_t rxFlowStartIdx,
557 uint32_t rxFlowOffsetIdx,
585 uint32_t rxFlowStartIdx,
586 uint32_t rxFlowOffsetIdx,
613 uint32_t rxFlowStartIdx,
614 uint32_t rxFlowOffsetIdx);
642 uint32_t rxFlowStartIdx,
643 uint32_t rxFlowOffsetIdx);
713 const uint8_t *macAddr);
735 const uint8_t *macAddr);
772 uint32_t rxFlowStartIdx,
773 uint32_t rxFlowOffsetIdx,
774 const uint8_t *macAddress,
805 uint32_t rxFlowStartIdx,
806 uint32_t rxFlowOffsetIdx,
807 const uint8_t *macAddress,
837 Enet_IoctlPrms *prms);
857 Enet_MacPort portNum);
880 uint32_t notifyInfoLength);
u32 cmd
Definition: rpmsg-kdrv-transport-ethswitch.h:104
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.
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, Enet_MacPort *macPort)
Attach to Ethernet Switch Remote Device with extended response.
int32_t CpswProxy_connect(void)
Connect to the Cpsw Proxy server.
Cpsw Proxy Client Configuration structure.
Definition: cpsw_proxy.h:168
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...
CpswProxy_Handle CpswProxy_open(const CpswProxy_Config *cfg)
Open CPSW proxy client instance with the given configuration.
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.
int32_t CpswProxy_registerHwPushNotifyCb(CpswRemoteNotifyService_hwPushNotifyCbFxn cbFxn, void *cbArg)
Register hardware push notification callback.
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.
Ethernet Switch Remote Device Data.
Definition: rpmsg-kdrv-transport-ethswitch.h:1331
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.
void CpswProxy_ioctl(CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint32_t cmd, Enet_IoctlPrms *prms)
Invoke Cpsw IOCTL.
void CpswProxy_sendNotify(CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint8_t notifyId, uint8_t *notifyInfo, uint32_t notifyInfoLength)
Send custom notification info from client to server.
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.
void CpswProxy_attach(CpswProxy_Handle hProxy, Enet_Type enetType, Enet_Handle *pCpswHandle, uint32_t *coreKey, uint32_t *rxMtu, uint32_t *txMtu, Enet_MacPort *macPort)
Attach to Ethernet Switch Remote Device.
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.
int32_t CpswProxy_filterDelMac(CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint32_t rxFlowStartIdx, uint32_t rxFlowOffsetIdx, const uint8_t *macAddress, uint16_t vlanId)
Delete multicast address from receive filter.
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.
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.
void CpswProxy_allocRxFlow(CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint32_t *rxFlowStartIdx, uint32_t *rxFlowIdx)
Alloc Rx flow Id.
int32_t CpswProxy_filterAddMac(CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint32_t rxFlowStartIdx, uint32_t rxFlowOffsetIdx, const uint8_t *macAddress, uint16_t vlanId)
Add multicast address to receive filter.
u32 enable
Definition: rpmsg-kdrv-transport-ethswitch.h:104
EthRemoteCfg_VirtPort
Virtual port id.
Definition: ethremotecfg_virtport.h:97
void CpswProxy_allocMac(CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint8_t *macAddress)
Alloc Destination MAC address.
void CpswProxy_unregisterHwPushNotifyCb(void)
Unregister hardware push notification callback.
u8 hwPushNum
Definition: rpmsg-kdrv-transport-ethswitch.h:106
void CpswProxy_freeRxFlow(CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint32_t rxFlowStartIdx, uint32_t rxFlowIdx)
Free Rx flow Id.
void CpswProxy_setPromiscMode(CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, bool enable)
Set promiscuous mode.
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 remo...
Definition: cpsw_proxy.h:163
struct CpswProxy_ClientObj_s * CpswProxy_Handle
CPSW Proxy handle.
Definition: cpsw_proxy.h:182
void CpswProxy_freeMac(CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, const uint8_t *macAddress)
Free Tx Channel CPSW PSIL Destination thread id.
void CpswProxy_delAddrEntry(CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, const uint8_t *macAddr)
Remove macAddress from the switch address resolution table.
void CpswProxy_deinit(void)
Deinitialize CPSW Proxy on a given core.
CpswProxy_deviceDataNotifyCbFxn deviceDataNotifyCb
Definition: cpsw_proxy.h:174
void CpswProxy_init(uint32_t masterCoreId, uint32_t masterEndpt)
Initialize CPSW Proxy on a given core.
void CpswProxy_allocTxCh(CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint32_t *txPSILThreadId)
Alloc Tx Channel CPSW PSIL Destination thread id.
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...
void CpswProxy_close(CpswProxy_Handle hProxy)
Close CPSW proxy client.
EthRemoteCfg_VirtPort virtPort
Definition: cpsw_proxy.h:171
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.
void CpswProxy_unregisterRemoteTimer(CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint8_t hwPushNum)
Unregister remote core's timer for synchronization.
void CpswProxy_detach(CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey)
Detach from Ethernet Switch Remote Device.
void CpswProxy_freeTxCh(CpswProxy_Handle hProxy, Enet_Handle hEnet, uint32_t coreKey, uint32_t txChNum)
Free Tx Channel CPSW PSIL Destination thread id.
This file contains the type definitions and helper macros for Ethernet Firmware's Virtual Port...