コード例 #1
0
PRIVATE void 
ixEthAccCodeletLoopbackTxCB(UINT32 cbTag, 
			    IX_OSAL_MBUF* mBufPtr)
{
    /* Put the mbuf back in the rx free pool */
    if(cbTag < IX_ETHACC_CODELET_MAX_PORT)
    {
	ixEthAccCodeletStats[cbTag].txCount++;

	/* reset the frame length to the length at pool setup */
	ixEthAccCodeletMbufChainSizeSet(mBufPtr);

	if(ixEthAccPortRxFreeReplenish(cbTag, mBufPtr) != IX_SUCCESS)
	{
	    ixOsalLog(IX_OSAL_LOG_LVL_ERROR, IX_OSAL_LOG_DEV_STDOUT,
		      "Error replenishing RX free queue on port %d\n", 
		      cbTag, 0, 0, 0, 0, 0);
	}    
    }
    else
    {
	ixOsalLog(IX_OSAL_LOG_LVL_ERROR, IX_OSAL_LOG_DEV_STDOUT,
		  "Invalid Tx callback tag %d in RxSink Operation\n", 
		  cbTag, 0, 0, 0, 0, 0);
    }
}
コード例 #2
0
PRIVATE void ixEthAccCodeletSwBridgeQoSTxCB(UINT32 cbTag, IX_OSAL_MBUF* mBufPtr)
{
    IxEthAccPortId thisPortId = (IxEthAccPortId)(cbTag & 0xffff);
    IxEthAccPortId otherPortId = (IxEthAccPortId)(cbTag>>16);

    /* 
     * Put the mbuf on the rx freeQ of the other port since it was
     * received there initially.
     */
    ixEthAccCodeletStats[thisPortId].txCount++;

    /* one tx that was pending is now complete */
    pendingTx[thisPortId]--;
    
    /* reset the frame length */
    ixEthAccCodeletMbufChainSizeSet(mBufPtr);

    /* replenish the other port */
    if(ixEthAccPortRxFreeReplenish(otherPortId, 
				   mBufPtr)
       !=IX_SUCCESS)
    {
	ixOsalLog(IX_OSAL_LOG_LVL_ERROR, IX_OSAL_LOG_DEV_STDOUT,
		  "SwBridgeQos: Error replenishing RX free q for port %u\n", 
		  (UINT32)(1 - cbTag), 0, 0, 0, 0, 0);
    }
}
コード例 #3
0
/**
 * @fn void ixEthAccCodeletRxSinkRxCB()
 * 
 * Recieve callback for Rx sink
 * 
 * @return void
 */
PRIVATE void 
ixEthAccCodeletRxSinkRxCB(UINT32 cbTag, IX_OSAL_MBUF** mBufPtr)
{
    while (NULL != *mBufPtr)
    {
	ixEthAccCodeletStats[cbTag].rxCount++;
	
#ifdef IX_ETHACC_CODELET_TXGENRXSINK_VERIFY
	IX_ETHACC_CODELET_DATA_VERIFY(IX_OSAL_MBUF_MDATA(*mBufPtr), compData);
	
	/* After reading the payload, invalidate it before replenish */
	IX_OSAL_CACHE_INVALIDATE(IX_OSAL_MBUF_MDATA(*mBufPtr), 
				 IX_OSAL_MBUF_MLEN(*mBufPtr));
#endif
	
	ixEthAccCodeletMbufChainSizeSet(*mBufPtr);

	/* Return mBuf to free queue on same port */
	if(ixEthAccPortRxFreeReplenish(cbTag, *mBufPtr) != IX_SUCCESS)
	{
	    ixOsalLog(IX_OSAL_LOG_LVL_ERROR, IX_OSAL_LOG_DEV_STDOUT,
		      "Error replenishing RX free q in TxGen-RxSink\n", 
		      0, 0, 0, 0, 0, 0);
	}
	/* move to next buffer received */
	mBufPtr++;
    }
}
コード例 #4
0
void ixEthAccCodeletBridgeTxCB(UINT32 cbTag, IX_OSAL_MBUF* mBufPtr)
{
    IxEthAccPortId thisPortId = (IxEthAccPortId)(cbTag & 0xffff);
    IxEthAccPortId otherPortId = (IxEthAccPortId)(cbTag>>16);

    /* 
     * Put the mbuf on the Rx free q of the other port since it was
     * received there initially.
     */
    ixEthAccCodeletStats[thisPortId].txCount++;

    ixEthAccCodeletMbufChainSizeSet(mBufPtr);

    if(ixEthAccPortRxFreeReplenish(otherPortId, mBufPtr)!=IX_SUCCESS)
    {
	    ixOsalLog(IX_OSAL_LOG_LVL_ERROR, IX_OSAL_LOG_DEV_STDOUT,
		      "Error replenishing RX free q for port %d\n", 
		      cbTag, 0, 0, 0, 0, 0);
    }    
}