summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: f0dd658)
raw | patch | inline | side by side (from parent 1: f0dd658)
author | Raghu Nambiath <rnambiath@ti.com> | |
Fri, 28 Sep 2012 14:11:08 +0000 (10:11 -0400) | ||
committer | Raghu Nambiath <rnambiath@ti.com> | |
Fri, 28 Sep 2012 14:11:08 +0000 (10:11 -0400) |
ti/runtime/netapi/test/net_test.c | patch | blob | history |
index e3bcd93af9ee6d94f5e35f33322cc211864e51b6..ce67fc979d10dbf3b0ced18a275bcb7e441ff1d3 100755 (executable)
nwalTxPSCmdInfo_t flowPSCmdInfo;
nwal_RetValue nwalRetVal;
+/* Local Per Process default resourcese maintained at NWAL */
+nwalLocCxtInfo_t nwalLocCxt;
+
//this device: 10.0.0.100, mac 0x,01,02,03,04,05 and .. 0x6
//test packet, setup for loopback (so dest is ourself)
meta_tx.appCtxId = (nwal_AppId)netapi_timing_start();
meta.u.tx_sb_meta=&meta_tx;
-#ifdef NET_TEST_ENABLE_SIDE_BAND_LOW_LEVEL_API
+#ifdef NET_TEST_ENABLE_SIDE_BAND_LOW_LEVEL_API
+ /* Use the command label which was cached during create time
+ * Update the Queue to receive output packet from SA to the local
+ * core Queue. Below information can be saved by application in
+ * per process context to avoid API overhead per packet
+ * Application can use below rxSbSaQ for polling packets back from
+ * SA
+ */
+ nwalRetVal =
+ nwal_getLocCxtInfo(PKTIO_GET_NWAL_INSTANCE(netcp_sb_tx_chan),
+ &nwalLocCxt);
+ if(nwalRetVal == nwal_OK)
+ {
+ p_sa_info->tx_dmPSCmdInfo.rxSbSaQ = nwalLocCxt.rxSbSaQ;
+ }
nwal_mCmdDMUpdate(tip,
&p_sa_info->tx_dmPSCmdInfo,
meta_tx.appCtxId,
/* post it to netcp sb tx channel*/
meta2.u.tx_sb_meta=&meta_tx;
-#ifdef NET_TEST_ENABLE_SIDE_BAND_LOW_LEVEL_API
+#ifdef NET_TEST_ENABLE_SIDE_BAND_LOW_LEVEL_API
+ /* Use the command label which was cached during create time
+ * Update the Queue to receive output packet from SA to the local
+ * core Queue. Below information can be saved by application in
+ * per process context to avoid API overhead per packet
+ * Application can use below rxSbSaQ for polling packets back from
+ * SA
+ */
+ nwalRetVal =
+ nwal_getLocCxtInfo(PKTIO_GET_NWAL_INSTANCE(netcp_sb_tx_chan),
+ &nwalLocCxt);
+ if(nwalRetVal == nwal_OK)
+ {
+ p_sa_info->rx_dmPSCmdInfo.rxSbSaQ = nwalLocCxt.rxSbSaQ;
+ }
nwal_mCmdDMUpdate(tip,
&p_sa_info->rx_dmPSCmdInfo,
meta_tx.appCtxId,
meta_tx.pAad);
pPloadDesc = Pktlib_getDescFromPacket(tip);
pPloadDesc = Qmss_osalConvertDescVirtToPhy(pPloadDesc);
- Qmss_queuePushDescSizeRaw(p_sa_info->tx_dmPSCmdInfo.txQueue,
+ Qmss_queuePushDescSizeRaw(p_sa_info->rx_dmPSCmdInfo.txQueue,
pPloadDesc,
NWAL_DESC_SIZE);