Index: /branches/rel_apv_10_4_0_112_gail/usr/click/lib/libparser/commands.pm
===================================================================
--- /branches/rel_apv_10_4_0_112_gail/usr/click/lib/libparser/commands.pm	(revision 38102)
+++ /branches/rel_apv_10_4_0_112_gail/usr/click/lib/libparser/commands.pm	(working copy)
@@ -53455,6 +53455,16 @@
                 function_name => "get_tuple_count",
                 function_args => [],
         },
+        {
+                obj_type => "ITEM",
+                name => "sessionqdelstepcount",
+                menu => "root_show_qos",
+                help_string => "show session queue delete step count",
+                cmd_attribute => "CMD_ARRAYOS|CMD_NORMAL|CMD_GLOBAL|CMD_KERN_API",
+		user_level => "CLI_LEVEL_ENGINEER",
+                function_name => "get_q_del_step_size",
+                function_args => [],
+        },
 
         {
                 obj_type => "ITEM",
@@ -53509,6 +53519,22 @@
 					optional => "NO",
 			},
 		],
+        },
+        {
+                obj_type => "ITEM",
+                name => "sessionqdelstepcount",
+                menu => "root_qos",
+                help_string => "set queue delete step count",
+                cmd_attribute => "CMD_ARRAYOS|CMD_NORMAL|CMD_GLOBAL|CMD_KERN_API",
+		user_level => "CLI_LEVEL_ENGINEER",
+                function_name => "set_q_del_step_size",
+		function_args => [
+			{
+					type => "U32",
+					help_string => "set count [1 to 1024]",
+					optional => "NO",
+			},
+		],
         },
 
 	{
Index: /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/altq_cbq.h
===================================================================
--- /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/altq_cbq.h	(revision 38102)
+++ /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/altq_cbq.h	(working copy)
@@ -94,7 +94,7 @@
 #define MAX_DYN_QUEUE 50000
 #endif
 
-#define	CBQ_MAX_CLASSES	(MAX_DYN_QUEUE + 100)
+#define	CBQ_MAX_CLASSES	(MAX_DYN_QUEUE + 1024)
 
 /*
  * Define State structures.
Index: /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_classifier.h
===================================================================
--- /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_classifier.h	(revision 38102)
+++ /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_classifier.h	(working copy)
@@ -39,7 +39,7 @@
 #define MAX_DYN_QUEUE 50000
 #endif
 
-#define QOS_MAX_FLTR_NUM (MAX_DYN_QUEUE + 100)
+#define QOS_MAX_FLTR_NUM (MAX_DYN_QUEUE + 1024)
 
 
 /*
Index: /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_classifier.c
===================================================================
--- /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_classifier.c	(revision 38102)
+++ /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_classifier.c	(working copy)
@@ -61,8 +61,6 @@
 #define MAX_DYN_QUEUE 50000
 #endif
 
-#define Q_DEL_STEP_SIZE 50
-
 uint16_t ports_record[65536];
 
 static void delete_dyn_queues (void);
@@ -140,7 +138,7 @@
 extern uint32_t **clickrule_notfound;
 extern int qos_session_status;
 extern uint32_t repeat_segment_num;
-
+extern uint32_t q_del_step_size;
 /******************************************************************************
  * Return the current valid class poniter.
  *
@@ -215,9 +213,10 @@
     uint32_t smask = -1;
     uint32_t dmask = -1;
     int count = 0;
+    int q_create_fail, f_create_fail;
     
     if (current_dyn_q_count >= MAX_DYN_QUEUE) {
-	fastlog_syslog(LOG_DEBUG, "QoS sessions reached maximum limit : %u. Recycling old sessions\n", MAX_DYN_QUEUE);
+	fastlog_syslog(LOG_ERR, "QoS sessions reached maximum limit : %u. Recycling old sessions\n", MAX_DYN_QUEUE);
         qos_session_cleanup = 1;
         qos_filter_clear_all_dyn (NULL);
         return;
@@ -235,7 +234,12 @@
     strncpy(pQoSQRoot->sQName, q_name, 32);
     strncpy(pALTConf->qname, q_name, 32);
 
-    qos_queue_root_kern (NULL, pQoSQRoot, sizeof(qos_queue_root_t), pALTConf, sizeof(struct altq_conf));
+    q_create_fail = qos_queue_root_kern (NULL, pQoSQRoot, sizeof(qos_queue_root_t), pALTConf, sizeof(struct altq_conf));
+
+    if (q_create_fail) {
+	fastlog_syslog(LOG_ERR, "Q create fail : %s\n", q_name);
+        return;
+    }
 
     if (!sip) {
         smask = 0;
@@ -244,8 +248,13 @@
         dmask = 0;
     }
         
-    qos_filter_kern(NULL, f_name, q_name, sip, smask, sport, dip, dmask, dport, "any", 1);
+    f_create_fail = qos_filter_kern(NULL, f_name, q_name, sip, smask, sport, dip, dmask, dport, "any", 1);
+    if (f_create_fail) {
+        no_qos_queue_root_sess_kern (q_name);
+        return;
+    }
 
+    bzero(q_dynamic_list[enq_idx], 32);
     sprintf (q_dynamic_list[enq_idx], "%s", q_name);
     ++enq_idx;
     ++current_dyn_q_count;
@@ -258,21 +267,23 @@
 
 static void delete_dyn_queues () {
     int count;
+    unsigned int actual_q_count;
 
-    count = (current_dyn_q_count >= Q_DEL_STEP_SIZE) ? Q_DEL_STEP_SIZE : current_dyn_q_count;
+    count = (current_dyn_q_count >= q_del_step_size) ? q_del_step_size : current_dyn_q_count;
 
     while(count) {
         if (deq_idx == MAX_DYN_QUEUE) {
             deq_idx = 0;
         }
         no_qos_queue_root_sess_kern (q_dynamic_list[deq_idx]);
-        bzero(q_dynamic_list[deq_idx], 32);
         ++deq_idx;
         --current_dyn_q_count;
         --count;
     }
 
     if (current_dyn_q_count <= 0) {
+        actual_q_count = qos_queue_count();
+      	fastlog_syslog(LOG_ERR, "actual queue count now : %u\n", actual_q_count);
         qos_session_cleanup = 0;
     }
 }
@@ -418,7 +429,6 @@
             qos_filter_share.fltr_g_stats.hits_interface_fail++;
             return;
 	}
-
 #if 0
 	if(QOSD_INPUT == direction) {
 		table = &(ifn_p->if_i_table);
@@ -1037,6 +1047,7 @@
 
 	if('\0' == qos_filter->qqi_name[0]) {
 		app_printf(pcb, "ERROR: queue name is NULL\n");
+		fastlog_syslog (LOG_ERR, "ERROR: queue name is NULL\n");
 		return QOS_FAILURE;
 	}
 
@@ -1046,16 +1057,19 @@
 	ret = qos_queue_get(&qos_filter->qosq_info);
 	if(QOS_FAILURE == ret) {
 		app_printf(pcb, "ERROR: Can not get the information of queue \"%s\".\n", qos_filter->qqi_name);
+		fastlog_syslog(LOG_ERR, "ERROR: Can not get the information of queue \"%s\".\n", qos_filter->qqi_name);
 		return QOS_FAILURE;
 	}
 
 	if(qos_filter->priority <= QOS_FLTR_PRI_MIN || qos_filter->priority >= QOS_FLTR_PRI_MAX) {
 		app_printf(pcb, "ERROR: priority out of range (%d ~ %d)\n", QOS_FLTR_PRI_MIN+1, QOS_FLTR_PRI_MAX-1);
+		fastlog_syslog (LOG_ERR, "ERROR: priority out of range (%d ~ %d)\n", QOS_FLTR_PRI_MIN+1, QOS_FLTR_PRI_MAX-1);
 		goto ADD_FLTR_ERROR;
 	}
 
 	if(qos_filter->qqi_nic >= QOS_MAX_INTERFACE) {
 		app_printf(pcb, "ERROR: interace id is wrong\n");
+		fastlog_syslog (LOG_ERR, "ERROR: interace id is wrong\n");
 		goto ADD_FLTR_ERROR;
 	}
 
@@ -1073,6 +1087,7 @@
 
 		if(!strcmp(qos_filter->fltr_name, pfltr->fltr_name)) {
 			app_printf(pcb, "ERROR: the QoS L4 filter name has aready existed\n");
+			fastlog_syslog (LOG_ERR,  "ERROR: the QoS L4 filter name - %s has aready existed\n", pfltr->fltr_name);
 			goto ADD_FLTR_ERROR;
 		}
 
@@ -1080,6 +1095,7 @@
 					sizeof(struct qos_queue_info)) &&
 				!bcmp(&qos_filter->tp, &pfltr->tp, sizeof(clickrule_5tuple_t))){
 			app_printf(pcb, "ERROR: found a duplicate QoS L4 filter name: \"%s\"\n", pfltr->fltr_name);
+			fastlog_syslog (LOG_ERR, "ERROR: found a duplicate QoS L4 filter name: \"%s\"\n", pfltr->fltr_name);
 			goto ADD_FLTR_ERROR;
 		}
 	}
@@ -1095,7 +1111,8 @@
 		}
 	}
 	if (i == QOS_MAX_FLTR_NUM) {
-		app_printf(pcb, "ERROR: maximum number of QoS L4 filters reached (maximum 1024)\n");
+		app_printf(pcb, "ERROR: maximum number of QoS L4 filters reached. maximum %u\n", QOS_MAX_FLTR_NUM);
+		fastlog_syslog (LOG_ERR, "ERROR: maximum number of QoS L4 filters reached maximum %u\n", QOS_MAX_FLTR_NUM);
 		goto ADD_FLTR_ERROR;
 	}
 
@@ -1378,11 +1395,13 @@
 
 	if(strlen(fltr_name) == 0) {
 		app_printf(pcb, "ERROR: The input name is illegal, it can not be an empty string\n");
+		fastlog_syslog(LOG_ERR, "ERROR: The input name is illegal, it can not be an empty string : %s\n", fltr_name);
 		return QOS_FAILURE;
 	}
 
 	if(strlen(fltr_name) >= QOS_FLTR_NLEN) {
 		app_printf(pcb, "ERROR: The input name is too long, maximum is %d\n", QOS_FLTR_NLEN-1);
+		fastlog_syslog(LOG_ERR, "ERROR: The input name - %s is too long, maximum is %d\n", fltr_name, QOS_FLTR_NLEN-1);
 		return QOS_FAILURE;
 	}
 
@@ -1391,6 +1410,7 @@
 			(fltr_name[2] == 'l' || fltr_name[2] == 'L') &&
 			strlen(fltr_name) == 3) {
 		app_printf(pcb, "ERROR: \"%s\" is reserved for system\n", fltr_name);
+		fastlog_syslog (LOG_ERR, "ERROR: \"%s\" is reserved for system\n", fltr_name);
 		return QOS_FAILURE;
 	}
 
@@ -1399,17 +1419,21 @@
 
 	if (!clickrule_mask(smask) ) {
 		app_printf(pcb, "ERROR: invalid source mask\n");
+		fastlog_syslog(LOG_ERR, "ERROR: invalid source mask\n");
 		return QOS_FAILURE;
 	} else if(!clickrule_mask(dmask)) {
 		app_printf(pcb, "ERROR: invalid destination mask\n");
+		fastlog_syslog(LOG_ERR, "ERROR: invalid destination mask\n");
 		return QOS_FAILURE;
 	}
 
 	if ((sip & smask) != sip) {
 		app_printf(pcb, "ERROR: invalid source ip and mask pair\n");
+		fastlog_syslog(LOG_ERR, "ERROR: invalid source ip and mask pair\n");
 		return QOS_FAILURE;
 	} else if ((dip & dmask) != dip) {
 		app_printf(pcb, "ERROR: invalid destination ip and mask pair\n");
+		fastlog_syslog(LOG_ERR, "ERROR: invalid destination ip and mask pair\n");
 		return QOS_FAILURE;
 	}
 
@@ -1422,6 +1446,7 @@
 	} else {
 		app_printf(pcb, "ERROR: invalid protocol string, please use %s, %s or %s\n",
 				PROTO_TCP_STR, PROTO_UDP_STR, PROTO_ANY_STR);
+		fastlog_syslog(LOG_ERR, "ERROR: invalid protocol string, please use %s, %s or %s\n", PROTO_TCP_STR, PROTO_UDP_STR, PROTO_ANY_STR);
 		return QOS_FAILURE;
 	}
 
@@ -1443,6 +1468,7 @@
 
 	if(QOS_FAILURE == qos_filter_add(pcb, &fltr)) {
 		app_printf(pcb, "Failed to add the filter.\n");
+		fastlog_syslog(LOG_ERR, "Failed to add the filter : %s\n", fltr_name);
 		return QOS_FAILURE;
 	}
 
Index: /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_dynamic.h
===================================================================
--- /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_dynamic.h	(revision 38102)
+++ /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_dynamic.h	(working copy)
@@ -26,6 +26,7 @@
 extern struct dyn_session_qos_conf_head dyn_session_qos_conf_head;
 extern int qos_session_status;
 extern uint32_t repeat_segment_num;
+extern uint32_t q_del_step_size;
 
 
 typedef struct dyn_qos_session_lookup {
@@ -57,3 +58,5 @@
 int disable_session (void *pcb);
 int set_tuple_count (void *pcb, uint32_t count);
 int get_tuple_count (void *pcb);
+int set_q_del_step_size (void *pcb, uint32_t count);
+int get_q_del_step_size (void *pcb);
Index: /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_dynamic.c
===================================================================
--- /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_dynamic.c	(revision 38102)
+++ /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_dynamic.c	(working copy)
@@ -31,6 +31,7 @@
 int qos_session_status = SESSION_DISABLE;
 
 uint32_t repeat_segment_num = 50;
+uint32_t q_del_step_size = 50;
 
 struct dyn_session_qos_conf_head dyn_session_qos_conf_head = STAILQ_HEAD_INITIALIZER(dyn_session_qos_conf_head);
 
@@ -427,3 +428,16 @@
     app_printf(pcb, "count : %u\n", repeat_segment_num);
     return QOS_SUCCESS;
 }
+
+int set_q_del_step_size (void *pcb, uint32_t count) {
+    if (count <= 0 || count > 1024) {
+        app_printf(pcb, "ERROR : count should be between 1 to 1024.\n");
+        return (QOS_USERLAND_FAILURE);
+    }
+    q_del_step_size = count;
+    return QOS_SUCCESS;
+}
+int get_q_del_step_size (void *pcb) {
+    app_printf(pcb, "count : %u\n", q_del_step_size);
+    return QOS_SUCCESS;
+}
Index: /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_scheduler.c
===================================================================
--- /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_scheduler.c	(revision 38102)
+++ /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_scheduler.c	(working copy)
@@ -81,7 +81,7 @@
 struct qos_queue_sub_head qos_queue_sub_head = STAILQ_HEAD_INITIALIZER(qos_queue_sub_head);
 
 /* Calculate queue number */
-static int qos_queue_count(void);
+int qos_queue_count(void);
 
 /*************************************************************************
  * QoS scheduler initialize routine.
@@ -651,7 +651,7 @@
 }
 
 /* Calculate queue number */
-static int qos_queue_count(void)
+int qos_queue_count(void)
 {
 	qos_queue_sub_t *pQoSQSub = NULL;
 	qos_queue_root_t *pQoSQRoot = NULL;
@@ -688,14 +688,18 @@
 	if ((pRoot == NULL) || (sizeof(qos_queue_root_t) != nRoot) ||
 			(pALTQ == NULL) || (sizeof(struct altq_conf) != nALTQ)) {
 		app_printf(pcb, "ERROR: kernel input parameters invalid\n");
+		fastlog_syslog(LOG_ERR, "ERROR: kernel input parameters invalid\n");
 		return(QOS_USERLAND_FAILURE);
 	}
 
 	/* Set the global maximun number */
-        if (qos_queue_count() >= QOS_MAXQ) {
+        if (!qos_session_status) {
+            if (qos_queue_count() >= QOS_MAXQ) {
 	        app_printf(pcb, "ERROR: too many queues configured (maximum %d)\n", QOS_MAXQ);
+		fastlog_syslog(LOG_ERR, "ERROR: too many queues configured (maximum %d)\n", QOS_MAXQ);
 	        return(QOS_USERLAND_FAILURE);
-	}
+	    }
+        }
 
 	pQoSQRoot = (qos_queue_root_t *)pRoot;
 	pALTQConf = (struct altq_conf *)pALTQ;
@@ -715,12 +719,15 @@
 	ifp = ifunit(pALTQConf->ifname);
 	if (ifp == NULL) {
 		app_printf(pcb, "ERROR: can not find the QoS interface\n");
+		fastlog_syslog(LOG_ERR, "ERROR: can not find the QoS interface\n");
 		return(QOS_USERLAND_FAILURE);
 	}
 
 	if (pALTQConf->direction == QOSD_OUTPUT) {
 		if (!ALTQ_IS_ATTACHED(&ifp->if_snd)) {
 			app_printf(pcb, "ERROR: output QoS has not been configured on the interface\n");
+			fastlog_syslog(LOG_ERR, "ERROR: output QoS has not been configured on the interface\n");
+                        
 			return(QOS_USERLAND_FAILURE);
 		} else {
 			pALTQConf->altq_disc = ifp->if_snd.altq_disc;
@@ -730,6 +737,7 @@
 	if (pALTQConf->direction == QOSD_INPUT) {
 		if (!ALTQ_IS_ATTACHED(&ifp->if_rcv)) {
 			app_printf(pcb, "ERROR: input QoS has not been configured on the interface\n");
+			fastlog_syslog(LOG_ERR, "ERROR: input QoS has not been configured on the interface\n");
 			return(QOS_USERLAND_FAILURE);
 		} else {
 			pALTQConf->altq_disc = ifp->if_rcv.altq_disc;
@@ -740,6 +748,7 @@
 	STAILQ_FOREACH(pQoSQRootSave, &qos_queue_root_head, list_entry) {
 		if (strcmp(pQoSQRootSave->sQName, pQoSQRoot->sQName) == 0) {
 			app_printf(pcb, "ERROR: root queue %s has been configured\n",pQoSQRoot->sQName);
+			fastlog_syslog(LOG_ERR, "ERROR: root queue %s has been configured\n",pQoSQRoot->sQName);
 			return(QOS_USERLAND_FAILURE);
 		}
 	}
@@ -747,6 +756,7 @@
 	STAILQ_FOREACH(pQoSQSub, &qos_queue_sub_head, list_entry) {
 		if (strcmp(pQoSQSub->sQName, pQoSQRoot->sQName) == 0) {
 			app_printf(pcb, "ERROR: sub queue %s has been configured\n",pQoSQRoot->sQName);
+			fastlog_syslog(LOG_ERR, "ERROR: sub queue %s has been configured\n",pQoSQRoot->sQName);
 			return(QOS_USERLAND_FAILURE);
 		}
 	}
@@ -760,6 +770,7 @@
 	}
 	if (pQoSIfConf == NULL) {
 		app_printf(pcb, "ERROR: %s QoS has not configured on the interface\n", pQoSQRoot->sDir);
+		fastlog_syslog(LOG_ERR, "ERROR: %s QoS has not configured on the interface\n", pQoSQRoot->sDir);
 		return(QOS_USERLAND_FAILURE);
 	} else {
 		pALTQConf->parent_qid = pQoSIfConf->iQID;
@@ -787,6 +798,7 @@
 	pQoSQRootSave = malloc(sizeof(qos_queue_root_t), M_QOS, M_NOWAIT | M_ZERO);
 	if (pQoSQRootSave == NULL) {
 		app_printf(pcb, "ERROR: allocate memory failed\n");
+		fastlog_syslog(LOG_ERR, "ERROR: allocate memory failed\n");
 		--qos_index;
 		return(QOS_USERLAND_FAILURE);
 	}
@@ -799,8 +811,8 @@
 	iErrCode = altq_add_queue(pALTQConf);
 	if (iErrCode != 0) {
 		if (EMFILE == iErrCode) {
-			app_printf(pcb, "ERROR: too many queues configured on the direction of interface (maximum %d)\n",
-				CBQ_MAX_CLASSES - 1);
+			app_printf(pcb, "ERROR: too many queues configured on the direction of interface (maximum %d)\n", CBQ_MAX_CLASSES - 1);
+			fastlog_syslog(LOG_ERR, "ERROR: too many queues configured on the direction of interface (maximum %d)\n", CBQ_MAX_CLASSES - 1);
 			iErrCode = QOS_USERLAND_FAILURE;
 		}
 		goto ERROR0;
@@ -851,21 +863,21 @@
 	}
 
 	if (pQoSQRoot == NULL) {
-		fastlog_syslog(LOG_DEBUG, "ERROR: can not find the root queue\n");
+		fastlog_syslog(LOG_ERR, "ERROR: can not find the root queue : %s\n", sQueue);
 		return(QOS_USERLAND_FAILURE);
 	}
 
 	/* Get discipline */
 	confALTQ.altq_disc = altq_lookup(confALTQ.ifname, confALTQ.direction, ALTQT_CBQ);
 	if (confALTQ.altq_disc == NULL) {
-		fastlog_syslog(LOG_DEBUG, "ERROR: can not find the QoS interface\n");
+		fastlog_syslog(LOG_ERR, "ERROR: can not find the QoS interface\n");
 		return(QOS_USERLAND_FAILURE);
 	}
 
 	/* Prepare clearing dynamic filters */
 	infoQoSQueue.ifp = ifunit(confALTQ.ifname);
 	if (infoQoSQueue.ifp == NULL) {
-		fastlog_syslog(LOG_DEBUG, "ERROR: can not find the QoS interface\n");
+		fastlog_syslog(LOG_ERR, "ERROR: can not find the QoS interface\n");
 		return(QOS_USERLAND_FAILURE);
 	}
 	infoQoSQueue.direction = confALTQ.direction;
Index: /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_subr.c
===================================================================
--- /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_subr.c	(revision 38102)
+++ /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_subr.c	(working copy)
@@ -375,6 +375,7 @@
 {
 
 	delete_qos_session_config (pcb, QOS_NAME_FOR_ALL);
+        current_dyn_q_count = 0;
 	disable_session (pcb);
 	/* bug 14949, qiuzj, http qos */
 	clear_qos_http_url(pcb);
@@ -917,10 +918,12 @@
     char qos_session_conf_cmd[] = "qos session xxxxxx xxx.xxx.xxx.xxx xxxxx xxx.xxx.xxx.xxx xxxxx xxxxxxx xxx";
     char qos_session_status_cmd[] = "qos sessionxxx";
     char qos_session_tuple_count_cmd[] = "qos sessionpacketcount xxxx";
+    char qos_session_q_del_step_count_cmd[] = "qos sessionqdelstepcount xxxx";
 
     len = (sizeof (qos_session_conf_cmd) + QOS_SNAME_MAX + 1) * MAX_QOS_SESSION_CONFIG;
     len += sizeof (qos_session_status_cmd) + 1;
     len += sizeof (qos_session_tuple_count_cmd) + 1;
+    len += sizeof (qos_session_q_del_step_count_cmd) + 1;
 
     MALLOC(buffer, char *, len, M_TEMP, M_NOWAIT);
 
@@ -938,6 +941,7 @@
         cur += sprintf (cur, "qos sessionoff\n");
 
     cur += sprintf (cur, "qos sessionpacketcount %u\n", repeat_segment_num);
+    cur += sprintf (cur, "qos sessionqdelstepcount %u\n", q_del_step_size);
 
     STAILQ_FOREACH(dyn_qos_conf_run, &dyn_session_qos_conf_head, list_entry) {
         cur += sprintf (cur, "qos session \"%s\" %s %u.%u.%u.%u %u %u.%u.%u.%u %u %s %s\n",
Index: /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_var.h
===================================================================
--- /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_var.h	(revision 38102)
+++ /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_var.h	(working copy)
@@ -49,7 +49,7 @@
 #define MAX_DYN_QUEUE 50000
 #endif
 
-#define QOS_MAXQ (MAX_DYN_QUEUE + 100)
+#define QOS_MAXQ (MAX_DYN_QUEUE + 1024)
 
 /* QoS interface maximum number */
 #define MAX_VLAN 4094
