The API states that the return values of odp_tm_enq() and odp_tm_enq_with_cnt() are different (the former returns 0 on success), but the implementations of both were identical.
Signed-off-by: Oriol Arcas <or...@starflownetworks.com> --- platform/linux-generic/odp_traffic_mngr.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/linux-generic/odp_traffic_mngr.c index aa14b6b..5712fe5 100644 --- a/platform/linux-generic/odp_traffic_mngr.c +++ b/platform/linux-generic/odp_traffic_mngr.c @@ -4063,6 +4063,7 @@ int odp_tm_enq(odp_tm_queue_t tm_queue, odp_packet_t pkt) { tm_queue_obj_t *tm_queue_obj; tm_system_t *tm_system; + int rc; tm_queue_obj = GET_TM_QUEUE_OBJ(tm_queue); if (!tm_queue_obj) @@ -4075,7 +4076,11 @@ int odp_tm_enq(odp_tm_queue_t tm_queue, odp_packet_t pkt) if (odp_atomic_load_u64(&tm_system->destroying)) return -1; - return tm_enqueue(tm_system, tm_queue_obj, pkt); + rc = tm_enqueue(tm_system, tm_queue_obj, pkt); + if (rc < 0) + return rc; + + return 0; } int odp_tm_enq_with_cnt(odp_tm_queue_t tm_queue, odp_packet_t pkt) -- 1.9.1