diff options
author | Mohammad Abdul Awal <mohammad.abdul.awal@intel.com> | 2017-05-11 13:36:12 +0100 |
---|---|---|
committer | Mohammad Abdul Awal <mohammad.abdul.awal@intel.com> | 2017-05-15 15:11:36 +0100 |
commit | fbba0a3bf2dbfd86e48efe9745af9f94203d5f80 (patch) | |
tree | 69ba709ff7ebc503fc2036324c1ffa09037a9f7d /lib/libtle_l4p/udp_rxtx.c | |
parent | 8d020909941acca43cf7e772a99682a894347526 (diff) |
Added rte_ring wrapper functions to support dpdk-17.05 and older version
Change-Id: I5cfcff8be275ab2a2fb4ad6a62777a8cb88f425b
Signed-off-by: Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>
Diffstat (limited to 'lib/libtle_l4p/udp_rxtx.c')
-rw-r--r-- | lib/libtle_l4p/udp_rxtx.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libtle_l4p/udp_rxtx.c b/lib/libtle_l4p/udp_rxtx.c index 01d3520..e6b8ded 100644 --- a/lib/libtle_l4p/udp_rxtx.c +++ b/lib/libtle_l4p/udp_rxtx.c @@ -97,7 +97,7 @@ rx_stream(struct tle_udp_stream *s, void *mb[], struct rte_mbuf *rp[], { uint32_t i, k, r; - r = rte_ring_enqueue_burst(s->rx.q, mb, num); + r = _rte_ring_enqueue_burst(s->rx.q, mb, num); /* if RX queue was empty invoke user RX notification callback. */ if (s->rx.cb.func != NULL && r != 0 && rte_ring_count(s->rx.q) == r) @@ -223,7 +223,7 @@ stream_drb_release(struct tle_udp_stream *s, struct tle_drb *drb[], uint32_t n; n = rte_ring_count(s->tx.drb.r); - rte_ring_enqueue_burst(s->tx.drb.r, (void **)drb, nb_drb); + _rte_ring_enqueue_burst(s->tx.drb.r, (void **)drb, nb_drb); /* If stream is still open, then mark it as avaialble for writing. */ if (rwl_try_acquire(&s->tx.use) > 0) { @@ -310,7 +310,7 @@ tle_udp_stream_recv(struct tle_stream *us, struct rte_mbuf *pkt[], uint16_t num) struct tle_udp_stream *s; s = UDP_STREAM(us); - n = rte_ring_mc_dequeue_burst(s->rx.q, (void **)pkt, num); + n = _rte_ring_mc_dequeue_burst(s->rx.q, (void **)pkt, num); if (n == 0) return 0; @@ -451,14 +451,14 @@ static inline void stream_drb_free(struct tle_udp_stream *s, struct tle_drb *drbs[], uint32_t nb_drb) { - rte_ring_enqueue_burst(s->tx.drb.r, (void **)drbs, nb_drb); + _rte_ring_enqueue_burst(s->tx.drb.r, (void **)drbs, nb_drb); } static inline uint32_t stream_drb_alloc(struct tle_udp_stream *s, struct tle_drb *drbs[], uint32_t nb_drb) { - return rte_ring_dequeue_burst(s->tx.drb.r, (void **)drbs, nb_drb); + return _rte_ring_dequeue_burst(s->tx.drb.r, (void **)drbs, nb_drb); } /* enqueue up to num packets to the destination device queue. */ |