[v1,1/4] linux-gen: odp_tm_queue_destroy should not take care about params

Message ID 1533819610-30956-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • [v1,1/4] linux-gen: odp_tm_queue_destroy should not take care about params
Related show

Commit Message

Github ODP bot Aug. 9, 2018, 1 p.m.
From: Maxim Uvarov <maxim.uvarov@linaro.org>


params are set by application, we should not take care about them in
implementation function.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

---
/** Email created from pull request 670 (muvarov:devel/master_tm)
 ** https://github.com/Linaro/odp/pull/670
 ** Patch: https://github.com/Linaro/odp/pull/670.patch
 ** Base sha: 7c87b66edc84e8c713fefc68d46464660adaf71e
 ** Merge commit sha: 37f8e9b0f4297cc96c5271e3e082cf0f39454538
 **/
 platform/linux-generic/odp_traffic_mngr.c | 20 --------------------
 1 file changed, 20 deletions(-)

Patch

diff --git a/platform/linux-generic/odp_traffic_mngr.c b/platform/linux-generic/odp_traffic_mngr.c
index af403b4b6..0d01c0ea5 100644
--- a/platform/linux-generic/odp_traffic_mngr.c
+++ b/platform/linux-generic/odp_traffic_mngr.c
@@ -3967,12 +3967,9 @@  odp_tm_queue_t odp_tm_queue_create(odp_tm_t odp_tm,
 
 int odp_tm_queue_destroy(odp_tm_queue_t tm_queue)
 {
-	tm_wred_params_t *wred_params;
 	tm_shaper_obj_t  *shaper_obj;
 	tm_queue_obj_t   *tm_queue_obj;
-	tm_wred_node_t   *tm_wred_node;
 	tm_system_t      *tm_system;
-	uint32_t          color;
 
 	/* First lookup tm_queue. */
 	tm_queue_obj = GET_TM_QUEUE_OBJ(tm_queue);
@@ -3990,23 +3987,6 @@  int odp_tm_queue_destroy(odp_tm_queue_t tm_queue)
 	    (tm_queue_obj->pkt        != ODP_PACKET_INVALID))
 		return -1;
 
-	/* Check that there is no shaper profile, threshold profile or wred
-	 * profile currently associated with this tm_queue. */
-	if (shaper_obj->shaper_params != NULL)
-		return -1;
-
-	tm_wred_node = tm_queue_obj->tm_wred_node;
-	if (tm_wred_node != NULL) {
-		if (tm_wred_node->threshold_params != NULL)
-			return -1;
-
-		for (color = 0; color < ODP_NUM_PACKET_COLORS; color++) {
-			wred_params = tm_wred_node->wred_params[color];
-			if (wred_params != NULL)
-				return -1;
-		}
-	}
-
 	/* Now that all of the checks are done, time to so some freeing. */
 	odp_ticketlock_lock(&tm_system->tm_system_lock);
 	tm_system->queue_num_tbl[tm_queue_obj->queue_num - 1] = NULL;