Sorry for a mistake for the code, it should be: ------------------------------------------------------------------------------------------------ int n = txq->tx_rs_thresh; int32_t i = 0, j = 0; const int32_t k = RTE_ALIGN_FLOOR(n, RTE_I40E_TX_MAX_FREE_BUF_SZ); const int32_t m = n % RTE_I40E_TX_MAX_FREE_BUF_SZ; struct rte_mbuf *free[RTE_I40E_TX_MAX_FREE_BUF_SZ];
For FAST_FREE_MODE: if (k) { for (j = 0; j != k - RTE_I40E_TX_MAX_FREE_BUF_SZ; j += RTE_I40E_TX_MAX_FREE_BUF_SZ) { for (i = 0; i <RTE_I40E_TX_MAX_FREE_BUF_SZ; ++i, ++txep) { free[i] = txep->mbuf; txep->mbuf = NULL; } rte_mempool_put_bulk(free[0]->pool, (void **)free, RTE_I40E_TX_MAX_FREE_BUF_SZ); } } if (m) { for (i = 0; i < m; ++i, ++txep) { free[i] = txep->mbuf; txep->mbuf = NULL; } } rte_mempool_put_bulk(free[0]->pool, (void **)free, m); } ------------------------------------------------------------------------------------------------