diff mbox series

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

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

Commit Message

Petri Savolainen July 4, 2017, 9:53 a.m. UTC
TM should not modify queue type. Remove type_set queue
interface function.

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_queue_scalable.c   | 8 +-------
 platform/linux-generic/odp_traffic_mngr.c     | 4 ----
 4 files changed, 2 insertions(+), 20 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 7ba5c3c5..410c6b79 100644
--- a/platform/linux-generic/include/odp_queue_if.h
+++ b/platform/linux-generic/include/odp_queue_if.h
@@ -71,7 +71,6 @@  typedef void (*queue_set_enq_deq_fn_t)(queue_t q_int,
 				       queue_enq_multi_fn_t enq_multi,
 				       queue_deq_fn_t deq,
 				       queue_deq_multi_fn_t deq_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 {
@@ -90,7 +89,6 @@  typedef struct {
 	queue_get_pktin_fn_t get_pktin;
 	queue_set_pktin_fn_t set_pktin;
 	queue_set_enq_deq_fn_t set_enq_deq_fn;
-	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 ec225d00..d52814b2 100644
--- a/platform/linux-generic/odp_queue.c
+++ b/platform/linux-generic/odp_queue.c
@@ -769,11 +769,6 @@  static void queue_set_enq_deq_func(queue_t q_int,
 		qentry->s.dequeue_multi = deq_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));
@@ -822,6 +817,5 @@  queue_fn_t queue_default_fn = {
 	.set_pktout = queue_set_pktout,
 	.get_pktin = queue_get_pktin,
 	.set_pktin = queue_set_pktin,
-	.set_enq_deq_fn = queue_set_enq_deq_func,
-	.set_type = queue_set_type
+	.set_enq_deq_fn = queue_set_enq_deq_func
 };
diff --git a/platform/linux-generic/odp_queue_scalable.c b/platform/linux-generic/odp_queue_scalable.c
index 14fa1833..52f3915f 100644
--- a/platform/linux-generic/odp_queue_scalable.c
+++ b/platform/linux-generic/odp_queue_scalable.c
@@ -956,11 +956,6 @@  static void queue_set_enq_deq_func(queue_t handle,
 		qentry_from_int(handle)->s.dequeue_multi = deq_multi;
 }
 
-static void queue_set_type(queue_t handle, odp_queue_type_t type)
-{
-	qentry_from_int(handle)->s.type = type;
-}
-
 static queue_t queue_from_ext(odp_queue_t handle)
 {
 	uint32_t queue_id;
@@ -1012,6 +1007,5 @@  queue_fn_t queue_scalable_fn = {
 	.set_pktout = queue_set_pktout,
 	.get_pktin = queue_get_pktin,
 	.set_pktin = queue_set_pktin,
-	.set_enq_deq_fn = queue_set_enq_deq_func,
-	.set_type = queue_set_type
+	.set_enq_deq_fn = queue_set_enq_deq_func
 };
diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/linux-generic/odp_traffic_mngr.c
index 1f254d75..ec2d331f 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_deq_fn(tm_queue_obj->tm_qentry,
 				 queue_tm_reenq, queue_tm_reenq_multi,
 				 NULL, NULL);