summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3d47968)
raw | patch | inline | side by side (parent: 3d47968)
author | David Lide <a0216552@gtudci01.(none)> | |
Fri, 22 Feb 2013 22:33:24 +0000 (17:33 -0500) | ||
committer | David Lide <a0216552@gtudci01.(none)> | |
Fri, 22 Feb 2013 22:33:24 +0000 (17:33 -0500) |
ti/runtime/netapi/src/pktio.c | patch | blob | history |
index 33d70a1662d7a9fae191c318889e5eb6f78f5b33..3c40a53f5e3f4e81831117dd3a26c82622041fd7 100755 (executable)
pPloadDesc,
NWAL_DESC_SIZE);
}
+ else
+ {
+ *err=NETAPI_ERR_BAD_INPUT;
+ return -1;
+ }
+
return 1;
}
pPloadDesc,
NWAL_DESC_SIZE);
}
+ else
+ {
+ *err=NETAPI_ERR_BAD_INPUT;
+ return -1;
+ }
+
return 1;
}
pPloadDesc,
NWAL_DESC_SIZE);
}
+ else
+ {
+ *err=NETAPI_ERR_BAD_INPUT;
+ return -1;
+ }
+
return 1;
}
pPloadDesc,
NWAL_DESC_SIZE);
}
+ else
+ {
+ *err= NETAPI_ERR_BAD_INPUT;
+ return -1;
+ }
return 1;
}
if (res != nwal_OK)
{
*err = NETAPI_ERR_NWAL_TX_ERR -res;
+ return -1;
}
return 1;
}
{
dmPSCmdInfo->rxSbSaQ = rxQ;
}
+ else
+ {
+ *err=NETAPI_ERR_BAD_INPUT;
+ return -1;
+ }
nwal_mCmdDMUpdate(pkt,
dmPSCmdInfo,
pPktInfoSB->appCtxId,
pPloadDesc,
NWAL_DESC_SIZE);
}
+ else
+ {
+ *err=NETAPI_ERR_BAD_INPUT;
+ return -1;
+ }
return 1;
}
int * err)
{
Cppi_DescTag tag={0};
+ Cppi_HostDesc* pPloadDesc;
PKTIO_HANDLE_T *p=(PKTIO_HANDLE_T*) pp;
*err=0;
tag.srcTagLo = m->u.tx_ifdma_dest;
Cppi_setTag (Cppi_DescType_HOST, (Cppi_Desc *)pkt, &tag);
- Qmss_queuePushDesc (p->q, (void*)pkt);
+ pPloadDesc = Pktlib_getDescFromPacket(pkt);
+ pPloadDesc = Qmss_osalConvertDescVirtToPhy(pPloadDesc);
+ Qmss_queuePushDescSizeRaw(p->q,
+ pPloadDesc,
+ NWAL_DESC_SIZE);
return 1;
}
/* create a general queue */
- p->q = Qmss_queueOpen(Qmss_QueueType_GENERAL_PURPOSE_QUEUE,
- QMSS_PARAM_NOT_SPECIFIED, &isAllocated);
+ p->q = Qmss_queueOpen(qtype,
+ q,
+ &isAllocated);
if (p->q == (Qmss_QueueHnd) NULL)
{
netapi_Log("netapi_pktioCreate: queueOpen failed\n");
if (!strcmp(name,NETCP_SB_RX)) p->_poll=netapip_pktioPollSb;
if (!strcmp(name,NETCP_SB_TX)) p->_send=netapip_pktioSendSb;
}
-#if 0
- else if (!(strncmp(name,"NETCP_IFDMA:",strlen("NETCP_IFDMA:")) ) )
- {
- p_qnum = netapip_findGlobalPktio(n, name);
- if (!p_qnum )
- {
- netapi_Log("pktio_open: can't find %s\n",name);
- p->inuse=0;
- *err= NETAPI_ERR_NOTFOUND; ///queue lld error
- return NULL;
- }
-
- p->q = Qmss_queueOpen(Qmss_QueueType_INFRASTRUCTURE_QUEUE,
- p_qnum->qNum , &isAllocated);
- if (p->q == (Qmss_QueueHnd) NULL)
- {
- netapi_Log("pktio_create: queueOpen failed\n");
- p->inuse=0;
- *err= NETAPI_ERR_QLLD; ///queue lld error
- return NULL;
- }
- p->qInfo = Qmss_getQueueNumber(p->q);
- p->_send= pktio_send_ifdma;
- p->use_nwal = 0;
- }
-#endif
else
{
hplib_mSpinLockLock(&netapi_pktio_lock);