PDK API Guide for J721E
|
Functions | |
static uint32_t | CSL_udmapCppi5GetDescType (const void *pDesc) |
Get the descriptor type. More... | |
static void | CSL_udmapCppi5SetDescType (void *pDesc, uint32_t descType) |
Set the descriptor type. More... | |
static uint32_t | CSL_udmapCppi5GetPktLen (const void *pDesc) |
Get the packet length. More... | |
static void | CSL_udmapCppi5SetPktLen (void *pDesc, uint32_t descType, uint32_t pktLen) |
Set the packet length. More... | |
static void | CSL_udmapCppi5HostSetPktLen (void *pDesc, uint32_t pktLen) |
Set the packet length of host mode packet descriptors. More... | |
static void | CSL_udmapCppi5MonoSetPktLen (void *pDesc, uint32_t pktLen) |
Set the packet length of mono mode packet descriptors. More... | |
static void | CSL_udmapCppi5TrSetPktLen (void *pDesc, uint32_t pktLen) |
Set the packet length of TR mode packet descriptors. More... | |
static uint64_t | CSL_udmapCppi5GetBufferAddr (const CSL_UdmapCppi5HMPD *pDesc) |
Get the buffer address. More... | |
static uint32_t | CSL_udmapCppi5GetBufferLen (const CSL_UdmapCppi5HMPD *pDesc) |
Get the buffer length. More... | |
static void | CSL_udmapCppi5SetBufferAddr (CSL_UdmapCppi5HMPD *pDesc, uint64_t physBufferAddr) |
Set the buffer address. More... | |
static void | CSL_udmapCppi5SetOrgBufferAddr (CSL_UdmapCppi5HMPD *pDesc, uint64_t physBufferAddr) |
Set the original buffer address. More... | |
static void | CSL_udmapCppi5SetBufferLen (CSL_UdmapCppi5HMPD *pDesc, uint32_t bufferLenBytes) |
Set the buffer length. More... | |
static void | CSL_udmapCppi5SetOrgBufferLen (CSL_UdmapCppi5HMPD *pDesc, uint32_t bufferLenBytes) |
Set the original buffer length. More... | |
static void | CSL_udmapCppi5LinkDesc (CSL_UdmapCppi5HMPD *pDesc, uint64_t physBufferDescAddr) |
Link a buffer descriptor to a descriptor. More... | |
static bool | CSL_udmapCppi5IsEpiDataPresent (const void *pDesc) |
Is the EPI block present in the descriptor? More... | |
static void | CSL_udmapCppi5SetEpiDataPresent (void *pDesc, bool bEpiDataPresent) |
Set indicator if the EPI block is present in the descriptor. More... | |
static uint32_t * | CSL_udmapCppi5GetEpiDataPtr (const void *pDesc) |
Return pointer to EPI block data. More... | |
static int32_t | CSL_udmapCppi5RdEpiData (const void *pDesc, uint32_t *pTsInfo, uint32_t *pSwInfo0, uint32_t *pSwInfo1, uint32_t *pSwInfo2) |
Read the EPI block data. More... | |
static void | CSL_udmapCppi5WrEpiData (const void *pDesc, uint32_t tsInfo, uint32_t swInfo0, uint32_t swInfo1, uint32_t swInfo2) |
Write the EPI block data. More... | |
static uint32_t | CSL_udmapCppi5GetPsDataLoc (const void *pDesc) |
Get the location of the protocol-specific data. More... | |
static void | CSL_udmapCppi5SetPsDataLoc (void *pDesc, uint32_t psLoc) |
Set the location of the protocol-specific data. More... | |
static uint32_t | CSL_udmapCppi5GetPsDataLen (const void *pDesc) |
Get the number of bytes of protocol-specific data. More... | |
static void | CSL_udmapCppi5SetPsDataLen (void *pDesc, uint32_t psDataLen) |
Set the number of bytes of protocol-specific data. More... | |
static uint64_t | CSL_udmapCppi5GetPsDataAddr (const void *pDesc, bool bInSopBuf, bool bEpiPresent) |
Return address of the protocol-specific data. More... | |
static uint8_t * | CSL_udmapCppi5GetPsDataPtr (const void *pDesc) |
static uint32_t | CSL_udmapCppi5GetSrcTag (const void *pDesc) |
Get source tag. More... | |
static uint32_t | CSL_udmapCppi5GetDstTag (const void *pDesc) |
Get destination tag. More... | |
static void | CSL_udmapCppi5SetSrcTag (void *pDesc, uint32_t srcTag) |
Set source tag. More... | |
static void | CSL_udmapCppi5SetDstTag (void *pDesc, uint32_t dstTag) |
Set destination tag. More... | |
static uint32_t | CSL_udmapCppi5GetErrorFlags (const void *pDesc) |
Get error flags. More... | |
static uint32_t | CSL_udmapCppi5GetPsFlags (const void *pDesc) |
Get ps flags. More... | |
static void | CSL_udmapCppi5SetPsFlags (void *pDesc, uint32_t psFlags) |
Set ps flags. More... | |
static uint32_t | CSL_udmapCppi5GetPktType (const void *pDesc) |
Get packet type. More... | |
static void | CSL_udmapCppi5SetPktType (void *pDesc, uint32_t pktType) |
Set packet type. More... | |
static void | CSL_udmapCppi5GetIds (const void *pDesc, uint32_t *pPktId, uint32_t *pFlowId) |
Get IDs. More... | |
static void | CSL_udmapCppi5SetIds (void *pDesc, uint32_t descType, uint32_t pktId, uint32_t flowId) |
Set IDs. More... | |
static void | CSL_udmapCppi5GetReturnPolicy (const void *pDesc, uint32_t *pRetPolicy, uint32_t *pEarlyReturn, uint32_t *pRetPushPolicy, uint32_t *pRetQnum) |
Get descriptor return policy information. More... | |
static void | CSL_udmapCppi5SetReturnPolicy (void *pDesc, uint32_t descType, uint32_t retPolicy, uint32_t earlyReturn, uint32_t retPushPolicy, uint32_t retQnum) |
Set descriptor return policy information. More... | |
static uint32_t | CSL_udmapCppi5MonoGetDataOffset (const CSL_UdmapCppi5MMPD *pDesc) |
Get MONO descriptor data offset. More... | |
static void | CSL_udmapCppi5MonoSetDataOffset (CSL_UdmapCppi5MMPD *pDesc, uint32_t dataOffset) |
Set MONO descriptor data offset. More... | |
static void | CSL_udmapCppi5TrGetReload (const CSL_UdmapCppi5TRPD *pDesc, uint32_t *pReloadEnable, uint32_t *pReloadIdx) |
Get TR descriptor reload information. More... | |
static void | CSL_udmapCppi5TrSetReload (CSL_UdmapCppi5TRPD *pDesc, uint32_t reloadEnable, uint32_t reloadIdx) |
Set TR descriptor reload information. More... | |
static uint32_t | CSL_udmapCppi5TrGetEntryStride (const CSL_UdmapCppi5TRPD *pDesc) |
Get TR descriptor entry stride. More... | |
static void | CSL_udmapCppi5TrSetEntryStride (CSL_UdmapCppi5TRPD *pDesc, uint32_t entryStride) |
Set TR descriptor entry stride. More... | |
|
inlinestatic |
Get the descriptor type.
This function returns the type of descriptor. Valid descriptor types are: 1 = Host-mode (HOST) packet descriptor 2 = Monolithic-mode (MONO) packet descriptor 3 = Transfer Request mode (TR) packet descriptor
pDesc | [IN] Pointer to the descriptor |
|
inlinestatic |
Set the descriptor type.
This function sets the type of descriptor. Valid descriptor types are: 1 = Host-mode (HOST) packet descriptor 2 = Monolithic-mode (MONO) packet descriptor 3 = Transfer Request mode (TR) packet descriptor
Note that no error checking is performed on the passed descriptor type argument.
pDesc | [IN] Pointer to the descriptor |
descType | [IN] Descriptor type |
|
inlinestatic |
Get the packet length.
This function returns the packet length. The value returned depends on the type of descriptor as follows:
Host and mono mode packet descriptors: The length of the packet in bytes is returned
TR mode packet descriptors: The number of TRs in the packet is returned
pDesc | [IN] Pointer to the descriptor |
|
inlinestatic |
Set the packet length.
This function sets the packet length. The meaning of the pktLen argument depends on the type of descriptor as follows:
Host and mono mode packet descriptors: pktLen = the length of the packet in bytes
TR mode packet descriptors: pktlen = the number of TRs in the packet
pDesc | [IN] Pointer to the descriptor |
descType | [IN] Descriptor type |
pktLen | [IN] Packet length |
|
inlinestatic |
Set the packet length of host mode packet descriptors.
This function sets the packet length of host packet descriptors.
pDesc | [IN] Pointer to the descriptor |
pktLen | [IN] Packet length in bytes |
|
inlinestatic |
Set the packet length of mono mode packet descriptors.
This function sets the packet length of mono mode packet descriptors.
pDesc | [IN] Pointer to the descriptor |
pktLen | [IN] Packet length in bytes |
|
inlinestatic |
Set the packet length of TR mode packet descriptors.
This function sets the packet length of TR mode packet descriptors.
pDesc | [IN] Pointer to the descriptor |
pktLen | [IN] Number of TRs in the packet |
|
inlinestatic |
Get the buffer address.
This function returns the physical address of the buffer attached to the specified descriptor.
This function is intended for use with host-mode descriptors only.
pDesc | [IN] Pointer to the host-mode descriptor |
|
inlinestatic |
Get the buffer length.
This function returns the length of the buffer (in bytes) attached to the specified descriptor.
This function is intended for use with host-mode descriptors only.
pDesc | [IN] Pointer to the host-mode descriptor |
|
inlinestatic |
Set the buffer address.
This function writes the physical address of the buffer to the specified descriptor. This function is useful when configuring host-mode descriptors/buffers to be placed on a transmit queue.
This function is intended for use with host-mode descriptors only.
pDesc | [IN] Pointer to the host-mode descriptor |
physBufferAddr | [IN] Physical address of the buffer |
|
inlinestatic |
Set the original buffer address.
This function writes the original physical address of the buffer to the specified descriptor. This function is useful when initializing host-mode descriptors/buffers to be placed on transmit or receive free queues.
This function is intended for use with host-mode descriptors only.
pDesc | [IN] Pointer to the host-mode descriptor |
physBufferAddr | [IN] Physical address of the buffer |
|
inlinestatic |
Set the buffer length.
This function writes the buffer length (in bytes) to the specified descriptor. This function is useful when configuring host-mode descriptors/buffers to be placed on a transmit queue.
This function is intended for use with host-mode descriptors only.
pDesc | [IN] Pointer to the host-mode descriptor |
bufferLenBytes | [IN] Length of the buffer in bytes |
|
inlinestatic |
Set the original buffer length.
This function writes the original buffer length (in bytes) to the specified descriptor. This function is useful when initializing host-mode descriptors/buffers to be placed on transmit or receive free queues.
This function is intended for use with host-mode descriptors only.
pDesc | [IN] Pointer to the host-mode descriptor |
bufferLenBytes | [IN] Length of the buffer in bytes |
|
inlinestatic |
Link a buffer descriptor to a descriptor.
This function links a buffer descriptor to the specified descriptor (which can be either a packet descriptor or a buffer descriptor).
This function is intended for use with host-mode descriptors only.
Note that the physical address of the buffer descriptor being linked must be provided. It is also assumed that the caller has initialized all required fields of the buffer descriptor prior to linking it.
pDesc | [IN] Pointer to the descriptor being linked to |
physBufferDescAddr | [IN] Physical address of the buffer descriptor being linked |
|
inlinestatic |
Is the EPI block present in the descriptor?
This function returns true if the Extended Packet Info (EPI) block is present in the descriptor and false if it is not present.
This function is intended for use with host-mode and mono-mode descriptors only.
pDesc | [IN] Pointer to the descriptor |
|
inlinestatic |
Set indicator if the EPI block is present in the descriptor.
This function is used to set if the Extended Packet Info (EPI) block is present in the descriptor (true) or if it is not present (false).
This function is intended for use with host-mode and mono-mode descriptors only.
pDesc | [IN] Pointer to the descriptor |
bEpiDataPresent | [IN] true if EPI block is present, false if not |
|
inlinestatic |
Return pointer to EPI block data.
This function returns a pointer to the Extended Packet Info (EPI) block data within the descriptor. If the EPI block is not present, NULL is returned.
This function only operates on host-mode and mono-mode descriptors.
pDesc | [IN] Pointer to the descriptor |
|
inlinestatic |
Read the EPI block data.
This function reads and returns the Extended Packet Info (EPI) block data within the descriptor.
This function is intended for use with host-mode and mono-mode descriptors only.
pDesc | [IN] Pointer to the descriptor |
pTsInfo | [OUT] Pointer where to store Timestamp information |
*pSwInfo0 | [OUT] Pointer where to store Software information word 0 |
*pSwInfo1 | [OUT] Pointer where to store Software information word 1 |
*pSwInfo2 | [OUT] Pointer where to store Software information word 2 |
|
inlinestatic |
Write the EPI block data.
This function writes the Extended Packet Info (EPI) block data into the descriptor.
This function is intended for use with host-mode and mono-mode descriptors only.
pDesc | [IN] Pointer to the descriptor |
tsInfo | [IN] Timestamp information |
swInfo0 | [IN] Software information word 0 |
swInfo1 | [IN] Software information word 1 |
swInfo2 | [IN] Software information word 2 |
|
inlinestatic |
Get the location of the protocol-specific data.
This function returns the location of the protocol-specific data.
This function is intended for use with host-mode and mono-mode descriptors only.
pDesc | [IN] Pointer to the descriptor |
|
inlinestatic |
Set the location of the protocol-specific data.
This function sets the location of the protocol-specific data.
This function is intended for use with host-mode and mono-mode descriptors only.
pDesc | [IN] Pointer to the descriptor |
psLoc | [IN] 0 = Protocol-specific data is in the descriptor 1 = Protocol-specific data is in the SOP buffer |
|
inlinestatic |
Get the number of bytes of protocol-specific data.
This function returns the number of bytes of protocol-specific (ps) data present in the descriptor. This value will be a multiple of 4.
This function is intended for use with host-mode and mono-mode descriptors only.
pDesc | [IN] Pointer to the descriptor |
|
inlinestatic |
Set the number of bytes of protocol-specific data.
This function sets the number of bytes of protocol-specific (ps) data present in the descriptor or SOP buffer. This value must be a multiple of 4.
This function is intended for use with host-mode and mono-mode descriptors only.
pDesc | [IN] Pointer to the descriptor |
psDataLen | [IN] Number of bytes of protocol-specific (ps) data present in the descriptor or SOP buffer |
|
inlinestatic |
Return address of the protocol-specific data.
This function returns the address of the protocol-specific data within the descriptor or SOP buffer.
If the protocol-specific data is in the descriptor (bInDesc is true), the address returned is a virtual address. If the protocol-specific data is in the SOP buffer (bInDesc is false), the address returned is a physical address.
This function only operates on host-mode and mono-mode descriptors.
pDesc | [IN] Pointer to the descriptor |
bInSopBuf | [IN] true if ps data is in SOP buffer, false otherwise |
bEpiPresent | [IN] true if EPI data is present, false otherwise |
|
inlinestatic |
|
inlinestatic |
Get source tag.
This function gets the source tag from the descriptor.
pDesc | [IN] Pointer to the descriptor |
|
inlinestatic |
Get destination tag.
This function gets the destination tag from the descriptor.
pDesc | [IN] Pointer to the descriptor |
|
inlinestatic |
Set source tag.
This function sets the source tag in the descriptor.
pDesc | [IN] Pointer to the descriptor |
srcTag | [IN] source tag |
|
inlinestatic |
Set destination tag.
This function sets the destination tag in the descriptor.
pDesc | [IN] Pointer to the descriptor |
dstTag | [IN] destination tag |
|
inlinestatic |
Get error flags.
This function gets the error flags from the descriptor.
This function is intended for use with host-mode and mono-mode descriptors only.
pDesc | [IN] Pointer to the descriptor |
|
inlinestatic |
Get ps flags.
This function gets the protocol-specific (ps) flags from the descriptor.
This function is intended for use with host-mode and mono-mode descriptors only.
pDesc | [IN] Pointer to the descriptor |
|
inlinestatic |
Set ps flags.
This function sets the protocol-specific (ps) flags in the descriptor.
This function is intended for use with host-mode and mono-mode descriptors only.
pDesc | [IN] Pointer to the descriptor |
psFlags | [IN] ps flags |
|
inlinestatic |
Get packet type.
This function gets the packet type from the descriptor.
This function is intended for use with host-mode and mono-mode descriptors only.
pDesc | [IN] Pointer to the descriptor |
|
inlinestatic |
Set packet type.
This function sets the packet type in the descriptor.
This function is intended for use with host-mode and mono-mode descriptors only.
pDesc | [IN] Pointer to the descriptor |
pktType | [IN] Packet type |
|
inlinestatic |
Get IDs.
This function gets the packet ID and flow ID from the descriptor.
pDesc | [IN] Pointer to the descriptor |
pPktId | [OUT] Pointer where to store packet ID |
pFlowId | [OUT] Pointer where to store flow ID |
|
inlinestatic |
Set IDs.
This function sets the packet ID and flow ID in the descriptor.
pDesc | [IN] Pointer to the descriptor |
descType | [IN] Descriptor type |
pktId | [IN] packet ID |
flowId | [IN] flow ID |
|
inlinestatic |
Get descriptor return policy information.
This function gets descriptor return policy information from the descriptor. See CSL_udmapCppi5SetReturnPolicy for a description of the return policy information.
pDesc | [IN] Pointer to the descriptor |
pRetPolicy | [OUT] Pointer where to store return policy (0 is returned for MONO and TR descriptor types) |
pEarlyReturn | [OUT] Pointer where to store early return (0 is returned for TR descriptor type) |
pRetPushPolicy | [OUT] Pointer where to store return push policy |
pRetQnum | [OUT] Pointer where to store return queue # |
|
inlinestatic |
Set descriptor return policy information.
This function sets descriptor return policy information in the descriptor. This includes the following:
return policy (HOST descriptor type only) 0 = Entire packet (still linked together) should be returned to queue specified by pRetQnum 1 = Each descriptor should be returned to queue specified by pRetQnum in their respective descriptors.
early return (HOST and MONO descriptor types only) 0 = Buffer/packet descriptor pointers should only be returned after all reads have been completed 1 = Buffer/packet descriptor pointers should be returned immediately upon fetching the descriptor and beginning to transfer data
return push policy (only used when return policy is 1) 0 = Descriptor is returned to tail of queue 1 = Descriptor is returned to head of queue
return queue # Specifies the queue / ring number that the descriptor is returned to after transmission is complete.
pDesc | [IN] Pointer to the descriptor |
descType | [IN] Descriptor type |
retPolicy | [IN] return policy (only used for HOST descriptor type) |
earlyReturn | [IN] early return (only used for HOST and MONO descriptor types) |
retPushPolicy | [IN] return push policy |
retQnum | [IN] return queue # |
|
inlinestatic |
Get MONO descriptor data offset.
This function returns the data offset for a monolithic-mode (MONO) type of descriptor. This value indicates the byte offset from byte 0 of the descriptor to the location where the valid data begins.
pDesc | [IN] Pointer to the MONO descriptor |
|
inlinestatic |
Set MONO descriptor data offset.
This function sets the data offset for a monolithic-mode (MONO) type of descriptor. This value indicates the byte offset from byte 0 of the descriptor to the location where the valid data begins.
pDesc | [IN] Pointer to the MONO descriptor |
dataOffset | [IN] Byte offset |
|
inlinestatic |
Get TR descriptor reload information.
This function returns reload information for a transfer-request (TR) type of descriptor. See CSL_udmapCppi5TrSetReload for a description of this reload information.
pDesc | [IN] Pointer to the TR descriptor |
pReloadEnable | [OUT] Pointer where to store reload enable |
pReloadIdx | [OUT] Pointer where to store reload index |
|
inlinestatic |
Set TR descriptor reload information.
This function sets reload information for a transfer-request (TR) type of descriptor. Reload information includes:
reload enable (specifies what to do when the last entry is processed in this packet) 0 = Finish the packet and place the descriptor back on the return queue 1 = Vector to the Reload Index and resume processing
reload index Specifies the value to set the current processing index to when the last entry is processed and reload enable is set to 1. This is basically an absolute index to jump to on the 2nd and following passes through the TR packet.
pDesc | [IN] Pointer to the TR descriptor |
reloadEnable | [IN] reload enable |
reloadIdx | [IN] reload index |
|
inlinestatic |
Get TR descriptor entry stride.
This function returns the stride between TR entries. See CSL_udmapCppi5TrSetEntryStride for valid stride values.
pDesc | [IN] Pointer to the TR descriptor |
|
inlinestatic |
Set TR descriptor entry stride.
This function sets the stride between TR entries. This value must be set large enough that any TR in the buffer will fit within the given dimension. TRs are expected to be placed on boundaries as given in this dimension.
The stride value is encoded as follows: 0 = 16 byte TR entry 1 = 32-byte TR entry 2 = 64-byte TR entry 3 = 128-byte TR entry
pDesc | [IN] Pointer to the TR descriptor |
entryStride | [IN] Encoded TR entry stride |