summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cd47ddc)
raw | patch | inline | side by side (parent: cd47ddc)
author | Justin Sobota <jsobota@ti.com> | |
Sun, 21 Jun 2015 22:37:34 +0000 (18:37 -0400) | ||
committer | Justin Sobota <jsobota@ti.com> | |
Sun, 21 Jun 2015 22:37:34 +0000 (18:37 -0400) |
index 1e4eb68f547708e906a4ff3a1f34c70d5d974ea6..72c625fa78509820322aed55157f83ff5fa01946 100644 (file)
if (allocatedMsg) {
/* Initialize and store the allocated message as long as it's not
* NULL */
- allocatedMsg->src = coreNum;
+ allocatedMsg->src = coreNum;
+ allocatedMsg->seqNum = i;
msgPtrArray[i] = allocatedMsg;
}
else {
rxMsgPtrArray[numberReceived] = rxMsg;
}
+ numberReceived++;
#if VERBOSE_MODE
System_printf("Core %d : Received message from Core %d\n",
coreNum, rxMsg->src);
-#endif
-
- numberReceived++;
- }
- else {
+ System_printf("Core %d : Total received: %d, Last seqNum %d\n",
+ numberReceived, rxMsg->seqNum);
+#endif
+ } else {
#if VERBOSE_MODE
System_printf("Core %d : "
"Received unexpected message from Core %d\n",
index dabdf50fa610453a34b8332e07545f0cc99968c6..7ad170a749d581fb3c6e6abd19d3876411f1b0b6 100644 (file)
int32_t numMsgs;
int32_t seqNum;
uint32_t data[TEST_MSG_DATA_LEN_WORDS];
- uint8_t pad[3984]; /* Pad up to max SRIO message
- * size - 4096 bytes which is also multiple
- * of cache line (128 bytes) */
+ uint8_t pad[3856]; /* Pad to just under max SRIO message
+ * size, 4096 bytes, so that fragmentation
+ * does not automatically occur. Pad must
+ * make TstMsg multiple of 128 byte cache
+ * line */
} TstMsg;
inline uint32_t l2_global_address(uint32_t addr)
index 2b34a70147ac648779caa223e71f2a84cafb0688..1bc18a30dacb75922eac3753412138acc478a091 100644 (file)
--- a/c66/qmss/TransportQmss.c
+++ b/c66/qmss/TransportQmss.c
wb((Void *)newMsg, newMsg->msgSize);
wb((Void *)hostDesc, obj->rxDescSize);
-
- Qmss_queuePushDescSize(obj->rxFreeQ, (Void *)hostDesc, obj->rxDescSize);
}
/**
/* Get new MessageQ buffer for descriptor */
transportQmssNewRxBuf(obj, hostDesc);
+ Qmss_queuePushDescSize(obj->rxFreeQ, (Void *)hostDesc,
+ obj->rxDescSize);
} else {
Log_warning1("TransportQmss_Accum_ist : "
"NULL descriptor at index %d in Accumulator list\n",
/* Route to destination MessageQ */
queueId = MessageQ_getDstQueue(rxMsg);
MessageQ_put(queueId, rxMsg);
-
- /* Get new MessageQ buffer for descriptor */
- transportQmssNewRxBuf(obj, hostDesc);
}
/* Clear and reenable the CIC secondary interrupt */
CpIntc_clearSysInt(cpIntId, obj->u.qpend.cicSecInt);
CpIntc_enableSysInt(cpIntId, obj->u.qpend.cicSecInt);
+
+ if (hostDesc) {
+ /* Get new MessageQ buffer for descriptor */
+ transportQmssNewRxBuf(obj, hostDesc);
+ Qmss_queuePushDescSize(obj->rxFreeQ, (Void *)hostDesc, obj->rxDescSize);
+ }
}
index 709d480cca7ef89c9081977cf2d8472f89025833..132734014a99c011bc592844939ff5b729f03e72 100644 (file)
--- a/c66/srio/TransportSrio.c
+++ b/c66/srio/TransportSrio.c
#include <xdc/std.h>
#include <xdc/runtime/Assert.h>
#include <xdc/runtime/Error.h>
+#include <xdc/runtime/Log.h>
#include <xdc/runtime/Memory.h>
/* BIOS include */
/* SRIO Transport include */
#include "package/internal/TransportSrio.xdc.h"
+/* SRIO HW maximum transmittable packet size */
+#define TRANS_SRIO_HW_MTU_BYTES 4096
#define TRANS_SRIO_MAX_PAGE_ENTRIES 80
#define TRANS_SRIO_RECYCLE_ALL_TX_BUFS -1
+/* Fragmentation/reassembly header for packets greater than or equal to
+ * 4096 bytes */
+typedef struct {
+ uint8_t seqn;
+ uint8_t maxSeqn;
+ uint8_t tag;
+ uint8_t reserved;
+} transFragHdr_t;
+
+/* Source endpoint fragmentation stream tracker */
+typedef struct {
+ uint8_t tag;
+ int8_t prevSeqn;
+ uint16_t bufLen;
+ uint8_t *rcvBuf;
+} transFragEp_t;
+
static UInt32 l2_global_address(UInt32 addr)
{
if ((addr & 0xFF800000) == 0x00800000) {
MessageQ_Msg msgQBuf;
UInt32 numBytes;
- hostDesc = (Cppi_HostDesc *) QMSS_DESC_PTR(Qmss_queuePop(obj->txCompletionQ));
+ hostDesc = (Cppi_HostDesc *)QMSS_DESC_PTR(Qmss_queuePop(obj->txCompletionQ));
Cppi_getData(Cppi_DescType_HOST, (Cppi_Desc *)hostDesc,
(UInt8 **)&msgQBuf, &numBytes);
if (msgQBuf) {
- msgQBuf = (MessageQ_Msg) global_l2_address((UInt32) msgQBuf);
+ msgQBuf = (MessageQ_Msg)global_l2_address((UInt32) msgQBuf);
MessageQ_free(msgQBuf);
}
}
Qmss_queueEmpty(obj->txCompletionQ);
Qmss_queueClose(obj->txCompletionQ);
}
+ if (obj->txFragQ) {
+ /* Clean up any MessageQ buffers attached to fragment descriptors */
+ while (Qmss_getQueueEntryCount(obj->txFragQ)) {
+ Cppi_HostDesc *hostDesc;
+ MessageQ_Msg msgQBuf;
+ UInt32 numBytes;
+
+ hostDesc = (Cppi_HostDesc *)QMSS_DESC_PTR(Qmss_queuePop(obj->txFragQ));
+ Cppi_getData(Cppi_DescType_HOST, (Cppi_Desc *)hostDesc,
+ (UInt8 **)&msgQBuf, &numBytes);
+ if (msgQBuf) {
+ msgQBuf = (MessageQ_Msg)global_l2_address((UInt32) msgQBuf);
+ MessageQ_free(msgQBuf);
+ }
+ }
+ Qmss_queueEmpty(obj->txFragQ);
+ Qmss_queueClose(obj->txFragQ);
+ }
if (obj->txFreeQ) {
Qmss_queueEmpty(obj->txFreeQ);
Qmss_queueClose(obj->txFreeQ);
Memory_free(0, (UInt32 *)(global_l2_address((UInt32)obj->rxAccList)),
obj->rxAccListSize);
}
+
+ if (obj->fragSrcs) {
+ Memory_free(0, obj->fragSrcs, obj->sockParams.epListSize *
+ sizeof(transFragEp_t));
+ }
}
/**
wb((Void *)newMsg, newMsg->msgSize);
wb((Void *)hostDesc, obj->rxDescSize);
-
Qmss_queuePushDescSize(obj->rxFreeQ, (Void *)hostDesc, obj->rxDescSize);
}
return(i);
}
+/*
+ * ======== transportSrioStandardSend ========
+ * Routine used to send a single packet containing a MessageQ message that is
+ * smaller than the configured maximum MTU. Fragmentation is not needed.
+ */
+static Bool transportSrioStandardSend(TransportSrio_Object *obj, Ptr msg,
+ Srio_SockAddrInfo *srioAddr)
+{
+ Cppi_HostDesc *hostDesc;
+ UInt32 msgQDataLen = MessageQ_getMsgSize(msg);
+ Int32 status;
+
+ hostDesc = (Cppi_HostDesc *)Qmss_queuePop((Qmss_QueueHnd)obj->txFreeQ);
+ if (!hostDesc) {
+ Qmss_QueueHnd compQ = (Qmss_QueueHnd)obj->txCompletionQ;
+ Ptr oldMsg;
+ uint32_t oldBufLen;
+
+ /* Free Q out of descriptors: poll tx completion Q until descriptor
+ * becomes available from SRIO hardware */
+ do {
+ hostDesc = (Cppi_HostDesc *)QMSS_DESC_PTR(Qmss_queuePop(compQ));
+ } while (!hostDesc);
+ /* Free old MessageQ msg attached to descriptor before reusing */
+ Cppi_getData(Cppi_DescType_HOST, (Cppi_Desc *)hostDesc,
+ (UInt8 **)&oldMsg, (UInt32 *)&oldBufLen);
+ oldMsg = (Ptr) global_l2_address((UInt32)oldMsg);
+ status = MessageQ_free(oldMsg);
+ Assert_isTrue((status >= 0), TransportSrio_A_txMsgQFreeError);
+ }
+
+ /* Convert MsgQ message addr to global addr (applicable to L2),
+ * writeback, then add to descriptor */
+ msg = (Ptr) l2_global_address((UInt32)msg);
+ wb((Void *) msg, msgQDataLen);
+ Cppi_setData(Cppi_DescType_HOST, (Cppi_Desc *)hostDesc, (UInt8 *)msg,
+ msgQDataLen);
+ Cppi_setPacketLen(Cppi_DescType_HOST, (Cppi_Desc *)hostDesc,
+ msgQDataLen);
+ Cppi_setOriginalBufInfo(Cppi_DescType_HOST, (Cppi_Desc*)hostDesc,
+ (UInt8 *)msg, msgQDataLen);
+ wb((Void *) hostDesc, obj->txDescSize);
+
+ /* Send the packet */
+ status = Srio_sockSend(obj->socketHandle, (Srio_DrvBuffer)hostDesc,
+ obj->txDescSize, srioAddr);
+ Assert_isTrue ((status >= 0), TransportSrio_A_socketSendError);
+ if (status < 0) {
+ /* Error when sending - Push packet on completion queue for
+ * cleanup at a later time */
+ Qmss_queuePushDescSize((Qmss_QueueHnd) obj->txCompletionQ,
+ (void *)hostDesc, obj->txDescSize);
+ return(FALSE);
+ }
+
+ /* Check completion queue to clean up the previous transaction
+ * descriptor */
+ transportSrioTxBufRecycle(obj, 1);
+ return(TRUE);
+}
+
+/*
+ * ======== transportSrioFragmentSend ========
+ * Routine used to fragment and sent a MessageQ message that is greater than
+ * the configured maximum MTU
+ */
+static Bool transportSrioFragmentSend(TransportSrio_Object *obj, Ptr msg,
+ Srio_SockAddrInfo *srioAddr)
+{
+ UInt32 const msgQDataLen = MessageQ_getMsgSize(msg);
+ uint8_t maxSeqn = 0;
+ uint32_t const fragDataSize = obj->maxMTU - sizeof(MessageQ_MsgHeader) -
+ sizeof(transFragHdr_t);
+ uint8_t *msgQMsg = (uint8_t *)msg;
+ uint8_t seqn = 0;
+ uint32_t msgOffset = 0;
+ Bool status = TRUE;
+
+ /* Calculate number of fragments needed (base zero) */
+ maxSeqn = ((msgQDataLen + fragDataSize - 1) / fragDataSize) - 1;
+ /* Update fragmented message tag. Overflow back to zero is okay */
+ obj->fragMsgTag++;
+
+ while(1) {
+ Cppi_HostDesc *hostDesc;
+ uint8_t *sendBuf = NULL;
+ uint32_t sendBufLen;
+ transFragHdr_t *fragHdr;
+ uint32_t fragBytes;
+ Int32 status;
+
+ /* Poll fragment Q until descriptor becomes available from SRIO
+ * hardware */
+ do {
+ Qmss_QueueHnd fragQ = (Qmss_QueueHnd)obj->txFragQ;
+
+ hostDesc = (Cppi_HostDesc *)QMSS_DESC_PTR(Qmss_queuePop(fragQ));
+ } while (!hostDesc);
+ Cppi_getData(Cppi_DescType_HOST, (Cppi_Desc *)hostDesc,
+ &sendBuf, &sendBufLen);
+
+ /* Calculate number of bytes that need to be copied from msg to
+ * this fragment */
+ fragBytes = (((seqn + 1) * fragDataSize) > msgQDataLen) ?
+ msgQDataLen - (seqn * fragDataSize) : fragDataSize;
+
+ /* Set fragment header which is placed after the MessageQ header */
+ fragHdr = (transFragHdr_t *)&sendBuf[sizeof(MessageQ_MsgHeader)];
+ fragHdr->seqn = seqn++;
+ fragHdr->maxSeqn = maxSeqn;
+ fragHdr->tag = obj->fragMsgTag;
+ memcpy((void *)&sendBuf[sizeof(MessageQ_MsgHeader) +
+ sizeof(transFragHdr_t)],
+ (void *)&msgQMsg[msgOffset], fragBytes);
+ msgOffset += fragBytes;
+
+ wb((Void *)sendBuf, sendBufLen);
+ Cppi_setData(Cppi_DescType_HOST, (Cppi_Desc *)hostDesc, sendBuf,
+ sendBufLen);
+ Cppi_setPacketLen(Cppi_DescType_HOST, (Cppi_Desc *)hostDesc,
+ sendBufLen);
+ Cppi_setOriginalBufInfo(Cppi_DescType_HOST, (Cppi_Desc*)hostDesc,
+ sendBuf, sendBufLen);
+ wb((Void *) hostDesc, obj->txDescSize);
+
+ /* Send the packet */
+ status = Srio_sockSend(obj->socketHandle, (Srio_DrvBuffer)hostDesc,
+ obj->txDescSize, srioAddr);
+ Assert_isTrue ((status >= 0), TransportSrio_A_socketSendError);
+ if (status < 0) {
+ /* Error when sending - Push packet back on fragmentation queue */
+ Qmss_queuePushDescSize((Qmss_QueueHnd) obj->txFragQ,
+ (void *)hostDesc, obj->txDescSize);
+ status = FALSE;
+ goto error_exit;
+ }
+
+ if (msgOffset >= msgQDataLen) {
+ /* All fragments sent */
+ break;
+ }
+ }
+
+error_exit:
+ MessageQ_free((MessageQ_Msg)msg);
+ return(status);
+}
+
+/*
+ * ======== transportSrioFragmentSend ========
+ * Routine used to form a full message from fragments received over the SRIO
+ * interface.
+ */
+static MessageQ_Msg transportSrioFragmentRcv(TransportSrio_Object *obj,
+ MessageQ_Msg fragMsg,
+ Srio_SockAddrInfo *srcSocket)
+{
+ uint32_t const fragDataSize = obj->maxMTU - sizeof(MessageQ_MsgHeader) -
+ sizeof(transFragHdr_t);
+ uint8_t *fragBuf = (uint8_t *)fragMsg;
+ transFragHdr_t *fragHdr;
+ uint8_t *data;
+ uint8_t maxSeqn = 0;
+ uint8_t seqn = 0;
+ uint8_t msgTag;
+ transFragEp_t *fragSrcs = (transFragEp_t *)obj->fragSrcs;
+ int i;
+ transFragEp_t *srcEp = NULL;
+ uint8_t *rcvBufOffset;
+ MessageQ_Msg rcvMsg = NULL;
+
+ /* Set fragment header which is placed after the MessageQ header */
+ fragHdr = (transFragHdr_t *)&fragBuf[sizeof(MessageQ_MsgHeader)];
+ data = (uint8_t *)&fragBuf[sizeof(MessageQ_MsgHeader) +
+ sizeof(transFragHdr_t)];
+ maxSeqn = fragHdr->maxSeqn;
+ seqn = fragHdr->seqn;
+ msgTag = fragHdr->tag;
+
+ for (i = 0; i < obj->sockParams.epListSize; i++) {
+ TransportSrio_srioSockType11EpParams *t11Ep = obj->sockParams.u.pT11Eps;
+ TransportSrio_srioSockType9EpParams *t9Ep = obj->sockParams.u.pT9Eps;
+
+ switch (obj->sockParams.sockType) {
+ case TransportSrio_srioSockType_TYPE_11:
+ if ((srcSocket->type11.id == t11Ep[i].deviceId) &&
+ (srcSocket->type11.letter == t11Ep[i].letter) &&
+ (srcSocket->type11.mbox == t11Ep[i].mailbox)) {
+ srcEp = &fragSrcs[i];
+ }
+ break;
+ case TransportSrio_srioSockType_TYPE_9:
+ if ((srcSocket->type9.id == t9Ep[i].deviceId) &&
+ (srcSocket->type9.cos == t9Ep[i].cos) &&
+ (srcSocket->type9.streamId == t9Ep[i].streamId)) {
+ srcEp = &fragSrcs[i];
+ }
+ break;
+ default:
+ Log_warning1("TransportSrio_isr reassembly: "
+ "(MsgTag: %d) Received fragment with an invalid "
+ "socket type\n", msgTag);
+ goto error_exit;
+ }
+
+ if (srcEp) {
+ break;
+ }
+ }
+
+ if (srcEp == NULL) {
+ if (obj->sockParams.sockType == TransportSrio_srioSockType_TYPE_11) {
+ Log_warning4("TransportSrio_isr T11 reassembly: "
+ "(MsgTag: %d) Fragment source not recognized for "
+ "ID: 0x%x, letter: %d, mailbox: %d\n", msgTag,
+ srcSocket->type11.id, srcSocket->type11.letter,
+ srcSocket->type11.mbox);
+ } else {
+ Log_warning4("TransportSrio_isr T9 reassembly: "
+ "(MsgTag: %d) Fragment source not recognized for "
+ "ID: 0x%x, cos: %d, streamID: %d\n", msgTag,
+ srcSocket->type9.id, srcSocket->type9.cos,
+ srcSocket->type9.streamId);
+ }
+ } else {
+ if (seqn == 0) {
+ /* Start of new fragment stream. Get length of entire stream from
+ * MessageQ header in first fragment. */
+ UInt32 totalLen = MessageQ_getMsgSize(data);
+
+ if (srcEp->rcvBuf) {
+ /* Previous fragment stream hasn't completed. Drop reassembly
+ * buffer */
+ Log_warning2("TransportSrio_isr reassembly: "
+ "Received start of new stream with tag %d before "
+ "stream with tag %d completed. Dropping old "
+ "fragments\n", msgTag, srcEp->tag);
+ MessageQ_free((MessageQ_Msg)srcEp->rcvBuf);
+ }
+
+ srcEp->prevSeqn = -1;
+ srcEp->tag = msgTag;
+ srcEp->bufLen = totalLen;
+ srcEp->rcvBuf = (uint8_t *)MessageQ_alloc(obj->rxMsgQHeapId,
+ totalLen);
+ if (srcEp->rcvBuf == NULL) {
+ Log_warning2("TransportSrio_isr reassembly: "
+ "(MsgTag: %d) Could not allocate receive buffer "
+ "of size %d bytes\n", msgTag, totalLen);
+ goto error_exit;
+ }
+ }
+
+ if (((srcEp->prevSeqn + 1) != seqn) && (srcEp->tag == msgTag)) {
+ /* Out of order packet in current tag stream. Drop current and
+ * future fragments until seqn zero is received */
+ MessageQ_free((MessageQ_Msg)srcEp->rcvBuf);
+ srcEp->rcvBuf = NULL;
+
+ /* Don't reset entire stream if current stream's tag is different from
+ * tag in received fragment (zero will reset) */
+ } else if (srcEp->tag == msgTag) {
+ uint32_t copySize = fragDataSize;
+
+ rcvBufOffset = srcEp->rcvBuf + (seqn * fragDataSize);
+ if (seqn == maxSeqn) {
+ /* Don't copy padding from last fragment */
+ copySize = srcEp->bufLen - (fragDataSize * seqn);
+ /* All fragments assembled after following copy */
+ rcvMsg = (MessageQ_Msg)srcEp->rcvBuf;
+ srcEp->rcvBuf = NULL;
+ }
+ memcpy(rcvBufOffset, data, copySize);
+
+ if (seqn == 0) {
+ MessageQ_Msg hdr = (MessageQ_Msg)srcEp->rcvBuf;
+
+ hdr->heapId = obj->rxMsgQHeapId;
+ }
+ srcEp->prevSeqn = seqn;
+ } else {
+ Log_warning2("TransportSrio_isr reassembly: "
+ "Received inconsistent tag. Assembling msgTag %d "
+ "but received msgTag %d. Dropping fragment\n",
+ srcEp->tag, msgTag);
+ }
+ }
+
+error_exit:
+ /* Recycle fragment */
+ fragMsg->heapId = obj->rxMsgQHeapId;
+ MessageQ_free(fragMsg);
+
+ return(rcvMsg);
+}
+
/**
* @b Description
* @n
Cppi_getData(Cppi_DescType_HOST, (Cppi_Desc *)hostDesc, (UInt8 **)&rxMsg,
(UInt32 *)&rxNumBytes);
- inv((Void *) rxMsg, rxNumBytes);
+ inv((Void *)rxMsg, rxNumBytes);
/* Reset heapId to rxMsgQHeapId. This heap is overwritten when message is
* received over SRIO */
/* Free the MessageQ Msg */
status = MessageQ_free(rxMsg);
- Assert_isTrue ((status >= 0), TransportSrio_A_rxMsgQFreeError);
+ Assert_isTrue((status >= 0), TransportSrio_A_rxMsgQFreeError);
transportSrioNewRxBuf(obj, hostDesc);
}
obj->deviceCfgParams = NULL;
obj->txCompletionQ = 0;
obj->txFreeQ = 0;
+ obj->txFragQ = 0;
obj->rxFreeQ = 0;
obj->rxAccumQ = 0;
obj->rxMsgQHeapId = 0;
obj->sockParams.u.pT11Eps = NULL;
obj->sockParams.u.pT9Eps = NULL;
obj->socketHandle = NULL;
+ obj->fragSrcs = NULL;
+ obj->fragMsgTag = 0;
obj->transNetId = 0;
if (params->sockParams == NULL) {
retVal = TransportSrio_ERROR_INVALID_SOCKET_TYPE;
goto error_cleanup;
}
+ if (params->maxMTU > TRANS_SRIO_HW_MTU_BYTES) {
+ retVal = TransportSrio_ERROR_INVALID_MAX_MTU;
+ goto error_cleanup;
+ }
/* Check if SRIO instance has already been created. Only one instance of
* each SRIO Type can exist per DSP core. Protect from interrupt from
goto error_cleanup;
}
+ /* Transmit fragment queue and descriptor initialization - buffers are
+ * pre-allocated and attached to the host fragment descriptors. */
+ obj->txFragQ = Qmss_queueOpen(Qmss_QueueType_GENERAL_PURPOSE_QUEUE,
+ QMSS_PARAM_NOT_SPECIFIED,
+ (UInt8 *)&isAllocated);
+ if (obj->txFragQ < 0) {
+ retVal = TransportSrio_ERROR_COULD_NOT_OPEN_TX_FRAG_Q;
+ goto error_cleanup;
+ }
+
+ memset(&descCfg, 0, sizeof(descCfg));
+ descCfg.memRegion = (Qmss_MemRegion) params->txMemRegion;
+ descCfg.descNum = params->txNumFragDesc;
+ descCfg.destQueueNum = QMSS_PARAM_NOT_SPECIFIED;
+ descCfg.queueType = Qmss_QueueType_GENERAL_PURPOSE_QUEUE;
+ descCfg.initDesc = Cppi_InitDesc_INIT_DESCRIPTOR;
+ descCfg.descType = Cppi_DescType_HOST;
+ descCfg.returnQueue = Qmss_getQueueNumber(obj->txFragQ);
+ descCfg.epibPresent = Cppi_EPIB_NO_EPIB_PRESENT;
+ descCfg.returnPushPolicy = Qmss_Location_HEAD;
+ descCfg.cfg.host.returnPolicy = Cppi_ReturnPolicy_RETURN_ENTIRE_PACKET;
+ descCfg.cfg.host.psLocation = Cppi_PSLoc_PS_IN_DESC;
+ tmpQ = Cppi_initDescriptor (&descCfg, &isAllocated);
+ if (tmpQ < 0) {
+ retVal = TransportSrio_ERROR_RX_DESCRIPTOR_INIT_FAILED;
+ goto error_cleanup;
+ }
+
+ for (i = 0; i < params->txNumFragDesc; i++) {
+ /* Attach pre-allocated fragment buffers to the fragment descriptors */
+ if (hostDesc = (Cppi_HostDesc *)Qmss_queuePop(tmpQ)) {
+ MessageQ_Msg msgQBuf;
+
+ msgQBuf = MessageQ_alloc(params->txMsgQFragHeapId, params->maxMTU);
+ if (msgQBuf == NULL) {
+ retVal = TransportSrio_ERROR_ALLOC_FROM_TX_FRAG_HEAP_FAILED;
+ Qmss_queueEmpty(tmpQ);
+ Qmss_queueClose(tmpQ);
+ goto error_cleanup;
+ }
+ /* Convert the buffer to the global address - Only applicable for
+ * buffers residing in L2 */
+ msgQBuf = (MessageQ_Msg)l2_global_address((UInt32)msgQBuf);
+
+ Cppi_setData(Cppi_DescType_HOST, (Cppi_Desc *)hostDesc,
+ (UInt8 *)msgQBuf, params->maxMTU);
+ Cppi_setOriginalBufInfo(Cppi_DescType_HOST, (Cppi_Desc *)hostDesc,
+ (UInt8 *)msgQBuf, params->maxMTU);
+
+ wb((Void *)msgQBuf, msgQBuf->msgSize);
+ wb((Void *)hostDesc, params->rxDescSize);
+
+ Qmss_queuePushDescSize(obj->txFragQ, (void *)hostDesc,
+ params->txDescSize);
+ }
+ }
+ Qmss_queueClose(tmpQ);
+
/* Receive queue and descriptor initialization - MessageQ buffers are
* pre-allocated and attached to the host descriptors. On packet reception,
* SRIO's configured flow will copy the data directly into the MessageQ
* operations */
obj->txDescSize = params->txDescSize;
obj->rxDescSize = params->rxDescSize;
-
+
/* SRIO driver configuration */
memset((Void *)&srioCfg, 0, sizeof(srioCfg));
/* App-managed: handle all aspects of SRIO config and buffer management */
srioCfg.u.appManagedCfg.rxFlowCfg.rx_size_thresh0_en = 0x0;
srioCfg.u.appManagedCfg.rxFlowCfg.rx_size_thresh1_en = 0x0;
srioCfg.u.appManagedCfg.rxFlowCfg.rx_size_thresh2_en = 0x0;
- /* Use the rxFreeQ for picking up descriptors */
+ /* Use the rxFreeQ for picking up descriptors */
queueInfo = Qmss_getQueueNumber(obj->rxFreeQ);
srioCfg.u.appManagedCfg.rxFlowCfg.rx_fdq1_qnum = queueInfo.qNum;
srioCfg.u.appManagedCfg.rxFlowCfg.rx_fdq1_qmgr = queueInfo.qMgr;
goto error_cleanup;
}
+ /* Set socket receive queue to be number of descriptors RX descriptors
+ * to avoid socket receive overflow */
+ if (Srio_setSockOpt(obj->socketHandle, Srio_Opt_PENDING_PKT_COUNT,
+ (Void *) ¶ms->rxNumDesc, sizeof(UInt16))) {
+ retVal = TransportSrio_ERROR_COULD_SET_SOCKET_OPTION;
+ goto error_cleanup;
+ }
+
/* Save socket parameters */
obj->sockParams.sockType = params->sockParams->sockType;
obj->sockParams.epListSize = params->sockParams->epListSize;
sizeof(TransportSrio_srioSockType9EpParams));
}
- /* Set socket receive queue to be number of descriptors RX descriptors
- * to avoid socket receive overflow */
- if (Srio_setSockOpt(obj->socketHandle, Srio_Opt_PENDING_PKT_COUNT,
- (Void *) ¶ms->rxNumDesc, sizeof(UInt16))) {
- retVal = TransportSrio_ERROR_COULD_SET_SOCKET_OPTION;
+ /* Alloc and init a fragment tracking structure for each T11 & T9
+ * endpoint */
+ obj->fragSrcs = Memory_alloc(0, obj->sockParams.epListSize *
+ sizeof(transFragEp_t), 16, eb);
+ if (obj->fragSrcs == NULL) {
+ retVal = TransportSrio_ERROR_ALLOC_OF_FRAG_SOURCE_LIST;
goto error_cleanup;
}
+ memset(obj->fragSrcs, 0, obj->sockParams.epListSize *
+ sizeof(transFragEp_t));
if ((params->transNetworkId < 1) && (params->transNetworkId > 7)) {
retVal = TransportSrio_ERROR_INVALID_TRANSPORT_ID;
*/
Bool TransportSrio_put(TransportSrio_Object *obj, Ptr msg)
{
- UInt16 dstProcId = (UInt16) (((MessageQ_Msg)(msg))->dstProc);
- Cppi_HostDesc *hostDesc;
- Ptr oldMsg;
- UInt32 msgQDataLen;
- Srio_SockAddrInfo dstSrioAddr;
- Int32 status;
- Qmss_QueueHnd txCompQ = (Qmss_QueueHnd) obj->txCompletionQ;
-
- hostDesc = (Cppi_HostDesc *)Qmss_queuePop((Qmss_QueueHnd) obj->txFreeQ);
- if (!hostDesc) {
- /* Free Q out of descriptors: poll completion Q until descriptor
- * becomes available from SRIO hardware */
- do {
- hostDesc = (Cppi_HostDesc *)QMSS_DESC_PTR(Qmss_queuePop(txCompQ));
- } while (!hostDesc);
- /* Free old MessageQ msg attached to descriptor before reusing */
- inv((Void *) hostDesc, obj->txDescSize);
- Cppi_getData(Cppi_DescType_HOST, (Cppi_Desc *)hostDesc,
- (UInt8 **)&oldMsg, (UInt32 *)&msgQDataLen);
- oldMsg = (Ptr) global_l2_address((UInt32)oldMsg);
- status = MessageQ_free(oldMsg);
- Assert_isTrue((status >= 0), TransportSrio_A_txMsgQFreeError);
- }
-
- /* Convert MsgQ message addr to global addr (applicable to L2), writeback,
- * then add to descriptor */
- msgQDataLen = MessageQ_getMsgSize(msg);
- msg = (Ptr) l2_global_address((UInt32)msg);
- wb((Void *) msg, msgQDataLen);
- Cppi_setData(Cppi_DescType_HOST, (Cppi_Desc *)hostDesc, (UInt8 *)msg,
- msgQDataLen);
- Cppi_setPacketLen(Cppi_DescType_HOST, (Cppi_Desc *)hostDesc, msgQDataLen);
- Cppi_setOriginalBufInfo(Cppi_DescType_HOST, (Cppi_Desc*)hostDesc,
- (UInt8 *)msg, msgQDataLen);
- wb((Void *) hostDesc, obj->txDescSize);
+ Srio_SockAddrInfo dstSrioAddr;
+ UInt16 dstProcId = (UInt16)(((MessageQ_Msg)(msg))->dstProc);
+ UInt32 msgQDataLen = MessageQ_getMsgSize(msg);
- /* Find destination SRIO endpoint address based on remote MultiProc ID */
+ /* Find destination SRIO endpoint address based on remote
+ * MultiProc ID */
switch (obj->sockParams.sockType) {
- case TransportSrio_srioSockType_TYPE_11:
- dstSrioAddr.type11.tt = obj->sockParams.u.pT11Eps[dstProcId].tt;
- dstSrioAddr.type11.id = obj->sockParams.u.pT11Eps[dstProcId].deviceId;
- dstSrioAddr.type11.letter = obj->sockParams.u.pT11Eps[dstProcId].letter;
- dstSrioAddr.type11.mbox = obj->sockParams.u.pT11Eps[dstProcId].mailbox;
+ case TransportSrio_srioSockType_TYPE_11: {
+ TransportSrio_srioSockType11EpParams *t11;
+
+ t11 = obj->sockParams.u.pT11Eps;
+ dstSrioAddr.type11.tt = t11[dstProcId].tt;
+ dstSrioAddr.type11.id = t11[dstProcId].deviceId;
+ dstSrioAddr.type11.letter = t11[dstProcId].letter;
+ dstSrioAddr.type11.mbox = t11[dstProcId].mailbox;
break;
- case TransportSrio_srioSockType_TYPE_9:
- dstSrioAddr.type9.tt = obj->sockParams.u.pT9Eps[dstProcId].tt;
- dstSrioAddr.type9.id = obj->sockParams.u.pT9Eps[dstProcId].deviceId;
- dstSrioAddr.type9.cos = obj->sockParams.u.pT9Eps[dstProcId].cos;
- dstSrioAddr.type9.streamId = obj->sockParams.u.pT9Eps[dstProcId].streamId;
+ }
+ case TransportSrio_srioSockType_TYPE_9: {
+ TransportSrio_srioSockType9EpParams *t9;
+
+ t9 = obj->sockParams.u.pT9Eps;
+ dstSrioAddr.type9.tt = t9[dstProcId].tt;
+ dstSrioAddr.type9.id = t9[dstProcId].deviceId;
+ dstSrioAddr.type9.cos = t9[dstProcId].cos;
+ dstSrioAddr.type9.streamId = t9[dstProcId].streamId;
break;
+ }
default:
- Assert_isTrue((status >= 0), TransportSrio_A_putInvalidSockType);
+ Assert_isTrue(0, TransportSrio_A_putInvalidSockType);
return(FALSE);
}
- /* Send the packet */
- status = Srio_sockSend(obj->socketHandle, (Srio_DrvBuffer)hostDesc,
- obj->txDescSize, &dstSrioAddr);
- Assert_isTrue ((status >= 0), TransportSrio_A_socketSendError);
- if (status < 0) {
- /* Error when sending - Push packet on completion queue for cleanup at
- * a later time */
- Qmss_queuePushDescSize((Qmss_QueueHnd) obj->txCompletionQ,
- (Void *) hostDesc, obj->txDescSize);
- return(FALSE);
+ if (msgQDataLen >= (obj->maxMTU - sizeof(transFragHdr_t))) {
+ /* Fragment packet. Fragments will always be SRIO max MTU in size.
+ * Last fragment will be padded. This is to distinguish fragmented
+ * packets from non-fragmented. */
+ return(transportSrioFragmentSend(obj, msg, &dstSrioAddr));
+ } else {
+ return(transportSrioStandardSend(obj, msg, &dstSrioAddr));
}
-
- /* Check completion queue to clean up the previous transaction descriptor */
- transportSrioTxBufRecycle(obj, 1);
-
- return(TRUE);
}
/* bind - not used */
TransportSrio_Object *obj = (TransportSrio_Object *)arg;
Cppi_HostDesc *hostDesc;
Srio_SockAddrInfo srcSocket;
- MessageQ_Msg rxMsg;
- UInt32 rxNumBytes;
- UInt32 queueId;
Assert_isTrue(obj->srioHandle != NULL, TransportSrio_A_invalidSrioHandle);
while(Srio_sockRecv(obj->socketHandle, (Srio_DrvBuffer*)&hostDesc,
&srcSocket)) {
+ MessageQ_Msg rxMsg;
+ UInt32 rxNumBytes;
+ UInt32 queueId;
+
/* Extract and invalidate MessageQ msg. The descriptor doesn't need to
* be invalidated prior to this operation since Srio_rxCompletionIsr()
* does this */
(UInt8 **)&rxMsg, (UInt32 *)&rxNumBytes);
inv((Void *) rxMsg, rxNumBytes);
- /* Reset heapId to rxMsgQHeapId. This heap is overwritten when message
- * is received over SRIO */
- rxMsg->heapId = obj->rxMsgQHeapId;
+ if (rxNumBytes == obj->maxMTU) {
+ /* Fragmented packet */
+ rxMsg = transportSrioFragmentRcv(obj, rxMsg, &srcSocket);
+ }
+
+ if (rxMsg) {
+ /* Reset heapId to rxMsgQHeapId. This heap is overwritten when
+ * message is received over SRIO */
+ rxMsg->heapId = obj->rxMsgQHeapId;
- /* Route to destination MessageQ */
- queueId = MessageQ_getDstQueue(rxMsg);
- MessageQ_put(queueId, rxMsg);
+ /* Route to destination MessageQ */
+ queueId = MessageQ_getDstQueue(rxMsg);
+ MessageQ_put(queueId, rxMsg);
+ }
/* Get new MessageQ buffer for descriptor */
transportSrioNewRxBuf(obj, hostDesc);
index aeac04b09805ac6b4107df5f00e7d7cff9b41b7d..d471ddb03f82799d82f0ccca95370ba88b05ffdb 100644 (file)
* ======== A_txMsgQFreeError ========
* The MessageQ message attached to a transmit descriptor could not be
* freed back to MessageQ.
- */
+ */
config Assert.Id A_txMsgQFreeError = {
msg: "A_txMsgQFreeError: Could not free transmit MessageQ buffer."
};
/*! An attempt to open a second TransportSrio Type 9 instance. Only one
* TransportSrio Type 9 instance can be created per DSP core */
const Int ERROR_SRIO_TYPE9_INST_ALREADY_EXISTS = 83;
+ /*! QMSS returned an error when attempting to allocate the transmit
+ * fragment queue */
+ const Int ERROR_COULD_NOT_OPEN_TX_FRAG_Q = 84;
+ /*! BIOS returned a NULL buffer when pre-allocating buffers for the
+ * SRIO transmit fragment descriptors */
+ const Int ERROR_ALLOC_FROM_TX_FRAG_HEAP_FAILED = 85;
+ /*! The configured maxMTU is greater than what SRIO hardware can handle,
+ * 4096 bytes */
+ const Int ERROR_INVALID_MAX_MTU = 86;
+ /*! Must be at least one source specified for interleaving in order to
+ * fragmentation/reassembly from one SRIO source */
+ const Int ERROR_INVALID_NUM_INTERLEAVED_SRCS = 87;
+ /*! There was an error allocating the memory for the fragmentation source
+ * list */
+ const Int ERROR_ALLOC_OF_FRAG_SOURCE_LIST = 88;
/*!
* Device specific configuration parameters for the SRIO transport.
/*!
* ======== txMemRegion ========
* QMSS memory region from which the transmit host descriptors will be
- * allocated from.
+ * allocated from. Enough descriptors must be in this region to
+ * accommodate the standard tx descriptors and the tx fragment descriptors
*/
config Int txMemRegion = -1;
*/
config UInt32 txNumDesc = 2;
+ /*!
+ * ======== txNumFragDesc ========
+ * Number of host descriptors to pre-allocate for SRIO transmit
+ * fragmented packet operations. Maximum needed is 64k/maxMTU (maxMTU
+ * can be no greater than 4096) but more can be configured without error.
+ * A smaller number will cause the fragment logic to wait for sent
+ * fragments to be recycled before sending remaining fragments of a large
+ * packet.
+ */
+ config UInt32 txNumFragDesc = 1;
+
/*!
* ======== txDescSize ========
* Size of the transmit descriptors. This size is used for cache coherence
*/
config UInt32 txDescSize = 0;
+ /*!
+ * ======== txFragHeap ========
+ * MessageQ heap ID for the heap from which the SRIO transmit fragmented
+ * packet are to be allocated. The heap must contain buffers at least
+ * 4096 bytes in size and there must be at least txNumFragDesc number of
+ * buffers
+ */
+ config UInt16 txMsgQFragHeapId = ~1u;
+
/*!
* ======== rxQType ========
* The QMSS queue type that will be opened and used with the receive
* ======== maxMTU ========
* Maximum transmittable unit in bytes that will be handled by the SRIO
* transport. Used to handle cache coherence operations and pre-allocation
- * of receive side MessageQ buffers.
+ * of receive side MessageQ buffers. Can be no greater than 4096 bytes.
+ * Any MessageQ packet equal to, or greater than, maxMTU - 4 bytes
+ * (fragmentation header) will be fragmented when sent over the SRIO
+ * interface.
*/
config UInt32 maxMTU = 256;
DeviceConfigParams *deviceCfgParams;
Int32 txCompletionQ;
Int32 txFreeQ;
+ Int32 txFragQ;
Int32 rxFreeQ;
Int32 rxAccumQ;
UInt16 rxMsgQHeapId;
UInt32 rxIntVectorId;
srioSockParams sockParams;
Void *socketHandle;
+ Void *fragSrcs;
+ UInt8 fragMsgTag;
UInt16 transNetId;
}
}
index f6067193b80085972ec5eef6a756c15c0f54b2ba..6cfcdf9241ed6b108022ab9dcd8c6d6d94c3eb75 100644 (file)
#define SYSINIT 0
#define NUM_DSP_CORES 2
#define NUM_CORES 3 /* Host + DSPs */
-#define NUM_TEST_ITERATIONS 3
+#define TEST_ITERATIONS_STD 3
+#define TEST_ITERATIONS_FRAG 3
+#define TEST_ITERATIONS_TOT (TEST_ITERATIONS_STD + TEST_ITERATIONS_FRAG)
#define NUM_MSGS_TO_PREALLOC 64
#define HOST_DESC_SIZE_BYTES 128
-#define HOST_DESC_NUM 256
+#define HOST_DESC_NUM 512
+#define TRANS_SEND_DESC 4
+#define TRANS_RCV_DESC 128
+#define TRANS_FRAG_DESC 4
#define HOST_DESC_MEM_REGION 0
-#define SRIO_MTU_SIZE_BYTES 4096
+/* Number of HeapBufMP buffers to be allocated for transport instance and test
+ * usage
+ * T11 instance receive --> ( TRANS_RCV_DESC
+ * T9 instance receive --> + TRANS_RCV_DESC
+ * T11 fragment buffers --> + TRANS_FRAG_DESC
+ * T9 fragment buffers --> + TRANS_FRAG_DESC
+ * Number of DSP cores --> * NUM_DSP_CORES)
+ * Test buffer overheard --> + NUM_MSGS_TO_PREALLOC * 2 (snd/rcv)
+ * Extra buffer space --> + (16 should be enough) */
+#define TEST_BUF_NUM (((TRANS_RCV_DESC + TRANS_RCV_DESC + \
+ TRANS_FRAG_DESC + TRANS_FRAG_DESC) * \
+ NUM_DSP_CORES) + \
+ (NUM_MSGS_TO_PREALLOC * 2) + 16)
+#define TEST_BUF_SIZE 4096
+
+#define SRIO_MTU_SIZE 4096
+/* Use smaller MTU size so that fragmentation kicks in when sending a buffer
+ * of size sizeof(TstMsg) */
+#define SRIO_MTU_SIZE_FRAG (4096-128)
#define SRIO_MSGQ_HEAP_NAME "srioIpcHeapBuf"
#define SRIO_MSGQ_HEAP_ID 1
coreNum);
testIterations++;
- if ((!testFailed) && (testIterations < NUM_TEST_ITERATIONS)) {
+ if ((!testFailed) && (testIterations < TEST_ITERATIONS_TOT)) {
/* Secondary DSPs must wait for SYSINIT DSP to complete cleanup if test
* is starting another iteration */
if (coreNum == SYSINIT) {
GateMP_Params gateMpParams;
HeapBufMP_Params heapBufParams;
uint8_t pathMode;
+ uint32_t srioMaxMTU;
+
+ switch (testIterations) {
+ case 0:
+ /* Port 0 is 1x - from srioPortPathMode_e defined in
+ * device_srio.c */
+ pathMode = 0;
+ srioMaxMTU = SRIO_MTU_SIZE;
+ System_printf("Core %d : Configuring SRIO port 0 as 1x "
+ "and MTU size as %d\n",
+ coreNum, srioMaxMTU);
+ break;
+ case 1:
+ /* Port 0 is 2x - from srioPortPathMode_e defined in
+ * device_srio.c */
+ pathMode = 3;
+ srioMaxMTU = SRIO_MTU_SIZE;
+ System_printf("Core %d : Configuring SRIO port 0 as 2x "
+ "and MTU size as %d\n",
+ coreNum, srioMaxMTU);
+ break;
+ case 2:
+ /* Port 0 is 4x - from srioPortPathMode_e defined in
+ * device_srio.c */
+ pathMode = 4;
+ srioMaxMTU = SRIO_MTU_SIZE;
+ System_printf("Core %d : Configuring SRIO port 0 as 4x "
+ "and MTU size as %d\n",
+ coreNum, srioMaxMTU);
+ break;
+ case 3:
+ /* Port 0 is 1x - from srioPortPathMode_e defined in
+ * device_srio.c */
+ pathMode = 0;
+ srioMaxMTU = SRIO_MTU_SIZE_FRAG;
+ System_printf("Core %d : Configuring SRIO port 0 as 1x "
+ "and MTU size as %d\n",
+ coreNum, srioMaxMTU);
+ break;
+ case 4:
+ /* Port 0 is 2x - from srioPortPathMode_e defined in
+ * device_srio.c */
+ pathMode = 3;
+ srioMaxMTU = SRIO_MTU_SIZE_FRAG;
+ System_printf("Core %d : Configuring SRIO port 0 as 2x "
+ "and MTU size as %d\n",
+ coreNum, srioMaxMTU);
+ break;
+ case 5:
+ /* Port 0 is 4x - from srioPortPathMode_e defined in
+ * device_srio.c */
+ pathMode = 4;
+ srioMaxMTU = SRIO_MTU_SIZE_FRAG;
+ System_printf("Core %d : Configuring SRIO port 0 as 4x "
+ "and MTU size as %d\n",
+ coreNum, srioMaxMTU);
+ break;
+ default:
+ /* Port 0 is 1x for any further test iterations */
+ pathMode = 0;
+ srioMaxMTU = SRIO_MTU_SIZE;
+ System_printf("Core %d : Configuring SRIO port 0 as 1x "
+ "and MTU size as %d\n",
+ coreNum, srioMaxMTU);
+ break;
+ }
/* System initializations for each core. */
if (coreNum == SYSINIT) {
return;
}
- switch (testIterations) {
- case 0:
- /* Port 0 is 1x - from srioPortPathMode_e defined in
- * device_srio.c */
- pathMode = 0;
- System_printf("Core %d : Configuring SRIO port 0 as 1x\n",
- coreNum);
- break;
- case 1:
- /* Port 0 is 2x - from srioPortPathMode_e defined in
- * device_srio.c */
- pathMode = 3;
- System_printf("Core %d : Configuring SRIO port 0 as 2x\n",
- coreNum);
- break;
- case 2:
- /* Port 0 is 4x - from srioPortPathMode_e defined in
- * device_srio.c */
- pathMode = 4;
- System_printf("Core %d : Configuring SRIO port 0 as 4x\n",
- coreNum);
- break;
- default:
- /* Port 0 is 1x for any further test iterations */
- pathMode = 0;
- System_printf("Core %d : Configuring SRIO port 0 as 1x\n",
- coreNum);
- break;
- }
-
/* Device Specific SRIO Initializations: This should always be called
* before initializing the SRIO Driver. */
if (SrioDevice_init(pathMode) < 0) {
HeapBufMP_Params_init(&heapBufParams);
heapBufParams.regionId = 0;
heapBufParams.name = SRIO_MSGQ_HEAP_NAME;
- heapBufParams.numBlocks = HOST_DESC_NUM * 2;
- heapBufParams.blockSize = SRIO_MTU_SIZE_BYTES;
+ heapBufParams.numBlocks = TEST_BUF_NUM;
+ heapBufParams.blockSize = TEST_BUF_SIZE;
/* GateMP so allocation can take place within SRIO rx interrupt
* context */
heapBufParams.gate = gateMpHandle;
transSrioParamsT11.txMemRegion = HOST_DESC_MEM_REGION;
/* Descriptor pool divided between all cores. Account type 9+11 for
* send/receive (divide by 4) */
- transSrioParamsT11.txNumDesc = (HOST_DESC_NUM / 4) / NUM_DSP_CORES;
+ transSrioParamsT11.txNumDesc = TRANS_SEND_DESC;
+ transSrioParamsT11.txNumFragDesc = TRANS_FRAG_DESC;
+ transSrioParamsT11.txMsgQFragHeapId = SRIO_MSGQ_HEAP_ID;
transSrioParamsT11.txDescSize = HOST_DESC_SIZE_BYTES;
transSrioParamsT11.rxQType = Qmss_QueueType_HIGH_PRIORITY_QUEUE;
transSrioParamsT11.rxMemRegion = HOST_DESC_MEM_REGION;
/* Descriptor pool divided between all cores. Account type 9+11 for
* send/receive (divide by 4) */
- transSrioParamsT11.rxNumDesc = (HOST_DESC_NUM / 4) / NUM_DSP_CORES;
+ transSrioParamsT11.rxNumDesc = TRANS_RCV_DESC;
transSrioParamsT11.rxDescSize = HOST_DESC_SIZE_BYTES;
transSrioParamsT11.rxMsgQHeapId = SRIO_MSGQ_HEAP_ID;
- transSrioParamsT11.maxMTU = SRIO_MTU_SIZE_BYTES;
+ transSrioParamsT11.maxMTU = srioMaxMTU;
transSrioParamsT11.rmServiceHandle = rmServiceHandle;
/* Must map to a valid channel for each DSP core. Follow sprugr9f.pdf
* Table 5-9 */
transSrioParamsT11.accumCh = DNUM;
- transSrioParamsT11.accumTimerCount = 0;
+ transSrioParamsT11.accumTimerCount = 0;
transSrioParamsT11.transNetworkId = SRIO_T11_TRANS_NET_ID;
transSrioParamsT11.rxIntVectorId = 8;
transSrioParamsT9.txMemRegion = HOST_DESC_MEM_REGION;
/* Descriptor pool divided between all cores. Account type 9+11 for
* send/receive (divide by 4) */
- transSrioParamsT9.txNumDesc = (HOST_DESC_NUM / 4) / NUM_DSP_CORES;
+ transSrioParamsT9.txNumDesc = TRANS_SEND_DESC;
+ transSrioParamsT9.txNumFragDesc = TRANS_FRAG_DESC;
+ transSrioParamsT9.txMsgQFragHeapId = SRIO_MSGQ_HEAP_ID;
transSrioParamsT9.txDescSize = HOST_DESC_SIZE_BYTES;
transSrioParamsT9.rxQType = Qmss_QueueType_HIGH_PRIORITY_QUEUE;
transSrioParamsT9.rxMemRegion = HOST_DESC_MEM_REGION;
/* Descriptor pool divided between all cores. Account type 9+11 for
* send/receive (divide by 4) */
- transSrioParamsT9.rxNumDesc = (HOST_DESC_NUM / 4) / NUM_DSP_CORES;
+ transSrioParamsT9.rxNumDesc = TRANS_RCV_DESC;
transSrioParamsT9.rxDescSize = HOST_DESC_SIZE_BYTES;
transSrioParamsT9.rxMsgQHeapId = SRIO_MSGQ_HEAP_ID;
- transSrioParamsT9.maxMTU = SRIO_MTU_SIZE_BYTES;
+ transSrioParamsT9.maxMTU = srioMaxMTU;
transSrioParamsT9.rmServiceHandle = rmServiceHandle;
/* Type 9 instance specific parameters */
/* Must map to a valid channel for each DSP core. Follow sprugr9g.pdf
System_printf("Core %d : Number of DSPs %d\n", coreNum,
ipcNumDspCores);
System_printf("Core %d : Number of test iterations: %d\n", coreNum,
- NUM_TEST_ITERATIONS);
+ TEST_ITERATIONS_TOT);
System_printf("Core %d : Starting IPC core %d with name (\"%s\")\n",
coreNum, ipcCoreId, MultiProc_getName(ipcCoreId));