![]() |
![]() |
Functions | |
nwal_RetValue | nwal_getBufferReq (nwalSizeInfo_t *sizeCfg, int sizes[nwal_N_BUFS], int aligns[nwal_N_BUFS]) |
API to retrieve memory buffer requirement by NWAL module. | |
nwal_RetValue | nwal_create (const nwalGlobCfg_t *pCfg, nwalSizeInfo_t *pSizeInfo, int sizes[nwal_N_BUFS], void *bases[nwal_N_BUFS], nwal_Inst *pNwalInst) |
API instantiates the driver and allocated global resources and is pre-requisite. | |
nwal_RetValue | nwal_delete (nwal_Inst nwalInst) |
API frees the NetCP resources allocated byNWAL. | |
nwal_RetValue | nwal_getGlobCxtInfo (nwal_Inst nwalInst, nwalGlobCxtInfo_t *pInfo) |
API to retrieve global resources created by NWAL at the end of. | |
nwal_RetValue | nwal_start (nwal_Inst nwalInst, const nwalLocCfg_t *pCfg) |
API would need to be called for all cores as a pre-requisite. API allows local per core related resource configuration to NWAL. | |
nwal_RetValue | nwal_control (nwal_Inst nwalInst, nwalCtlInfo_t *pCtlInfo) |
Control API for additional global configuration at NetCP. | |
nwal_RetValue | nwal_getLocCxtInfo (nwal_Inst nwalInst, nwalLocCxtInfo_t *pInfo) |
API to retrieve local per process resources created by NWAL at the end of. | |
nwal_RetValue | nwal_getChanCxtInfo (nwal_Inst nwalInst, nwal_Handle nwalHandle, nwalChanCxtInfo_t *pInfo) |
API to retrieve internal context information from channel resources maintained by NWAL. Selective NetCP PA/SA channel handles are exposed to handle the case of multiple owner use case for PA/SA LLD. | |
nwal_Bool_t | nwal_getMacIface (nwal_Inst nwalInst, nwalMacParam_t *pParam, nwal_Handle *pIfHandle) |
nwal_getMacIface API will check for already configuration for MAC entry | |
nwal_RetValue | nwal_setMacIface (nwal_Inst nwalInst, nwal_TransID_t transId, nwal_AppId appId, nwalMacParam_t *pParam, nwal_Handle *pIfHandle) |
nwal_setMacIface Configures MAC LUT entry at NetCP. | |
nwal_RetValue | nwal_delMacIface (nwal_Inst nwalInst, nwal_TransID_t transId, nwal_Handle ifHandle) |
nwal_delMacIface Delete MAC LUT entry at NetCP. | |
nwal_Bool_t | nwal_getIPAddr (nwal_Inst nwalInst, nwalIpParam_t *pParam, nwal_Handle pPrevHandle, nwal_Handle *pIpHandle) |
nwal_getIPAddr API will check if there is already IP Address configured by application.If found returns the handle | |
nwal_RetValue | nwal_setIPAddr (nwal_Inst nwalInst, nwal_TransID_t transId, nwal_AppId appId, nwal_Handle ifHandle, nwalIpParam_t *pParam, nwal_Handle *pIpHandle) |
nwal_setIPAddr Add IP Address configuration to NETCP. | |
nwal_RetValue | nwal_delIPAddr (nwal_Inst nwalInst, nwal_TransID_t transId, nwal_Handle ipHandle) |
nwal_deleteIPAddr Delete IP Address configuration at NETCP. | |
nwal_Bool_t | nwal_getSecAssoc (nwal_Inst nwalInst, nwalSaIpSecId_t *pSaId, nwal_SaDir dir, nwal_Handle *pNwalSecAssocHandle, uint32_t *pSwInfo0, uint32_t *pSwInfo1) |
Get an IPSec Security Association Channel. | |
nwal_RetValue | nwal_setSecAssoc (nwal_Inst nwalInst, nwal_TransID_t transId, nwal_AppId appId, nwalSaIpSecId_t *pSaId, nwalCreateSAParams_t *pCreateParam, nwal_Handle *pNwalSecAssocHandle) |
API to create outer IPSec Security Association Channel For inbound direction API will trigger allocating resources at NetCP. Application can either block by passing transaction ID as NWAL_TRANSID_SPIN_WAIT or wait for call back being called with the results For outbound, API will return nwal_TRANS_COMPLETE and no further callback will be called.Application can free transaction ID after returning from API. | |
nwal_RetValue | nwal_delSecAssoc (nwal_Inst nwalInst, nwal_TransID_t transId, nwal_Handle nwalSecAssocHandle) |
API to delete an existing Policy Handle For inbound direction API will trigger allocating resources at NetCP. Application can either block by passing transaction ID as NWAL_TRANSID_SPIN_WAIT or wait for call back being called with the results For outbound, API will return nwal_TRANS_COMPLETE and no further callback will be called.Application can free transaction ID after returning from API. | |
nwal_Bool_t | nwal_getSecPolicy (nwal_Inst nwalInst, nwalSecPolParams_t *pPolParam, nwal_Handle *pNwalSecPolHandle) |
API to retrieve handle for existing security policy for a connection. | |
nwal_RetValue | nwal_setSecPolicy (nwal_Inst nwalInst, nwal_TransID_t transId, nwal_AppId appId, nwalSecPolParams_t *pPolParam, nwal_Handle *pNwalSecPolHandle) |
API to create policy for a connection. | |
nwal_RetValue | nwal_delSecPolicy (nwal_Inst nwalInst, nwal_TransID_t transId, nwal_Handle nwalSecPolHandle) |
API to delete an existing Policy Handle. | |
nwal_RetValue | nwal_addConn (nwal_Inst nwalInst, nwal_TransID_t transId, nwal_AppId appId, nwal_appProtoType_t proto, nwalRxConnCfg_t *pRxConnCfg, nwalTxConnCfg_t *pTxConnCfg, nwal_Handle *pNwalConHandle) |
API to create connection establishment. | |
nwal_RetValue | nwal_delConn (nwal_Inst nwalInst, nwal_TransID_t transId, nwal_Handle nwalConHandle) |
API to delete an existing connection. | |
nwal_RetValue | nwal_cfgConn (nwal_Inst nwalInst, nwal_Handle nwalConHandle, nwalTxConnCfg_t *pTxConnCfg) |
API for run time configuration connection establishment. | |
nwal_RetValue | nwal_refreshConn (nwal_Inst nwalInst, nwal_Handle nwalHandle) |
nwal_refreshConn Refreshes a connection for the core. | |
nwal_RetValue | nwal_getPAStats (nwal_Inst nwalInst, nwal_TransID_t transId, paSysStats_t *pPaStats, nwal_Bool_t doClear) |
nwal_getPAStats Get Statistics from PA | |
nwal_RetValue | nwal_setDMSecAssoc (nwal_Inst nwalInst, nwal_AppId appId, nwalCreateDmSAParams_t *pCreateParam, nwal_Handle *pNwalDmSaHandle) |
nwal_setDMSecAssoc API for creating Data Mode Security Association | |
nwal_RetValue | nwal_delDMSecAssoc (nwal_Inst nwalInst, nwal_Handle nwalDmSaHandle) |
API to delete an existing Data Mode Security Channel. | |
nwal_RetValue | nwal_sendRaw (nwal_Inst nwalInst, nwal_Bool_t lpbackPass, uint16_t bufLen, uint8_t *pBuf) |
nwal_sendRaw Transmit raw packet to the PA | |
nwal_RetValue | nwal_updateProtoHdr (nwal_Inst nwalInst, nwal_Handle nwalHandle, nwalTxPktInfo_t *pPktInfo) |
nwal_updateProtoHdr Update protocol header to the packet | |
nwal_RetValue | nwal_send (nwal_Inst nwalInst, nwal_Handle nwalHandle, nwalTxPktInfo_t *pPktInfo) |
nwal_send Transmit packet out for a connection | |
nwal_RetValue | nwal_sendDM (nwal_Inst nwalInst, nwal_Handle nwalDmSaHandle, nwalDmTxPayloadInfo_t *pDmPloadInfo) |
nwal_sendDM Transmit payload for side band Data Mode Channel | |
void | nwal_pollCtl (nwal_Inst nwalInst, nwal_CmdCallBack *pCmdCallBack, nwal_CmdPaStatsReply *pPaStatsCallBack) |
nwal_pollCtl API for polling Control message response from NetCP: PA Subsystem. | |
uint16_t | nwal_pollPkt (nwal_Inst nwalInst, nwal_pollPktQCtl pktQCtl, uint32_t appCookie, uint16_t maxPkts, NWAL_queueHnd appRxPktQueue, nwal_rxPktCallBack *pRxPktCallBack) |
nwal_pollPkt API for polling packets from network. | |
uint16_t | nwal_pollDm (nwal_Inst nwalInst, nwal_pollDmQCtl dmQCtl, uint32_t appCookie, uint16_t maxPkts, NWAL_queueHnd appRxQueue, nwal_rxDmCallback *pRxDmCallBack) |
nwal_pollDm API for polling Data Mode payload from NetCP after Crypto completion | |
nwal_RetValue | nwal_initPSCmdInfo (nwal_Inst nwalInst, nwalTxPktInfo_t *pPktInfo, nwalTxPSCmdInfo_t *pTxPSCmdInfo) |
nwal_initPsCmdInfo API for Initializing PS Command Info |
nwal_RetValue nwal_addConn | ( | nwal_Inst | nwalInst, |
nwal_TransID_t | transId, | ||
nwal_AppId | appId, | ||
nwal_appProtoType_t | proto, | ||
nwalRxConnCfg_t * | pRxConnCfg, | ||
nwalTxConnCfg_t * | pTxConnCfg, | ||
nwal_Handle * | pNwalConHandle | ||
) |
API to create connection establishment.
This function results in configuration of L4 LUT entry for the RX side.For TX side the function will collect all details to enable header creation. Supports RX only or RX/TX channel
[in] | nwalInst | NWAL Instance identifier |
[in] | transId | Transaction Id maintained by application. Applicable only in the case of inbound Sec Policy. The ID will be returned back by NWAL in nwal_CmdCallBack() upon completion of the transaction. Set this to zero in case of blocking API call It is recommended not to initiate a blocking API call when a callback event driven API is in progress. |
[in] | appId | Application ID to be registered. The handle will be used for all interfaces from NWAL to application: 1) Asynchronous confirmation of configuration response 2) Any packets received from NetCP related to this handle |
[in] | proto | Layer 4 protocol type |
[in] | pRxConnCfg | Configuration for RX packets for the channel. |
[in] | pTxConnCfg | [Optional] Configuration for TX packets for the channel. Will be applicable if NWAL module is used for creating TX header for the channel.If provided as NULL connection will be configured as RX only |
[out] | pNwalConHandle | Connection handle being returned to application |
@see | nwal_OK on success. Error codes |
nwal_RetValue nwal_cfgConn | ( | nwal_Inst | nwalInst, |
nwal_Handle | nwalConHandle, | ||
nwalTxConnCfg_t * | pTxConnCfg | ||
) |
API for run time configuration connection establishment.
This function results in configuration of header details for TX side
[in] | nwalInst | NWAL Instance identifier |
[in] | nwalConHandle | Connection handle to be reconfigured |
[in] | pTxConnCfg | Configuration for TX packets for the channel. Will be applicable if NWAL module is used for creating TX header for the channel. |
@see | nwal_OK on success. Error codes |
nwal_RetValue nwal_control | ( | nwal_Inst | nwalInst, |
nwalCtlInfo_t * | pCtlInfo | ||
) |
Control API for additional global configuration at NetCP.
This function results in configuration of system level rules to NetCP. API is blocking and will return only after successful configuration at NetCP.
[in] | nwalInst | NWAL Instance identifier |
[in] | pCtlInfo | Control Parameters |
@see | nwal_OK on success. Error codes |
nwal_RetValue nwal_create | ( | const nwalGlobCfg_t * | pCfg, |
nwalSizeInfo_t * | pSizeInfo, | ||
int | sizes[nwal_N_BUFS], | ||
void * | bases[nwal_N_BUFS], | ||
nwal_Inst * | pNwalInst | ||
) |
API instantiates the driver and allocated global resources and is pre-requisite.
Allocates global resources valid per system level common across all DSP cores
All NetCP related initialization will be done inside the module. Module also supports a possible use case of NetCP initialization being done by application. In that case application would need to provide paHandle in the API. All QM and PktDMA initialization is required to be done outside module. Following are the resource initialization prerequisite to NWAL module initialization:
[in] | pCfg | Input conguration |
[in] | pSizeInfo | Configuration information for Memory sizing. |
[in] | sizes | Memory Size for the buffers allocated. Expected to be same as output returned by NWAL during nwal_getBufferReq() API |
[in] | bases | Array of the memory buffer base addresses |
[out] | pNwalInst | NWAL Global Instance handle. |
@see | nwal_OK on success. Error codes |
nwal_RetValue nwal_delConn | ( | nwal_Inst | nwalInst, |
nwal_TransID_t | transId, | ||
nwal_Handle | nwalConHandle | ||
) |
API to delete an existing connection.
This function results in deletion of existing connection
[in] | nwalInst | NWAL Instance identifier |
[in] | transId | Transaction Id maintained by application. Applicable only in the case of inbound Sec Policy. The ID will be returned back by NWAL in nwal_CmdCallBack() upon completion of the transaction. Set this to zero in case of blocking API call It is recommended not to initiate a blocking API call when a callback event driven API is in progress. |
[in] | nwalConHandle | Connection handle being returned to application |
@see | nwal_OK on success. Error codes |
nwal_RetValue nwal_delDMSecAssoc | ( | nwal_Inst | nwalInst, |
nwal_Handle | nwalDmSaHandle | ||
) |
API to delete an existing Data Mode Security Channel.
This function results in freeing up SA related resources for Data Mode channel
[in] | nwalInst | NWAL Instance identifier |
[in] | nwalDmSaHandle | Data Mode SA Handle |
@see | nwal_OK on success. Error codes |
nwal_RetValue nwal_delete | ( | nwal_Inst | nwalInst | ) |
API frees the NetCP resources allocated byNWAL.
Frees global resources allocated at NetCP. To be called only one per system
[in] | nwalInst | NWAL Instance identifier |
@see | nwal_OK on success. Error codes |
nwal_RetValue nwal_delIPAddr | ( | nwal_Inst | nwalInst, |
nwal_TransID_t | transId, | ||
nwal_Handle | ipHandle | ||
) |
nwal_deleteIPAddr Delete IP Address configuration at NETCP.
API removes NetCP IP Addres classification rule for local IP Address
[in] | nwalInst | NWAL Instance identifier |
[in] | transId | The ID will be returned back by NWAL in nwal_CmdCallBack() upon completion of the transaction.Set this to NWAL_TRANSID_SPIN_WAIT in case of blocking API call It is recommended not to initiate a blocking API call when a callback event driven API is in progress. |
[in] | ipHandle | Handle returned to application from |
@see | nwal_OK on success. Error codes |
nwal_RetValue nwal_delMacIface | ( | nwal_Inst | nwalInst, |
nwal_TransID_t | transId, | ||
nwal_Handle | ifHandle | ||
) |
nwal_delMacIface Delete MAC LUT entry at NetCP.
The API deletes NetCP configuration received through
[in] | nwalInst | NWAL Instance identifier |
[in] | transId | The ID will be returned back by NWAL in nwal_CmdCallBack() upon completion of the transaction.Set this to NWAL_TRANSID_SPIN_WAIT in case of blocking API call It is recommended not to initiate a blocking API call when a callback event driven API is in progress. |
[in] | ifHandle | Handle returned to application from |
@see | nwal_OK on success. Error codes |
nwal_RetValue nwal_delSecAssoc | ( | nwal_Inst | nwalInst, |
nwal_TransID_t | transId, | ||
nwal_Handle | nwalSecAssocHandle | ||
) |
API to delete an existing Policy Handle For inbound direction API will trigger allocating resources at NetCP. Application can either block by passing transaction ID as NWAL_TRANSID_SPIN_WAIT or wait for call back being called with the results For outbound, API will return nwal_TRANS_COMPLETE and no further callback will be called.Application can free transaction ID after returning from API.
This function results in freeing up SA related resource for Security profile related resources
[in] | nwalInst | NWAL Instance identifier |
[in] | transId | Transaction Id maintained by application. Applicable only in the case of inbound direction. The ID will be returned back by NWAL in nwal_CmdCallBack() upon completion of the transaction.Set this to NWAL_TRANSID_SPIN_WAIT in case of blocking API call It is recommended not to initiate a blocking API call when a callback event driven API is in progress. |
[in] | nwalSecAssocHandle | Connection handle returned from |
@see | nwal_OK or |
nwal_RetValue nwal_delSecPolicy | ( | nwal_Inst | nwalInst, |
nwal_TransID_t | transId, | ||
nwal_Handle | nwalSecPolHandle | ||
) |
API to delete an existing Policy Handle.
This function results in initiation of freeing up resource for Security profile related resources. For inbound direction API will trigger allocating resources at NetCP. Application can either block by passing transaction ID as NWAL_TRANSID_SPIN_WAIT or wait for call back being called with the results For outbound, API will return nwal_TRANS_COMPLETE and no further callback will be called.Application can free transaction ID after returning from API.
[in] | nwalInst | NWAL Instance identifier |
[in] | transId | Transaction Id maintained by application. Applicable only in the case of inbound Sec Policy. The ID will be returned back by NWAL in nwal_CmdCallBack() upon completion of the transaction. Set this to zero in case of blocking API call It is recommended not to initiate a blocking API call when a callback event driven API is in progress. |
[in] | nwalSecPolHandle | Connection handle returned from nwal_setSecPolicy. |
@see | nwal_OK or |
nwal_RetValue nwal_getBufferReq | ( | nwalSizeInfo_t * | sizeCfg, |
int | sizes[nwal_N_BUFS], | ||
int | aligns[nwal_N_BUFS] | ||
) |
API to retrieve memory buffer requirement by NWAL module.
Input to the API is configuration for NWAL through
nwalSizeInfo_t Configuration information for Memory sizing. sizes Buffer sizes aligns Alignment size
@see | nwal_OK on success. Error codes |
nwal_RetValue nwal_getChanCxtInfo | ( | nwal_Inst | nwalInst, |
nwal_Handle | nwalHandle, | ||
nwalChanCxtInfo_t * | pInfo | ||
) |
API to retrieve internal context information from channel resources maintained by NWAL. Selective NetCP PA/SA channel handles are exposed to handle the case of multiple owner use case for PA/SA LLD.
API to retrieve internal context information from channel resources maintained by NWAL. Selective NetCP PA/SA channel handles are exposed to handle the case of multiple owner use case for PA/SA LLD
[in] | nwalInst | NWAL Instance identifier |
[in] | nwalHandle | NWAL handle returned from any config APIs |
[out] | pInfo | NWAL Channel context information |
@see | nwal_OK on success. Error codes |
nwal_RetValue nwal_getGlobCxtInfo | ( | nwal_Inst | nwalInst, |
nwalGlobCxtInfo_t * | pInfo | ||
) |
API to retrieve global resources created by NWAL at the end of.
API to retrieve global resources created by NWAL through
[in] | nwalInst | NWAL Instance identifier |
[out] | pInfo | NWAL global context information |
@see | nwal_OK on success. Error codes |
nwal_Bool_t nwal_getIPAddr | ( | nwal_Inst | nwalInst, |
nwalIpParam_t * | pParam, | ||
nwal_Handle | pPrevHandle, | ||
nwal_Handle * | pIpHandle | ||
) |
nwal_getIPAddr API will check if there is already IP Address configured by application.If found returns the handle
The API lookups IP related configuration at NWAL.
[in] | nwalInst | NWAL Instance identifier |
[in] | pParam | IP Configuration parameters |
[in] | pPrevHandle | Dependent MAC/IP handle |
[in] | pIpHandle | Output handle from NWAL if found. |
Value |
nwal_RetValue nwal_getLocCxtInfo | ( | nwal_Inst | nwalInst, |
nwalLocCxtInfo_t * | pInfo | ||
) |
API to retrieve local per process resources created by NWAL at the end of.
API to retrieve local per process resources created by NWAL at the end of
[in] | nwalInst | NWAL Instance identifier |
[out] | pInfo | NWAL Local context information |
@see | nwal_OK on success. Error codes |
nwal_Bool_t nwal_getMacIface | ( | nwal_Inst | nwalInst, |
nwalMacParam_t * | pParam, | ||
nwal_Handle * | pIfHandle | ||
) |
nwal_getMacIface API will check for already configuration for MAC entry
The API lookups L2/MAC related configuration at NWAL.
[in] | nwalInst | NWAL Instance identifier |
[in] | pParam |
[in] | pIfHandle | Output handle from NWAL if found. |
nwal_TRUE | if found / nwal_FALSE if not configured |
nwal_RetValue nwal_getPAStats | ( | nwal_Inst | nwalInst, |
nwal_TransID_t | transId, | ||
paSysStats_t * | pPaStats, | ||
nwal_Bool_t | doClear | ||
) |
nwal_getPAStats Get Statistics from PA
The API is to querry the stats from PA.If multiple request is initiated callback will be only called with latest transId
[in] | nwalInst | NWAL Instance identifier |
[in] | transId | Transaction Id maintained by application. Applicable only in the case of inbound Sec Policy. The ID will be returned back by NWAL in nwal_CmdPaStatsReply() upon completion of the transaction.Set this to zero in case of blocking API call. It is recommended not to initiate a blocking API call when a callback event driven API is in progress. |
[in] | pPaStats | Valid only if pStatsCallback is NULL and stats requested as blocking call |
[in] | doClear | True to clear the stats. Alternatively False |
@see | nwal_OK on success. Error codes |
nwal_Bool_t nwal_getSecAssoc | ( | nwal_Inst | nwalInst, |
nwalSaIpSecId_t * | pSaId, | ||
nwal_SaDir | dir, | ||
nwal_Handle * | pNwalSecAssocHandle, | ||
uint32_t * | pSwInfo0, | ||
uint32_t * | pSwInfo1 | ||
) |
Get an IPSec Security Association Channel.
This function looks up for an existing outer IPSec Security Association Channel.
[in] | nwalInst | NWAL Instance identifier |
[in] | pSaId | SA ID uniquely identifying Tunnel |
[in] | dir | Direction |
[out] | pNwalSecAssocHandle | Returns nwal_TRUE with NWAL Handle for SA channel if found, nwal_FALSE if not found return NULL as handle |
[out] | pSwInfo0 | SA Security Channel Context as identified by NetCP word 0 |
[out] | pSwInfo1 | SA Security Channel Context as identified by NetCP word 1 |
Value |
nwal_Bool_t nwal_getSecPolicy | ( | nwal_Inst | nwalInst, |
nwalSecPolParams_t * | pPolParam, | ||
nwal_Handle * | pNwalSecPolHandle | ||
) |
API to retrieve handle for existing security policy for a connection.
API to retrieve handle for existing security policy for a connection.
[in] | nwalInst | NWAL Instance identifier |
[in] | pPolParam | Configuration information for Security profile for IPSec Channel. |
[out] | pNwalSecPolHandle | Returns nwal_TRUE with NWAL Handle for SA channel if found, nwal_FALSE if not found with NULL as handle |
Value |
nwal_RetValue nwal_initPSCmdInfo | ( | nwal_Inst | nwalInst, |
nwalTxPktInfo_t * | pPktInfo, | ||
nwalTxPSCmdInfo_t * | pTxPSCmdInfo | ||
) |
nwal_initPsCmdInfo API for Initializing PS Command Info
The API can be called by application to initialize NetCP protocol specific command for any hardware offload functionality. The API should be called for similar packet format with protocol headers at fixed offsets. For transmitting packets out the helper functions included in nwal_util.h can be used.
The API call is not required for the application using
[in] | nwalInst | NWAL Instance identifier |
[in] | pPktInfo | Transmit packet information |
[in] | pTxPSCmdInfo | Protocol Specific command info initialized with static values during init.Dynamic field update will be done during API call nwal_sendxxx |
@see | nwal_OK on success. Error codes |
void nwal_pollCtl | ( | nwal_Inst | nwalInst, |
nwal_CmdCallBack * | pCmdCallBack, | ||
nwal_CmdPaStatsReply * | pPaStatsCallBack | ||
) |
nwal_pollCtl API for polling Control message response from NetCP: PA Subsystem.
The API will poll for control message response from NetCP PA Subsystem
[in] | nwalInst | NWAL Instance identifier |
[in] | pCmdCallBack | Optional:Callback for configuration response processing at application. If passed as NULL,NWAL will use default callback passed during |
[in] | pPaStatsCallBack | Optional:Callback for PA Stats response processing at application. If passed as NULL, NWAL will use default callback passed during |
uint16_t nwal_pollDm | ( | nwal_Inst | nwalInst, |
nwal_pollDmQCtl | dmQCtl, | ||
uint32_t | appCookie, | ||
uint16_t | maxPkts, | ||
NWAL_queueHnd | appRxQueue, | ||
nwal_rxDmCallback * | pRxDmCallBack | ||
) |
nwal_pollDm API for polling Data Mode payload from NetCP after Crypto completion
The API will poll for payload/packet back from NetCP after Crypto completion. In case if application provides an application managed packet Queue, module will poll packet from that Queue.
[in] | nwalInst | NWAL Instance identifier |
[in] | dmQCtl | Bitmap for polling packets from queue for poll |
[in] | appCookie | Optional Application context information if required for a poll callback. Set to NULL if not used |
[in] | maxPkts | Poll and accumulate upto this count per Queue. Maximum value can be |
[in] | appRxQueue | Optional. Application managed Queue Handle. Required only if API is called for |
[in] | pRxDmCallBack | Optional:Callback for packet processing at application. Set to NULL for NWAL to use default |
Number | of packets returned through callback callback configured during |
uint16_t nwal_pollPkt | ( | nwal_Inst | nwalInst, |
nwal_pollPktQCtl | pktQCtl, | ||
uint32_t | appCookie, | ||
uint16_t | maxPkts, | ||
NWAL_queueHnd | appRxPktQueue, | ||
nwal_rxPktCallBack * | pRxPktCallBack | ||
) |
nwal_pollPkt API for polling packets from network.
The API will poll for packets from Network. In case if application provides an application managed packet Queue, module will poll packet from that Queue.
[in] | nwalInst | NWAL Instance identifier |
[in] | pktQCtl | Bitmap for polling packets from queue for poll |
[in] | appCookie | Optional Application context information if required for a poll. Set to NULL if not used |
[in] | maxPkts | Poll and accumulate upto this count per Queue. Maximum value can be |
[in] | appRxPktQueue | Optional. Application managed Queue Handle. Required only if API is called for |
[in] | pRxPktCallBack | Optional:Callback for packet processing at application. Set to NULL for NWAL to use default |
Number | of packets returned through callback callback configured during |
nwal_RetValue nwal_refreshConn | ( | nwal_Inst | nwalInst, |
nwal_Handle | nwalHandle | ||
) |
nwal_refreshConn Refreshes a connection for the core.
API to be used to refresh an NWAL handle created external to the core
[in] | nwalInst | NWAL Instance identifier |
[in] | nwalHandle | Handle created external to the core. The handle could be the one returned from following APIs |
@see | nwal_OK on success. Error codes |
nwal_RetValue nwal_send | ( | nwal_Inst | nwalInst, |
nwal_Handle | nwalHandle, | ||
nwalTxPktInfo_t * | pPktInfo | ||
) |
nwal_send Transmit packet out for a connection
The API will result in transmission of packets out after creation of necessary command labels. Application is required to handle any garbage collection for freeing the packet if return queue for the packet is not pointing to free queue.
In the case of Application requiring NWAL to update L2/L3/L4 protocol header before transmit, API
[in] | nwalInst | NWAL Instance identifier |
[in] | nwalHandle | Can be
|
[in] | pPktInfo | Transmit packet information |
@see | nwal_OK on success. Error codes |
nwal_RetValue nwal_sendDM | ( | nwal_Inst | nwalInst, |
nwal_Handle | nwalDmSaHandle, | ||
nwalDmTxPayloadInfo_t * | pDmPloadInfo | ||
) |
nwal_sendDM Transmit payload for side band Data Mode Channel
The API will result in transmission of payload for side band crypto offload to SA for data mode channel
[in] | nwalInst | NWAL Instance identifier |
[in] | nwalDmSaHandle | Data Mode SA Handle |
[in] | pDmPloadInfo | Data Mode Payload with meta data |
@see | nwal_OK on success. Error codes |
nwal_RetValue nwal_sendRaw | ( | nwal_Inst | nwalInst, |
nwal_Bool_t | lpbackPass, | ||
uint16_t | bufLen, | ||
uint8_t * | pBuf | ||
) |
nwal_sendRaw Transmit raw packet to the PA
The API transmits the raw packet to the PA.
[in] | nwalInst | NWAL Instance identifier |
[in] | lpbackPass | Loopback the packet at NetCP PASS. Useful for debugging any classification action at NetCP |
[in] | bufLen | Length of buffer being transmitted. |
[in] | pBuf | Byte array with the payload |
@see | nwal_OK on success. Error codes |
nwal_RetValue nwal_setDMSecAssoc | ( | nwal_Inst | nwalInst, |
nwal_AppId | appId, | ||
nwalCreateDmSAParams_t * | pCreateParam, | ||
nwal_Handle * | pNwalDmSaHandle | ||
) |
nwal_setDMSecAssoc API for creating Data Mode Security Association
API for creating Data Mode Security Association
[in] | nwalInst | NWAL Instance identifier |
[in] | appId | Application ID to be registered. NWAL will pass the same ID back for the payload received back from NetCP after crypto completion |
[in] | pCreateParam | Configuration parameters. |
[out] | pNwalDmSaHandle | NWAL Handle for SA Data mode channel |
@see | nwal_OK on success. Error codes |
nwal_RetValue nwal_setIPAddr | ( | nwal_Inst | nwalInst, |
nwal_TransID_t | transId, | ||
nwal_AppId | appId, | ||
nwal_Handle | ifHandle, | ||
nwalIpParam_t * | pParam, | ||
nwal_Handle * | pIpHandle | ||
) |
nwal_setIPAddr Add IP Address configuration to NETCP.
API configures NetCP to add classification rule for local IP Address
[in] | nwalInst | NWAL Instance identifier |
[in] | transId | The ID will be returned back by NWAL in nwal_CmdCallBack() upon completion of the transaction.Set this to NWAL_TRANSID_SPIN_WAIT in case of blocking API call It is recommended not to initiate a blocking API call when a callback event driven API is in progress. |
[in] | appId | Application ID to be registered. The handle will be used for all interfaces from NWAL to application: 1) Asynchronous confirmation of configuration response 2) Any packets received from NetCP related to this handle |
[in] | ifHandle | Handle returned to application from |
[in] | pParam | Configuration parameters for IP classification |
[out] | pIpHandle | Handle for IP related resource |
@see | nwal_OK on success. Error codes |
nwal_RetValue nwal_setMacIface | ( | nwal_Inst | nwalInst, |
nwal_TransID_t | transId, | ||
nwal_AppId | appId, | ||
nwalMacParam_t * | pParam, | ||
nwal_Handle * | pIfHandle | ||
) |
nwal_setMacIface Configures MAC LUT entry at NetCP.
The API configures L2/MAC related configuration to NetCP.
[in] | nwalInst | NWAL Instance identifier |
[in] | transId | The ID will be returned back by NWAL in nwal_CmdCallBack() upon completion of the transaction. Set this to NWAL_TRANSID_SPIN_WAIT in case of blocking API call It is recommended not to initiate a blocking API call when a callback event driven API is in progress. |
[in] | appId | Application ID to be registered. The handle will be used for all interfaces from NWAL to application: 1) Asynchronous confirmation of configuration response 2) Any packets received from NetCP related to this handle |
[in] | pParam | Configuration parameters. |
[in] | pIfHandle | Output handle from NWAL. To be used for any next route classification based on this interface handle. |
@see | nwal_OK on success. Error codes |
nwal_RetValue nwal_setSecAssoc | ( | nwal_Inst | nwalInst, |
nwal_TransID_t | transId, | ||
nwal_AppId | appId, | ||
nwalSaIpSecId_t * | pSaId, | ||
nwalCreateSAParams_t * | pCreateParam, | ||
nwal_Handle * | pNwalSecAssocHandle | ||
) |
API to create outer IPSec Security Association Channel For inbound direction API will trigger allocating resources at NetCP. Application can either block by passing transaction ID as NWAL_TRANSID_SPIN_WAIT or wait for call back being called with the results For outbound, API will return nwal_TRANS_COMPLETE and no further callback will be called.Application can free transaction ID after returning from API.
This function create outer IPSec Security Association Channel.
[in] | nwalInst | NWAL Instance identifier |
[in] | transId | Transaction Id maintained by application. Applicable only in the case of inbound direction. The ID will be returned back by NWAL in nwal_CmdCallBack() upon completion of the transaction.Set this to NWAL_TRANSID_SPIN_WAIT in case of blocking API call It is recommended not to initiate a blocking API call when a callback event driven API is in progress. |
[in] | appId | Application ID to be registered. The handle will be used for all interfaces from NWAL to application: 1) Asynchronous confirmation of configuration response 2) Any packets received from NetCP related to this handle |
[in] | pSaId | SA ID uniquely identifying Tunnel |
[in] | pCreateParam | Configuration parameters. |
[out] | pNwalSecAssocHandle | NWAL Handle for SA channel |
@see | nwal_OK or |
nwal_RetValue nwal_setSecPolicy | ( | nwal_Inst | nwalInst, |
nwal_TransID_t | transId, | ||
nwal_AppId | appId, | ||
nwalSecPolParams_t * | pPolParam, | ||
nwal_Handle * | pNwalSecPolHandle | ||
) |
API to create policy for a connection.
This function results in configuration of Inner IP LUT entry for the RX side. For inbound direction API will trigger allocating resources at NetCP. Application can either block by passing transaction ID as NWAL_TRANSID_SPIN_WAIT or wait for call back being called with the results For outbound, API will return nwal_TRANS_COMPLETE and no further callback will be called.Application can free transaction ID after returning from API.
[in] | nwalInst | NWAL Instance identifier |
[in] | transId | Transaction Id maintained by application. Applicable only in the case of inbound Sec Policy. The ID will be returned back by NWAL in nwal_CmdCallBack() upon completion of the transaction.Set this to NWAL_TRANSID_SPIN_WAIT in case of blocking API call It is recommended not to initiate a blocking API call when a callback event driven API is in progress. |
[in] | appId | Application ID to be registered. The handle will be used for all interfaces from NWAL to application: 1) Asynchronous confirmation of configuration response 2) Any packets received from NetCP related to this handle |
[in] | pPolParam | Configuration information for Security profile for IPSec Channel. |
[out] | pNwalSecPolHandle | NWAL Handle identifying the policy configuration |
@see | nwal_OK or |
nwal_RetValue nwal_start | ( | nwal_Inst | nwalInst, |
const nwalLocCfg_t * | pCfg | ||
) |
API would need to be called for all cores as a pre-requisite. API allows local per core related resource configuration to NWAL.
Following resource initialization is handled in API:
[in] | nwalInst | NWAL Instance identifier |
[in] | pCfg |
@see | nwal_OK on success. Error codes |
nwal_RetValue nwal_updateProtoHdr | ( | nwal_Inst | nwalInst, |
nwal_Handle | nwalHandle, | ||
nwalTxPktInfo_t * | pPktInfo | ||
) |
nwal_updateProtoHdr Update protocol header to the packet
The API will result in prepending the packet with:MAC/[IPSec]/IP/UDP header for the packet based on the
[in] | nwalInst | NWAL Instance identifier |
[in] | nwalHandle | Should be connHandle returned from |
[in] | pPktInfo | TX metadata with pkt containing payload. API will update header specific offset information to the metadata during update |
@see | nwal_OK on success. Error codes |