aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltan Kiss <zoltan.kiss@linaro.org>2016-07-14 17:23:38 +0100
committerZoltan Kiss <zoltan.kiss@linaro.org>2016-07-26 15:57:45 +0100
commit7210354a45df32dae27b6aa16b5a8f737e57994e (patch)
treea67e954be225f2b570535b58e723bf978dfdfdbe
parent32ee6577f7c31ed3ac9721c15daa17dd1421c77c (diff)
downloadodp-dpdk-7210354a45df32dae27b6aa16b5a8f737e57994e.tar.gz
linux-dpdk: pool: use new external mempool handlers
This commit introduced a new way of handling mempools: http://dpdk.org/browse/dpdk/commit/?id=449c49b9 mempool: support handler operations Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
-rw-r--r--platform/linux-dpdk/odp_packet_dpdk.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/platform/linux-dpdk/odp_packet_dpdk.c b/platform/linux-dpdk/odp_packet_dpdk.c
index 122a33cc..c6ae446c 100644
--- a/platform/linux-dpdk/odp_packet_dpdk.c
+++ b/platform/linux-dpdk/odp_packet_dpdk.c
@@ -301,15 +301,6 @@ static int stop_pkt_dpdk(pktio_entry_t *pktio_entry)
return 0;
}
-static unsigned rte_mempool_available(const struct rte_mempool *mp)
-{
-#if RTE_MEMPOOL_CACHE_MAX_SIZE > 0
- return rte_ring_count(mp->ring) + mp->local_cache[rte_lcore_id()].len;
-#else
- return rte_ring_count(mp->ring);
-#endif
-}
-
/* Forward declaration */
static int send_pkt_dpdk(pktio_entry_t *pktio_entry, int index,
const odp_packet_t pkt_table[], int len);
@@ -330,7 +321,7 @@ static void _odp_pktio_send_completion(pktio_entry_t *pktio_entry)
for (i = 0; i < ODP_CONFIG_PKTIO_ENTRIES; ++i) {
pktio_entry_t *entry = &pktio_tbl->entries[i];
- if (rte_mempool_available(rte_mempool) != 0)
+ if (rte_mempool_avail_count(rte_mempool) != 0)
return;
if (entry == pktio_entry)
@@ -381,7 +372,7 @@ static int recv_pkt_dpdk(pktio_entry_t *pktio_entry, int index,
get_pool_entry(_odp_typeval(pktio_entry->s.pool));
struct rte_mempool *rte_mempool =
pool_entry->s.rte_mempool;
- if (rte_mempool_available(rte_mempool) == 0)
+ if (rte_mempool_avail_count(rte_mempool) == 0)
_odp_pktio_send_completion(pktio_entry);
}