Functions
NWAL Transmit Low Level Helper API's
NWAL Low Level APIs

Functions

static void nwal_mCmdUpdatePSData (Ti_Pkt *pPkt, nwalTxPSCmdInfo_t *pTxPSCmdInfo, Cppi_HostDesc **ppPktDesc, uint8_t **ppPsDataBuf)
 nwal_mCmdUpdatePSData Update NetCP command for any offload functionilty for TX packets.
static void nwal_mCmdSetPort (Ti_Pkt *pPkt, nwalTxPSCmdInfo_t *pTxPSCmdInfo, nwal_enetPort_t enetPort)
 nwal_mCmdSetPort Minimal NetCP offload case. EMAC port information for outgoing packet will be updated.
static void nwal_mCmdSetL4CkSumPort (Ti_Pkt *pPkt, nwalTxPSCmdInfo_t *pTxPSCmdInfo, uint16_t l4OffBytes, uint16_t l4Len, uint16_t pseudoHdrChecksum, nwal_enetPort_t enetPort)
 nwal_mCmdSetL4CkSumPort Update L4 checksum command and outgoing EMAC port to NetCP command.
static void nwal_mCmdSetCrypPort (Ti_Pkt *pPkt, nwalTxPSCmdInfo_t *pTxPSCmdInfo, uint16_t saOffBytes, uint16_t saPayloadLen, uint32_t swInfo0, uint32_t swInfo1, nwal_enetPort_t enetPort)
 nwal_mCmdSetCrypPort Update Crypto command and outgoing EMAC port to NetCP command.
static void nwal_mCmdSetL3CkSumCrypPort (Ti_Pkt *pPkt, nwalTxPSCmdInfo_t *pTxPSCmdInfo, uint16_t saOffBytes, uint16_t saPayloadLen, uint32_t swInfo0, uint32_t swInfo1, nwal_enetPort_t enetPort)
 nwal_mCmdSetL3CkSumCrypPort Update L3 checksum, Crypto command and outgoing EMAC port to NetCP command.
static void nwal_mCmdSetL4CkSumCrypPort (Ti_Pkt *pPkt, nwalTxPSCmdInfo_t *pTxPSCmdInfo, uint16_t l4OffBytes, uint16_t l4Len, uint16_t pseudoHdrChecksum, uint16_t saOffBytes, uint16_t saPayloadLen, uint32_t swInfo0, uint32_t swInfo1, nwal_enetPort_t enetPort)
 nwal_mCmdSetL4CkSumCrypPort Update L4 checksum,Crypto and outgoing EMAC port to NetCP command.
static void nwal_mCmdSetAHCrypPort (Ti_Pkt *pPkt, nwalTxPSCmdInfo_t *pTxPSCmdInfo, uint16_t saOffBytes, uint16_t saPayloadLen, uint32_t swInfo0, uint32_t swInfo1, uint16_t saAhIcvOffBytes, uint16_t saAhMacSize, nwal_enetPort_t enetPort)
 nwal_mCmdSetAHCrypPort Update Crypto command and outgoing EMAC port to NetCP command for IPSec AH mode.
static void nwal_mCmdSetL4CkSumAHCrypPort (Ti_Pkt *pPkt, nwalTxPSCmdInfo_t *pTxPSCmdInfo, uint16_t l4OffBytes, uint16_t l4Len, uint16_t pseudoHdrChecksum, uint16_t saOffBytes, uint16_t saPayloadLen, uint32_t swInfo0, uint32_t swInfo1, uint16_t saAhIcvOffBytes, uint16_t saAhMacSize, nwal_enetPort_t enetPort)
 nwal_mCmdSetL4CkSumAHCrypPort Update L4 checksum,Crypto and outgoing EMAC port for IPSec AH packet to NetCP command.
static void nwal_mmGetDmAuthTag (Ti_Pkt *pPkt, uint8_t **ppAuthTag, uint32_t *pAuthTagLen)
 nwal_mmGetDmAuthTag Get Authentication Tag for Data Mode SA packet
static void nwal_mmGetDmAppCtxId (Ti_Pkt *pPkt, uint32_t *pAppCtxId)
 nwal_mmGetDmAppCtxId Get Application Context for Data Mode SA packet

Function Documentation

static void nwal_mCmdSetAHCrypPort ( Ti_Pkt *  pPkt,
nwalTxPSCmdInfo_t *  pTxPSCmdInfo,
uint16_t  saOffBytes,
uint16_t  saPayloadLen,
uint32_t  swInfo0,
uint32_t  swInfo1,
uint16_t  saAhIcvOffBytes,
uint16_t  saAhMacSize,
nwal_enetPort_t  enetPort 
) [inline, static]

nwal_mCmdSetAHCrypPort Update Crypto command and outgoing EMAC port to NetCP command for IPSec AH mode.

Inline macro API can be used to do dynamic update of crypto command parameters to NetCP before transmitting packet out of specific EMAC Port. In this case application is expected to provide full packet including protocol headers and call Qmss_queuePushXX API to transmit the packet out. QMSS push operation is being separated to:

  • give flexibility to application for TX time and packet preparation
  • Have control on either doing raw push w/o virtual to physical address translation Application would also need to do required cache flush operation in the case of non cache coherent architecure. Refer nwal_send() for sample implementation
Parameters:
[in]pPktPacket to be transmitted out of NetCP
[in]pTxPSCmdInfoStatic Command Label
See also:
nwalTxPSCmdInfo_t created during API call
nwal_initPSCmdInfo
Parameters:
[in]saOffBytesOffset from base of the packet to the header of protocol per the following list:
  • IPSEC ESP with AH: IP header
  • IPSEC ESP: ESP Header
[in]saPayloadLenLength of the payload starting from saOffBytes to the end of the protocol
[in]swInfo0Sw Info with SA context related details
[in]swInfo1Sw Info with SA context related details
[in]saAhIcvOffBytesOffset to the ICV field in the case of IPSec AH mode for authentication tag insertion by NETCP.
[in]saAhMacSizeSize of the authentication tag to be inserted by NetCP in the case of IPSec AH mode. Reset to zero in the case of ESP mode. Application also need to make sure that size is not more than max value NWAL_IPSEC_AH_MAX_AUTH_TAG_BYTES
[in]enetPortTransmit Enet Port
Precondition:
See also:
nwal_getSecAssoc
nwal_initPSCmdInfo
static void nwal_mCmdSetCrypPort ( Ti_Pkt *  pPkt,
nwalTxPSCmdInfo_t *  pTxPSCmdInfo,
uint16_t  saOffBytes,
uint16_t  saPayloadLen,
uint32_t  swInfo0,
uint32_t  swInfo1,
nwal_enetPort_t  enetPort 
) [inline, static]

nwal_mCmdSetCrypPort Update Crypto command and outgoing EMAC port to NetCP command.

Inline macro API can be used to do dynamic update of crypto command parameters to NetCP before transmitting packet out of specific EMAC Port. In this case application is expected to provide full packet including protocol headers and call Qmss_queuePushXX API to transmit the packet out. QMSS push operation is being separated to:

  • give flexibility to application for TX time and packet preparation
  • Have control on either doing raw push w/o virtual to physical address translation Application would also need to do required cache flush operation in the case of non cache coherent architecure. Refer nwal_send() for sample implementation
Parameters:
[in]pPktPacket to be transmitted out of NetCP
[in]pTxPSCmdInfoStatic Command Label
See also:
nwalTxPSCmdInfo_t created during API call
nwal_initPSCmdInfo
Parameters:
[in]saOffBytesOffset from base of the packet to the header of protocol per the following list:
  • IPSEC ESP with AH: IP header
  • IPSEC ESP: ESP Header
[in]saPayloadLenLength of the payload starting from saOffBytes to the end of the protocol
[in]swInfo0Sw Info with SA context related details
[in]swInfo1Sw Info with SA context related details
[in]enetPortTransmit Enet Port
Precondition:
See also:
nwal_getSecAssoc
nwal_initPSCmdInfo
static void nwal_mCmdSetL3CkSumCrypPort ( Ti_Pkt *  pPkt,
nwalTxPSCmdInfo_t *  pTxPSCmdInfo,
uint16_t  saOffBytes,
uint16_t  saPayloadLen,
uint32_t  swInfo0,
uint32_t  swInfo1,
nwal_enetPort_t  enetPort 
) [inline, static]

nwal_mCmdSetL3CkSumCrypPort Update L3 checksum, Crypto command and outgoing EMAC port to NetCP command.

Inline macro API can be used to do dynamic update of crypto command parameters to NetCP before transmitting packet out of specific EMAC Port. In this case application is expected to provide full packet including protocol headers and call Qmss_queuePushXX API to transmit the packet out. QMSS push operation is being separated to:

  • give flexibility to application for TX time and packet preparation
  • Have control on either doing raw push w/o virtual to physical address translation Application would also need to do required cache flush operation in the case of non cache coherent architecure. Refer nwal_send() for sample implementation
Parameters:
[in]pPktPacket to be transmitted out of NetCP
[in]pTxPSCmdInfoStatic Command Label
See also:
nwalTxPSCmdInfo_t created during API call
nwal_initPSCmdInfo
Parameters:
[in]saOffBytesOffset from base of the packet to the header of protocol per the following list:
  • IPSEC ESP with AH: IP header
  • IPSEC ESP: ESP Header
[in]saPayloadLenLength of the payload starting from saOffBytes to the end of the protocol
[in]swInfo0Sw Info with SA context related details
[in]swInfo1Sw Info with SA context related details
[in]enetPortTransmit Enet Port
Precondition:
See also:
nwal_getSecAssoc
nwal_initPSCmdInfo
static void nwal_mCmdSetL4CkSumAHCrypPort ( Ti_Pkt *  pPkt,
nwalTxPSCmdInfo_t *  pTxPSCmdInfo,
uint16_t  l4OffBytes,
uint16_t  l4Len,
uint16_t  pseudoHdrChecksum,
uint16_t  saOffBytes,
uint16_t  saPayloadLen,
uint32_t  swInfo0,
uint32_t  swInfo1,
uint16_t  saAhIcvOffBytes,
uint16_t  saAhMacSize,
nwal_enetPort_t  enetPort 
) [inline, static]

nwal_mCmdSetL4CkSumAHCrypPort Update L4 checksum,Crypto and outgoing EMAC port for IPSec AH packet to NetCP command.

Inline macro API can be used to do dynamic update for Crypto in IPSec AH mode and L4 checksum offload command to NetCP before transmitting packet out of specific EMAC Port. In this case application is expected to provide full packet including protocol headers and call Qmss_queuePushXX API to transmit the packet out. QMSS push operation is being separated to:

  • give flexibility to application for TX time and packet preparation
  • Have control on either doing raw push w/o virtual to physical address translation Application would also need to do required cache flush operation in the case of non cache coherent architecure. Refer nwal_send() for sample implementation
Parameters:
[in]pPktPacket to be transmitted out of NetCP
[in]pTxPSCmdInfoStatic Command Label
See also:
nwalTxPSCmdInfo_t created during API call
nwal_initPSCmdInfo
Parameters:
[in]l4OffBytesOffset to L4 Header
[in]l4LenLayer 4 payload length including header + payload
[in]pseudoHdrChecksumPseudo Header checksum for L4
[in]saOffBytesOffset from base of the packet to the header of protocol per the following list:
  • IPSEC ESP with AH: IP header
  • IPSEC ESP: ESP Header
[in]saPayloadLenLength of the payload starting from saOffBytes to the end of the protocol
[in]swInfo0Sw Info with SA context related details
[in]swInfo1Sw Info with SA context related details
[in]saAhIcvOffBytesOffset to the ICV field in the case of IPSec AH mode for authentication tag insertion by NETCP.
[in]saAhMacSizeSize of the authentication tag to be inserted by NetCP in the case of IPSec AH mode. Reset to zero in the case of ESP mode. Application also need to make sure that size is not more than max value NWAL_IPSEC_AH_MAX_AUTH_TAG_BYTES
[in]enetPortTransmit Enet Port
Precondition:
See also:
nwal_getSecAssoc
nwal_initPSCmdInfo
static void nwal_mCmdSetL4CkSumCrypPort ( Ti_Pkt *  pPkt,
nwalTxPSCmdInfo_t *  pTxPSCmdInfo,
uint16_t  l4OffBytes,
uint16_t  l4Len,
uint16_t  pseudoHdrChecksum,
uint16_t  saOffBytes,
uint16_t  saPayloadLen,
uint32_t  swInfo0,
uint32_t  swInfo1,
nwal_enetPort_t  enetPort 
) [inline, static]

nwal_mCmdSetL4CkSumCrypPort Update L4 checksum,Crypto and outgoing EMAC port to NetCP command.

Inline macro API can be used to do dynamic update for Crypto and L4 checksum offload command to NetCP before transmitting packet out of specific EMAC Port. In this case application is expected to provide full packet including protocol headers and call Qmss_queuePushXX API to transmit the packet out. QMSS push operation is being separated to:

  • give flexibility to application for TX time and packet preparation
  • Have control on either doing raw push w/o virtual to physical address translation Application would also need to do required cache flush operation in the case of non cache coherent architecure. Refer nwal_send() for sample implementation
Parameters:
[in]pPktPacket to be transmitted out of NetCP
[in]pTxPSCmdInfoStatic Command Label
See also:
nwalTxPSCmdInfo_t created during API call
nwal_initPSCmdInfo
Parameters:
[in]l4OffBytesOffset to L4 Header
[in]l4LenLayer 4 payload length including header + payload
[in]pseudoHdrChecksumPseudo Header checksum for L4
[in]saOffBytesOffset from base of the packet to the header of protocol per the following list:
  • IPSEC ESP with AH: IP header
  • IPSEC ESP: ESP Header
[in]saPayloadLenLength of the payload starting from saOffBytes to the end of the protocol
[in]swInfo0Sw Info with SA context related details
[in]swInfo1Sw Info with SA context related details
[in]enetPortTransmit Enet Port
Precondition:
See also:
nwal_getSecAssoc
nwal_initPSCmdInfo
static void nwal_mCmdSetL4CkSumPort ( Ti_Pkt *  pPkt,
nwalTxPSCmdInfo_t *  pTxPSCmdInfo,
uint16_t  l4OffBytes,
uint16_t  l4Len,
uint16_t  pseudoHdrChecksum,
nwal_enetPort_t  enetPort 
) [inline, static]

nwal_mCmdSetL4CkSumPort Update L4 checksum command and outgoing EMAC port to NetCP command.

Inline macro API can be used to do dynamic update for L4 checksum offload command to NetCP before transmitting packet out of specific EMAC Port. In this case application is expected to provide full packet including protocol headers and call Qmss_queuePushXX API to transmit the packet out. QMSS push operation is being separated to:

  • give flexibility to application for TX time and packet preparation
  • Have control on either doing raw push w/o virtual to physical address translation Application would also need to do required cache flush operation in the case of non cache coherent architecure. Refer
    See also:
    nwal_send() for sample implementation
    Parameters:
    [in]pPktPacket to be transmitted out of NetCP
    [in]pTxPSCmdInfoStatic Command Label
    See also:
    nwalTxPSCmdInfo_t created during API call
    nwal_initPSCmdInfo
    Parameters:
    [in]l4OffBytesOffset to Layer 4 header
    [in]l4LenLayer 4 payload length including header + payload
    [in]pseudoHdrChecksumPseudo Header checksum for L4
    [in]enetPortTransmit Enet Port
    Precondition:
    See also:
    nwal_initPSCmdInfo
static void nwal_mCmdSetPort ( Ti_Pkt *  pPkt,
nwalTxPSCmdInfo_t *  pTxPSCmdInfo,
nwal_enetPort_t  enetPort 
) [inline, static]

nwal_mCmdSetPort Minimal NetCP offload case. EMAC port information for outgoing packet will be updated.

Inline macro API can be used to transmit packet out of specific EMAC Port without using any offload feature at NetCP. In this case application is expected to provide full packet including protocol headers and call Qmss_queuePushXX API to transmit the packet out. QMSS push operation is being separated to:

  • give flexibility to application for TX time and packet preparation
  • Have control on either doing raw push w/o virtual to physical address translation Application would also need to do required cache flush operation in the case of non cache coherent architecure. Refer
    See also:
    nwal_send() for sample implementation
    Parameters:
    [in]pPktPacket to be transmitted out of NetCP
    [in]pTxPSCmdInfoStatic Command Label
    See also:
    nwalTxPSCmdInfo_t created during API call
    nwal_initPSCmdInfo
    Parameters:
    [in]enetPortTransmit Enet Port
    Precondition:
    See also:
    nwal_initPSCmdInfo
static void nwal_mCmdUpdatePSData ( Ti_Pkt *  pPkt,
nwalTxPSCmdInfo_t *  pTxPSCmdInfo,
Cppi_HostDesc **  ppPktDesc,
uint8_t **  ppPsDataBuf 
) [inline, static]

nwal_mCmdUpdatePSData Update NetCP command for any offload functionilty for TX packets.

Inline macro API can be used to update PS data. API to be called for updating PS data with no additional per packet modification compared to already available after

See also:
nwal_initPSCmdInfo API call. In this case application is expected to provide full packet including protocol headers and call Qmss_queuePushXX API to transmit the packet out. QMSS push operation is being separated to:
  • give flexibility to application for TX time and packet preparation
  • Have control on either doing raw push w/o virtual to physical address translation Application would also need to do required cache flush operation in the case of non cache coherent architecure. Refer
nwal_send for sample implementation
Parameters:
[in]pPktPacket to be transmitted out of NetCP
[in]pTxPSCmdInfoStatic Command Label
See also:
nwalTxPSCmdInfo_t created during API call
Parameters:
[in]ppPktDescCPPI packet descriptor which could be used
[in]ppPsDataBufBuffer containing PS Data
See also:
nwal_initPSCmdInfo
Precondition:
See also:
nwal_initPSCmdInfo
static void nwal_mmGetDmAppCtxId ( Ti_Pkt *  pPkt,
uint32_t *  pAppCtxId 
) [inline, static]

nwal_mmGetDmAppCtxId Get Application Context for Data Mode SA packet

Inline macro API to retrieve the Application Context for Data Mode SA packet.

Parameters:
[in]pPktPacket received after crypto action from NetCP
[in]pAppCtxIdApplication Context Id which was passed during
See also:
nwal_sendDM
Precondition:
See also:
nwal_setDMSecAssoc
nwal_sendDM
static void nwal_mmGetDmAuthTag ( Ti_Pkt *  pPkt,
uint8_t **  ppAuthTag,
uint32_t *  pAuthTagLen 
) [inline, static]

nwal_mmGetDmAuthTag Get Authentication Tag for Data Mode SA packet

Inline macro API to retrieve the Authentication tag for Data Mode SA packet.

Parameters:
[in]pPktPacket received after crypto action from NetCP
[in]ppAuthTagAuthentication Tag for the packet
[in]pAuthTagLenLength of authentication tag
Precondition:
See also:
nwal_setDMSecAssoc
nwal_sendDM

Copyright 2014, Texas Instruments Incorporated