Index: /branches/rel_apv_10_4_0_112_gail/usr/click/lib/libkernelapi/addCommands.pm
===================================================================
--- /branches/rel_apv_10_4_0_112_gail/usr/click/lib/libkernelapi/addCommands.pm	(revision 37998)
+++ /branches/rel_apv_10_4_0_112_gail/usr/click/lib/libkernelapi/addCommands.pm	(working copy)
@@ -3706,6 +3706,20 @@
             {type => "STRING"},
             ],
     },
+    {
+        cmd_attribute => "CMD_KERN_API",
+        function_name => "qos_session_config_kern",
+        function_args => [
+            {type => "STRING"},
+            {type => "INDATA"},
+            {type => "INDATA"},
+            {type => "U32"},
+            {type => "U16"},
+            {type => "U32"},
+            {type => "U16"},
+        ],
+    },
+
     # Bug 14949(QoS), end
 #WRITE cache_filter_kern add by zhangjz
     {
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 37998)
+++ /branches/rel_apv_10_4_0_112_gail/usr/click/lib/libparser/commands.pm	(working copy)
@@ -53445,6 +53445,93 @@
                                                 ],
         },
 
+        {
+                obj_type => "ITEM",
+                name => "dynamic",
+                menu => "root_qos",
+                cmd_attribute => "CMD_ARRAYOS|CMD_SPROXY|CMD_NORMAL|CMD_GLOBAL",
+                user_level => "CLI_LEVEL_CONFIG",
+                help_string => "Configure QoS dynamic session",
+                function_name => "qos_session_config",
+                function_args => [
+                                                        {
+                                                                type => "STRING",
+                                                                help_string => "name",
+                                                                optional => "NO",
+                                                        },
+                                                        {
+                                                                type => "STRING",
+                                                                help_string => "Interface name (<system_ifname>|<vlan_ifname>|<bond_ifname>)",
+                                                                optional => "NO",
+                                                        },
+                                                        {
+                                                                type => "DOTTEDIP",
+                                                                help_string => "Source IP address (0.0.0.0 to match any)",
+                                                                optional => "NO",
+                                                        },
+                                                        {
+                                                                type => "U16",
+                                                                help_string => "Source port (0~65535) (0 to match any)",
+                                                                optional => "NO",
+                                                        },
+                                                        {
+                                                                type => "DOTTEDIP",
+                                                                help_string => "Destination IP address (0.0.0.0 to match any)",
+                                                                optional => "NO",
+                                                        },
+                                                        {
+                                                                type => "U16",
+                                                                help_string => "Destination port (0~65535) (0 to match any)",
+                                                                optional => "NO",
+                                                        },
+                                                        {
+                                                                type => "STRING",
+                                                                help_string => "Bandwidth per Session, suffixes may be b, Kb, Mb, and Gb",
+                                                                optional => "NO",
+                                                        },
+                                                        {
+                                                                type => "STRING",
+                                                                help_string => "Output/input direction (OUT/IN)",
+                                                                optional => "NO",
+                                                        },
+                                                ],
+        },
+
+        {
+                obj_type => "ITEM",
+                name => "dynamic",
+                menu => "root_show_qos",
+                cmd_attribute => "CMD_ARRAYOS|CMD_SPROXY|CMD_NORMAL|CMD_GLOBAL|CMD_KERN_API",
+                user_level => "CLI_LEVEL_ENABLE",
+                help_string => "Show configurations of QoS dynamic session",
+                function_name => "show_qos_session_config",
+                function_args => [
+                                                        {
+                                                                type => "STRING",
+                                                                help_string => "Session dynamic QoS, (optional, default is ALL)",
+                                                                optional => "YES",
+                                                                default_value => "\"ALL\"",
+                                                        },
+                                                ],
+        },
+        {
+                obj_type => "ITEM",
+                name => "dynamic",
+                menu => "root_no_qos",
+                cmd_attribute => "CMD_ARRAYOS|CMD_NORMAL|CMD_GLOBAL|CMD_KERN_API",
+                user_level => "CLI_LEVEL_CONFIG",
+                help_string => "Delete configuration of dynamic QoS session",
+                function_name => "delete_qos_session_config",
+                function_args => [
+                                                        {
+                                                                type => "STRING",
+                                                                help_string => "name",
+                                                                optional => "YES",
+                                                                default_value => "\"ALL\"",
+                                                        },
+                                                ],
+        },
+
 	{
 		obj_type => "ITEM",
 		name => "sub",
Index: /branches/rel_apv_10_4_0_112_gail/usr/click/lib/libqos_cli/qos_cli.c
===================================================================
--- /branches/rel_apv_10_4_0_112_gail/usr/click/lib/libqos_cli/qos_cli.c	(revision 37998)
+++ /branches/rel_apv_10_4_0_112_gail/usr/click/lib/libqos_cli/qos_cli.c	(working copy)
@@ -1306,3 +1306,95 @@
  * ------------------------ QoS Classifier functions ---------------------------
  */
 
+int qos_session_config (char *name, char *sIfName, uint32_t sip, uint16_t sport, uint32_t dip, uint16_t dport, char *sBand, char *sDir) {
+	qos_queue_root_t qQoSRoot;
+	struct altq_conf confALTQ;
+	int nIfMtu = 0;
+	int iErrCode = 0;
+	char *sDefault = NULL;
+	char *sBorrow = NULL;
+
+	QOS_CHECK_LICENSE;
+
+	bzero(&qQoSRoot, sizeof(qQoSRoot));
+	bzero(&confALTQ, sizeof(confALTQ));
+
+	bzero(qQoSRoot.sQName, QOS_QNAME_SIZE);
+
+	strncpy(qQoSRoot.sIfName, sIfName, QOS_CANAME_MAXLEN - 1);
+	if (sDir) {
+		strncpy(qQoSRoot.sDir, sDir, QOSD_STR_MAXLEN - 1);
+	} else {
+		strncpy(qQoSRoot.sDir, QOSD_IO_DEFAULT, QOSD_STR_MAXLEN - 1);
+	}
+	if (sBand) {
+		strncpy(qQoSRoot.sBand, sBand, QOS_BANDWIDTH_MAXLEN - 1);
+	} else {
+		strncpy(qQoSRoot.sBand, QOSD_BANDWIDTH_DEFAULT, QOS_BANDWIDTH_MAXLEN - 1);
+	}
+	qQoSRoot.iPri = 1;
+	if (sDefault) {
+		strncpy(qQoSRoot.sDefault, sDefault, QOS_DEFAULT_MAXLEN - 1);
+	} else {
+		strncpy(qQoSRoot.sDefault, QOS_DEFAULT_QUEUE_DEFAULT, QOS_DEFAULT_MAXLEN - 1);
+	}
+	if (sBorrow) {
+		strncpy(qQoSRoot.sBorrow, sBorrow, QOS_BORROW_MAXLEN - 1);
+	} else {
+		strncpy(qQoSRoot.sBorrow, QOS_BORROW_DEFAULT, QOS_BORROW_MAXLEN - 1);
+	}
+
+	strncpy(confALTQ.qname, qQoSRoot.sQName, QOS_QNAME_SIZE - 1);
+	strncpy(confALTQ.parent, "ROOT", QOS_QNAME_SIZE - 1);
+
+	if (getrealif(qQoSRoot.sIfName, confALTQ.ifname) != 0) {
+		printf("ERROR: can't find the QoS interface %s\n", qQoSRoot.sIfName);
+		return(-1);
+	}
+
+	if (qos_direction_str2num(qQoSRoot.sDir, &confALTQ.direction) == -1) {
+		return(-1);
+	}
+
+	if (qos_bandwidth_str2num(qQoSRoot.sBand, &confALTQ.bandwidth) == -1) {
+		return(-1);
+	}
+
+	if (qQoSRoot.iPri >= QOS_MAXPRIO || qQoSRoot.iPri < 0) {
+		printf("ERROR: priority out of range (0 ~ 7)\n");
+		return(-1);
+	} else {
+		confALTQ.priority = qQoSRoot.iPri;
+	}
+
+	if (qos_default_set(qQoSRoot.sDefault, &confALTQ) == -1) {
+		return(-1);
+	}
+
+	if (qos_borrow_set(qQoSRoot.sBorrow, &confALTQ) == -1) {
+		return(-1);
+	}
+
+	/* Fill altq_conf */
+	if (qos_get_ifmtu(confALTQ.ifname, &nIfMtu) == -1) {
+		return(-1);
+	}
+	confALTQ.scheduler = ALTQT_CBQ;
+
+	confALTQ.ifbandwidth = qos_get_ifbandwidth_kern(&confALTQ, sizeof(confALTQ));
+	if (confALTQ.ifbandwidth == 0) {
+		return(-1);
+	}
+
+	qos_evaluate(nIfMtu, &confALTQ);
+
+	/* Kernel config */
+	if ((iErrCode = qos_session_config_kern (name, &qQoSRoot, sizeof(qQoSRoot), &confALTQ, sizeof(confALTQ), sip, sport, dip, dport)) != QOS_SUCCESS)     {
+		if (iErrCode != QOS_USERLAND_FAILURE) {
+			printf("ERROR: %s\n", strerror(iErrCode));
+		}
+		return(-1);
+	}
+
+	return(0);
+}
Index: /branches/rel_apv_10_4_0_112_gail/usr/click/lib/libuinet-atcp/lib/libuinet/Makefile
===================================================================
--- /branches/rel_apv_10_4_0_112_gail/usr/click/lib/libuinet-atcp/lib/libuinet/Makefile	(revision 37998)
+++ /branches/rel_apv_10_4_0_112_gail/usr/click/lib/libuinet-atcp/lib/libuinet/Makefile	(working copy)
@@ -655,6 +655,7 @@
 	qos_http.c	\
 	qos_scheduler.c	\
 	qos_session.c	\
+	qos_dynamic.c	\
 	qos_subr.c
 	
 CLICK_APP_RADIUS_SRCS+=	\
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 37998)
+++ /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/altq_cbq.h	(working copy)
@@ -90,7 +90,7 @@
 
 #ifdef _KERNEL
 
-#define	CBQ_MAX_CLASSES	256
+#define	CBQ_MAX_CLASSES	100000
 
 /*
  * 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 37998)
+++ /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_classifier.h	(working copy)
@@ -33,7 +33,10 @@
 /*
  * maximum filter number
  */
-#define QOS_MAX_FLTR_NUM 1024
+//#define QOS_MAX_FLTR_NUM 1024
+//
+#define QOS_MAX_FLTR_NUM 100000
+
 
 /*
  * static filter and dynamic filter
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 37998)
+++ /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_classifier.c	(working copy)
@@ -55,8 +55,11 @@
 #include <click/app/qos/qos_session.h>
 
 #include <click/app/fastlog/fastlog.h>
+#include <click/app/qos/qos_dynamic.h>
 
+#define MAX_DYN_QUEUE 100000
 
+static void delete_queue_filter (unsigned int count);
 static int qos_filter_add_table(qos_filter_share_t *qs, qos_filter_t *pfltr);
 static int qos_filter_del_table(qos_filter_share_t *qs, qos_filter_t *pfltr);
 static int qos_filter_rebuild(struct ifnet *ifp, int dir);
@@ -65,6 +68,11 @@
 static int qos_filter_iftable_init(qos_filter_ifnode_t *ifn_p);
 static void qos_get_class(clickrule_gnode_t *gnode_p, struct qos_pktattr *pktattr, int flag);
 
+unsigned int current_dyn_q_count = 0;
+unsigned int enq_idx = 0;
+unsigned int deq_idx = 0;
+char q_dynamic_list[MAX_DYN_QUEUE][32];
+
 
 #define QOS_CLASSFIER_DEBUG_FOR_STATIC_POLICY 0
 
@@ -116,6 +124,8 @@
 static uint8_t  dyni_order[] = {0,5,6,7,8,1,2,3,4,11,12,9,10};
 static uint8_t  dyno_order[] = {0,5,6,7,8,1,2,3,4,9,10,11,12};
 
+static uint8_t  i_net_order[] = {1,12,13,14,15,4,5,6,7,8,9,10,11};
+static uint8_t  o_net_order[] = {1,14,15,12,13,4,5,6,7,8,9,10,11};
 /*
  * Storing up all qos filter information.
  */
@@ -188,6 +198,69 @@
 }
 
 
+void create_queue_filter(uint32_t sip, uint16_t sport, uint32_t dip, uint16_t dport,char *sDir, qos_queue_root_t *pQoSQRoot, struct altq_conf *pALTConf)
+{
+    char q_name[32] = "";
+    char f_name[32] = "";
+    char ip_str[20];
+    uint32_t smask = -1;
+    uint32_t dmask = -1;
+    
+
+    if (sip) {
+        sprintf (ip_str, "%u", sip);
+    } else {
+        sprintf (ip_str, "%u", dip);
+    }
+
+    sprintf (q_name, "qd_%s_%u_%u_%s", ip_str, sport, dport, sDir);
+
+    strcpy(f_name, q_name);
+    f_name[0] = 'f';
+    
+    
+    strcpy(pQoSQRoot->sQName, q_name);
+    strcpy(pALTConf->qname, q_name);
+
+    qos_queue_root_kern (NULL, pQoSQRoot, sizeof(qos_queue_root_t), pALTConf, sizeof(struct altq_conf));
+
+    if (!sip) {
+        smask = 0;
+    }
+    if (!dip) {
+        dmask = 0;
+    }
+        
+    qos_filter_kern(NULL, f_name, q_name, sip, smask, sport, dip, dmask, dport, "any", 1);
+
+    if (enq_idx == MAX_DYN_QUEUE)
+        enq_idx = 0;
+    sprintf (q_dynamic_list[enq_idx++], "%s", q_name);
+    ++current_dyn_q_count;
+
+/*
+If current Queue utilization is 100% then delete 30% of the queue(and corresponding filter)
+*/
+    if (current_dyn_q_count >= MAX_DYN_QUEUE) {
+        delete_queue_filter(0.3 * MAX_DYN_QUEUE);
+    }
+}
+
+void delete_queue_filter (unsigned int count) {
+    char q_name[32];
+    char f_name[32];
+
+    while(count--) {
+        if (deq_idx == MAX_DYN_QUEUE) 
+            deq_idx = 0;
+        strcpy (q_name, q_dynamic_list[deq_idx++]);
+        strcpy (f_name, q_name);
+        f_name[0] = 'f';
+        no_qos_filter_kern (NULL, f_name);
+        no_qos_queue_root_kern (NULL, q_name);
+        --current_dyn_q_count;
+    }
+}
 /******************************************************************************
  *  Get a proper class for the outbound or inbound packets
  *
@@ -212,6 +285,18 @@
 	struct ip *ip;
 	struct mbuf *m;
 
+	uint32_t src_ip_qos = 0;
+	uint16_t src_port_qos = 0;
+	uint32_t dst_ip_qos = 0;
+	uint16_t dst_port_qos = 0;
+
+	dyn_qos_session_lookup_t *temp = NULL;
+	int i, j;
+	char *sDir;
+	int src_ip_index;
+	int dst_ip_index;
+
+
 	m = *mp;
 	if(NULL == ifp || NULL == m || NULL == pktattr) {
 		englog(ENGLOG_QOS, QOS_ENGLOG_ERR, "qos_etherclassify: ifp, m or pktattr is NULL.\n");
@@ -298,19 +383,37 @@
 		return;
 	}
    
+	rtuple = (uint8_t *)a5tuple_p;
+
 	ifn_p = (qos_filter_ifnode_t *)
 		clickrule4_lookup(&qos_filter_share.iftable, (uint32_t)(uintptr_t)ifp);
 	/*
 	 * (NULL == ifn_p) means that the interface is not init(no filters).
 	 */
+
 	if (NULL == ifn_p) {
-		pktattr->pattr_class = NULL;
-		qos_filter_share.fltr_g_stats.hits_interface_fail++;
-		/*englog(ENGLOG_QOS, QOS_ENGLOG_DEBUG, "qos_etherclassify: No filters in the interface.\n");*/
-		return;
+		goto label;
 	}
 
-	rtuple = (uint8_t *)a5tuple_p;
+#if 0
+	if(QOSD_INPUT == direction) {
+		table = &(ifn_p->if_i_table);
+		rorder = (uint8_t *) table->rule_order;
+	    fastlog_syslog(LOG_DEBUG, "QOS input dirn.. protocol : %d...src port : %d %d\n", rtuple[rorder[0]], rtuple[rorder[1]],rtuple[rorder[2]]);
+	    fastlog_syslog(LOG_DEBUG, "QOS input dirn.. dst port : %d %d\n", rtuple[rorder[3]],rtuple[rorder[4]]);
+	    fastlog_syslog(LOG_DEBUG, "QOS inut src ip : %d %d %d %d\n", rtuple[rorder[5]], rtuple[rorder[6]],rtuple[rorder[7]],rtuple[rorder[8]]);
+	    fastlog_syslog(LOG_DEBUG, "QOS inut dst ip :  %d %d %d %d\n", rtuple[rorder[9]], rtuple[rorder[10]], rtuple[rorder[11]],rtuple[rorder[12]]);
+    }
+	if(QOSD_OUTPUT == direction) {
+		table = &(ifn_p->if_o_table);
+		rorder = (uint8_t *) table->rule_order;
+	    fastlog_syslog(LOG_DEBUG, "QOS out dirn.. protocol : %d...src port : %d %d\n", rtuple[rorder[0]], rtuple[rorder[1]],rtuple[rorder[2]]);
+	    fastlog_syslog(LOG_DEBUG, "QOS out dirn.. dst port : %d %d\n", rtuple[rorder[3]],rtuple[rorder[4]]);
+	    fastlog_syslog(LOG_DEBUG, "QOS out src ip : %d %d %d %d\n", rtuple[rorder[5]], rtuple[rorder[6]],rtuple[rorder[7]],rtuple[rorder[8]]);
+	    fastlog_syslog(LOG_DEBUG, "QOS out dst ip :  %d %d %d %d\n", rtuple[rorder[9]], rtuple[rorder[10]], rtuple[rorder[11]],rtuple[rorder[12]]);
+    }
+#endif
+
 	if(QOSD_OUTPUT == direction) {
 		table = &(ifn_p->if_dyno_table);
 		rorder = (uint8_t *) table->rule_order;
@@ -416,6 +519,62 @@
 		}
 	}
 
+
+label:
+	if(QOSD_OUTPUT == direction) {
+		rorder = (uint8_t *) o_net_order;
+        sDir = "OUT";
+        *((uint8_t *)&src_port_qos + 0) = rtuple[rorder[4]];
+        *((uint8_t *)&src_port_qos + 1) = rtuple[rorder[3]];
+
+        *((uint8_t *)&dst_port_qos + 0) = rtuple[rorder[2]];
+        *((uint8_t *)&dst_port_qos + 1) = rtuple[rorder[1]];
+    } else {
+		rorder = (uint8_t *) i_net_order;
+        sDir = "IN";
+        *((uint8_t *)&src_port_qos + 0) = rtuple[rorder[2]];
+        *((uint8_t *)&src_port_qos + 1) = rtuple[rorder[1]];
+
+        *((uint8_t *)&dst_port_qos + 0) = rtuple[rorder[4]];
+        *((uint8_t *)&dst_port_qos + 1) = rtuple[rorder[3]];
+    }
+
+    src_ip_index = 5;
+    dst_ip_index = 9;
+
+
+    for (i = 0; i < 4; i++) {
+        *((uint8_t *)&src_ip_qos + i) = rtuple[rorder[i+src_ip_index]];
+    }
+    for (i = 0; i < 4; i++) {
+        *((uint8_t *)&dst_ip_qos + i) = rtuple[rorder[i+dst_ip_index]];
+    }
+#if 0
+	fastlog_syslog(LOG_DEBUG, "TO CHECK ..src ip : %u, src_port : %u, dst_ip : %u, dst_port : %u, dir : %d\n",src_ip_qos, src_port_qos, dst_ip_qos, dst_port_qos, direction);
+#endif
+
+    temp = qos_session_lookup(src_ip_qos, src_port_qos, dst_ip_qos, dst_port_qos, direction);
+
+    if (temp && !strcmp(temp->qos_session_altq_conf_save->ifname, ifp->if_xname) 
+        && !strcmp(temp->qos_session_q_save->sDir, sDir))    {
+
+            if (!temp->is_sip_match) {
+                src_ip_qos = 0;
+            }
+            if (!src_ip_qos && !temp->is_sport_match) {
+                src_port_qos = 0;
+            }
+            if (!temp->is_dip_match) {
+                dst_ip_qos = 0;
+            }
+            if (!dst_ip_qos && !temp->is_dport_match) {
+                dst_port_qos = 0;
+            }
+
+            create_queue_filter(src_ip_qos, src_port_qos, dst_ip_qos, dst_port_qos, sDir, temp->qos_session_q_save,
+                 temp->qos_session_altq_conf_save);
+    }
+
 	pktattr->pattr_class = NULL;
 	qos_filter_share.fltr_g_stats.hits_filter_fail++;
 	qos_printf("qos_etherclassify: Not found the class.\n");
@@ -1296,7 +1455,9 @@
 		if (!strncmp(pfltr->fltr_name, FILTER_NAME_PREFIX_FOR_SESSION_BASED_QOS, strlen(FILTER_NAME_PREFIX_FOR_SESSION_BASED_QOS))) {
 			continue;
 		}
-
+		if (!strncmp(pfltr->fltr_name, "fd_", 3)) {
+			continue;
+		}
 		isfound = 1;
 
 		smask.s_addr = pfltr->tp.smask;
Index: /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_scheduler.h
===================================================================
--- /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_scheduler.h	(revision 37998)
+++ /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_scheduler.h	(working copy)
@@ -43,7 +43,8 @@
 #define QOS_BORROW_DEFAULT	QOS_UNBORROW
 
 /* QoS queue size limit */
-#define QOS_DEFAULT_QLIMIT	1024
+
+#define QOS_DEFAULT_QLIMIT	100000
 
 /*************************************************************************
  * STRUCTURE DEFINITIONS
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 37998)
+++ /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_scheduler.c	(working copy)
@@ -1571,6 +1571,9 @@
 		if (!strncmp(pQoSQRoot->sQName, Q_NAME_PREFIX_FOR_SESSION_BASED_QOS, strlen(Q_NAME_PREFIX_FOR_SESSION_BASED_QOS))) {
 			continue;
 		}
+		if (!strncmp(pQoSQRoot->sQName, "qd_", 3)) {
+			continue;
+		}
 
 		isfound = 1;
 
@@ -1665,6 +1668,10 @@
         if (!strncmp(pQoSQRoot->sQName, Q_NAME_PREFIX_FOR_SESSION_BASED_QOS, strlen(Q_NAME_PREFIX_FOR_SESSION_BASED_QOS))) {
             continue;
         }
+        if (!strncmp(pQoSQRoot->sQName, "qd_", 3)) {
+            continue;
+        }
+
 
 		app_printf(pcb, "qos queue root \"%s\" \"%s\" %s %s %d %s %s\n",
 				pQoSQRoot->sQName, pQoSQRoot->sIfName, pQoSQRoot->sDir,
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 37998)
+++ /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_subr.c	(working copy)
@@ -472,6 +472,11 @@
 				continue;
 			}
 
+#if 1
+        if (!strncmp(pQoSQRoot->sQName, "qd_", 3)) {
+            continue;
+        }
+#endif
 			app_printf(pcb, "%sqos queue root \"%s\" \"%s\" %s %s %d %s %s\n",
 					QOS_INDENT_1, pQoSQRoot->sQName, pQoSQRoot->sIfName, pQoSQRoot->sDir,
 					pQoSQRoot->sBand, pQoSQRoot->iPri, pQoSQRoot->sBorrow,
@@ -861,6 +866,11 @@
 		if (!strncmp(pfltr->fltr_name, FILTER_NAME_PREFIX_FOR_SESSION_BASED_QOS, strlen(FILTER_NAME_PREFIX_FOR_SESSION_BASED_QOS))) {
 			continue;
 		}
+#if 1
+        if (!strncmp(pfltr->fltr_name, "fd_", 3)) {
+            continue;
+        }
+#endif
 
 		smask.s_addr = pfltr->tp.smask;
 		dmask.s_addr = pfltr->tp.dmask;
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 37998)
+++ /branches/rel_apv_10_4_0_112_gail/usr/src/sys/click/app/qos/qos_var.h	(working copy)
@@ -45,7 +45,7 @@
 #define QOS_MAXPRIO		8
 
 /* QoS maximum queue */
-#define QOS_MAXQ		1024
+#define QOS_MAXQ		100000
 
 /* QoS interface maximum number */
 #define MAX_VLAN 4094
