X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=VNFs%2FvCGNAPT%2Fpipeline%2Fpipeline_timer_be.c;h=7ba4964a293802d8a27bf0045368f984779d4272;hb=56400cedab3a066b10401f676a8ee86c2463ff53;hp=bfe8f5c411c2e22141eeebde0e5928908dec2f59;hpb=44e700fcfe8655565076b9c3036c61b2e53a8bcd;p=samplevnf.git diff --git a/VNFs/vCGNAPT/pipeline/pipeline_timer_be.c b/VNFs/vCGNAPT/pipeline/pipeline_timer_be.c index bfe8f5c4..7ba4964a 100644 --- a/VNFs/vCGNAPT/pipeline/pipeline_timer_be.c +++ b/VNFs/vCGNAPT/pipeline/pipeline_timer_be.c @@ -113,7 +113,7 @@ void timer_thread_enqueue(struct pipeline_cgnapt_entry_key *egress_key, sizeof(struct cgnapt_table_entry)); } - if (rte_ring_mp_enqueue(timer_ring, (void *)tk_ptr) == -ENOBUFS) + if (rte_ring_enqueue(timer_ring, (void *)tk_ptr) == -ENOBUFS) printf("Ring enqueue failed: trying to enqueue\n"); } @@ -126,7 +126,7 @@ void timer_thread_dequeue(void) struct timer_key *tk_ptr; int ret; - ret = rte_ring_sc_dequeue(timer_ring, (void *)&tk_ptr); + ret = rte_ring_dequeue(timer_ring, (void *)&tk_ptr); if (ret == -ENOENT) return; @@ -444,8 +444,8 @@ static void *pipeline_timer_init(struct pipeline_params *params, void *arg) if (timer_key_mempool == NULL) rte_panic("timer_key_mempool create error\n"); - timer_ring = rte_ring_create("TIMER_RING", - timer_ring_alloc_cnt, rte_socket_id(), 0); + timer_ring = rte_ring_create("TIMER_RING", timer_ring_alloc_cnt, + rte_socket_id(), RING_F_SC_DEQ); if (timer_ring == NULL) rte_panic("timer_ring creation failed");