/* param handle The ENET handler pointer. This is the same handler pointer used in the ENET_Init. param isEnable Enable or disable flag. param ringId The ring index or ring number. retval kStatus_Success Succeed to enable/disable Tx reclaim. retval kStatus_Fail Fail to enable/disable Tx reclaim.  */
status_t ENET_SetTxReclaim(enet_handle_t *handle, bool isEnable, uint8_t ringId)
/* param handle The ENET handler pointer. This is the same handler pointer used in the ENET_Init. param isEnable Enable or disable flag. param ringId The ring index or ring number. retval kStatus_Success Succeed to enable/disable Tx reclaim. retval kStatus_Fail Fail to enable/disable Tx reclaim.  */
status_t ENET_SetTxReclaim(enet_handle_t *handle, bool isEnable, uint8_t ringId)
{
    assert(handle != NULL);
    assert(ringId < (uint8_t)FSL_FEATURE_ENET_QUEUE);
    enet_tx_bd_ring_t *txBdRing       = &handle->txBdRing[ringId];
    enet_tx_dirty_ring_t *txDirtyRing = &handle->txDirtyRing[ringId];
    status_t result = kStatus_Success;
    if ((txDirtyRing->txGenIdx == txDirtyRing->txConsumIdx) && ENET_TxDirtyRingAvailable(txDirtyRing))
    {
        if (isEnable)
        {
            handle->TxReclaimEnable[ringId] = true;
            txBdRing->txConsumIdx           = txBdRing->txGenIdx;
        }
        else
        {
            handle->TxReclaimEnable[ringId] = false;
        }
    }
    else
    {
        result = kStatus_Fail;
    }
    return result;
}