-#define qtype(q) (q)->qtype /* Get queue type */
-#define qstate(q) (q)->qstate /* Get queue state */
-#define qlimit(q) (q)->qlim /* Max packets to be queued */
-#define qlen(q) (q)->qlen /* Current queue length. */
-#define qsize(q) (q)->qsize /* Approx. bytes in queue */
-/* #define qtail(q) MBUFQ_LAST(&(q)->mbufq) */
-#define qhead(q) MBUFQ_FIRST(&(q)->mbufq)
-
-#define qempty(q) (qlen(q) == 0) /* Is the queue empty?? */
-#define q_is_red(q) (qtype(q) == Q_RED) /* Is the queue a RED queue */
-#define q_is_rio(q) (qtype(q) == Q_RIO) /* Is the queue a RIO queue */
-#define q_is_blue(q) (qtype(q) == Q_BLUE) /* Is the queue a BLUE queue */
-#define q_is_sfb(q) (qtype(q) == Q_SFB) /* Is the queue a SFB queue */
-#define q_is_red_or_rio(q) (qtype(q) == Q_RED || qtype(q) == Q_RIO)
-#define q_is_suspended(q) (qstate(q) == QS_SUSPENDED)
-
-#define PKTCNTR_ADD(_cntr, _pkt, _len) do { \
- (_cntr)->packets += (_pkt); \
- (_cntr)->bytes += (_len); \
+#define qmbufq(q) (q)->__pktq_u.__mbufq /* Get mbuf packet queue */
+#define qptype(q) (q)->qptype /* Get queue packet type */
+#define qtype(q) (q)->qtype /* Get queue type */
+#define qstate(q) (q)->qstate /* Get queue state */
+#define qlimit(q) (q)->qlim /* Max packets to be queued */
+#define qlen(q) (q)->qlen /* Current queue length. */
+#define qsize(q) (q)->qsize /* Approx. bytes in queue */
+
+#define qhead(q) MBUFQ_FIRST(&qmbufq(q))
+
+#define qempty(q) (qlen(q) == 0) /* Is the queue empty?? */
+#define q_is_red(q) (qtype(q) == Q_RED) /* Is the queue a RED queue */
+#define q_is_rio(q) (qtype(q) == Q_RIO) /* Is the queue a RIO queue */
+#define q_is_blue(q) (qtype(q) == Q_BLUE) /* Is the queue a BLUE queue */
+#define q_is_sfb(q) (qtype(q) == Q_SFB) /* Is the queue a SFB queue */
+#define q_is_red_or_rio(q) (qtype(q) == Q_RED || qtype(q) == Q_RIO)
+#define q_is_suspended(q) (qstate(q) == QS_SUSPENDED)
+
+#define PKTCNTR_ADD(_cntr, _pkt, _len) do { \
+ (_cntr)->packets += (_pkt); \
+ (_cntr)->bytes += (_len); \