]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/linux/netdevice.h
net: decreasing real_num_tx_queues needs to flush qdisc
[net-next-2.6.git] / include / linux / netdevice.h
index a1bff65181669f36fe2b16a8990072e30ef74314..5e6188d9f017aa385717f490f4e1c6b896777d36 100644 (file)
@@ -1407,17 +1407,25 @@ struct softnet_data {
        struct softnet_data     *rps_ipi_next;
        unsigned int            cpu;
        unsigned int            input_queue_head;
+       unsigned int            input_queue_tail;
 #endif
        unsigned                dropped;
        struct sk_buff_head     input_pkt_queue;
        struct napi_struct      backlog;
 };
 
-static inline void input_queue_head_add(struct softnet_data *sd,
-                                       unsigned int len)
+static inline void input_queue_head_incr(struct softnet_data *sd)
 {
 #ifdef CONFIG_RPS
-       sd->input_queue_head += len;
+       sd->input_queue_head++;
+#endif
+}
+
+static inline void input_queue_tail_incr_save(struct softnet_data *sd,
+                                             unsigned int *qtail)
+{
+#ifdef CONFIG_RPS
+       *qtail = ++sd->input_queue_tail;
 #endif
 }
 
@@ -1648,6 +1656,9 @@ static inline int netif_is_multiqueue(const struct net_device *dev)
        return (dev->num_tx_queues > 1);
 }
 
+extern void netif_set_real_num_tx_queues(struct net_device *dev,
+                                        unsigned int txq);
+
 /* Use this variant when it is known for sure that it
  * is executing from hardware interrupt context or with hardware interrupts
  * disabled.
@@ -2326,7 +2337,7 @@ do {                                                              \
 #define netif_vdbg(priv, type, dev, format, args...)           \
 ({                                                             \
        if (0)                                                  \
-               netif_printk(KERN_DEBUG, dev, format, ##args);  \
+               netif_printk(priv, type, KERN_DEBUG, dev, format, ##args); \
        0;                                                      \
 })
 #endif