diff mbox series

[API-NEXT,5/5] linux-gen: queue: remove type set from interface

Message ID 20170627132243.17298-6-petri.savolainen@linaro.org
State New
Headers show
Series Queue interface clean up | expand

Commit Message

Petri Savolainen June 27, 2017, 1:22 p.m. UTC
TM should not modify queue type, thus the interface function
is not needed for that.

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

---
 platform/linux-generic/include/odp_queue_if.h | 2 --
 platform/linux-generic/odp_queue.c            | 8 +-------
 platform/linux-generic/odp_traffic_mngr.c     | 4 ----
 3 files changed, 1 insertion(+), 13 deletions(-)

-- 
2.13.0
diff mbox series

Patch

diff --git a/platform/linux-generic/include/odp_queue_if.h b/platform/linux-generic/include/odp_queue_if.h
index ad807d75..604bb25a 100644
--- a/platform/linux-generic/include/odp_queue_if.h
+++ b/platform/linux-generic/include/odp_queue_if.h
@@ -77,7 +77,6 @@  typedef void (*queue_set_pktout_fn_t)(odp_queue_t handle, odp_pktio_t pktio,
 typedef void (*queue_set_enq_fn_t)(queue_t q_int,
 				   queue_enq_fn_t enq,
 				   queue_enq_multi_fn_t enq_multi);
-typedef void (*queue_set_type_fn_t)(queue_t q_int, odp_queue_type_t type);
 
 /* Queue functions towards other internal components */
 typedef struct {
@@ -96,7 +95,6 @@  typedef struct {
 	queue_get_pktin_fn_t get_pktin;
 	queue_set_pktin_fn_t set_pktin;
 	queue_set_enq_fn_t set_enq;
-	queue_set_type_fn_t set_type;
 } queue_fn_t;
 
 extern const queue_fn_t *queue_fn;
diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c
index 6cbf1040..81e37822 100644
--- a/platform/linux-generic/odp_queue.c
+++ b/platform/linux-generic/odp_queue.c
@@ -823,11 +823,6 @@  static void queue_set_enq(queue_t q_int,
 	qentry->s.enqueue_multi = enq_multi;
 }
 
-static void queue_set_type(queue_t q_int, odp_queue_type_t type)
-{
-	qentry_from_int(q_int)->s.type = type;
-}
-
 static queue_t queue_from_ext(odp_queue_t handle)
 {
 	return qentry_to_int(handle_to_qentry(handle));
@@ -876,6 +871,5 @@  queue_fn_t queue_default_fn = {
 	.set_pktout = queue_set_pktout,
 	.get_pktin = queue_get_pktin,
 	.set_pktin = queue_set_pktin,
-	.set_enq = queue_set_enq,
-	.set_type = queue_set_type
+	.set_enq = queue_set_enq
 };
diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/linux-generic/odp_traffic_mngr.c
index 04239884..c8ff0d07 100644
--- a/platform/linux-generic/odp_traffic_mngr.c
+++ b/platform/linux-generic/odp_traffic_mngr.c
@@ -37,9 +37,6 @@  static const pkt_desc_t EMPTY_PKT_DESC = { .word = 0 };
 #define MAX_PRIORITIES ODP_TM_MAX_PRIORITIES
 #define NUM_SHAPER_COLORS ODP_NUM_SHAPER_COLORS
 
-/* Traffic manager queue */
-#define QUEUE_TYPE_TM  4
-
 static tm_prop_t basic_prop_tbl[MAX_PRIORITIES][NUM_SHAPER_COLORS] = {
 	[0] = {
 		[ODP_TM_SHAPER_GREEN] = { 0, DECR_BOTH },
@@ -3926,7 +3923,6 @@  odp_tm_queue_t odp_tm_queue_create(odp_tm_t odp_tm,
 		return ODP_TM_INVALID;
 	}
 	tm_queue_obj->tm_qentry = queue_fn->from_ext(queue);
-	queue_fn->set_type(tm_queue_obj->tm_qentry, QUEUE_TYPE_TM);
 	queue_fn->set_enq(tm_queue_obj->tm_qentry,
 			  queue_tm_reenq,
 			  queue_tm_reenq_multi);