ADDRCONF(NETDEV_UP): eth0: link is not ready | wifi | 未解决|

来源:互联网 发布:免费视频会议软件 编辑:程序博客网 时间:2024/06/13 17:20

link is not ready        ::kernel/net/ipv6/addrconf.c   
    addrconf_notify(*this,event,*data)                  
        switch(event)
            case NETDEV_CHANGE:
                if (event == NETDEV_UP)
                    if (!addrconf_qdisc_ok(dev))

        addrconf_qdisc_ok(){                
            return qdisc_tx_is_noop()
        }

    qdisc_tx_is_noop()    include/net/sch_generic.h   

    static inline bool qdisc_tx_is_noop(const struct net_device *dev)
    {
        unsigned int i;
            for (i = 0; i < dev->num_tx_queues; i++) {
                struct netdev_queue *txq = netdev_get_tx_queue(dev, i);
                if (txq->qdisc != &noop_qdisc)
                        return false;
            }
        return true;
    }
********************************************************************************************************************************************
struct netdev_queue      ::include/linux/netdevice.h       
struct netdev_queue {
        struct net_device       *dev;
        struct Qdisc            *qdisc;
        unsigned long           state;
        struct Qdisc            *qdisc_sleeping;
        spinlock_t              _xmit_lock ____cacheline_aligned_in_smp;
        int                     xmit_lock_owner;
        unsigned long           trans_start;
        unsigned long           tx_bytes;
        unsigned long           tx_packets;
        unsigned long           tx_dropped;
} ____cacheline_aligned_in_smp;
------------------------------------------------------------------------------------------------------
struct Qdisc                                                              ::include/net/sch_generic.h      
struct Qdisc {
        int                     (*enqueue)(struct sk_buff *skb, struct Qdisc *dev);
        struct sk_buff *        (*dequeue)(struct Qdisc *dev);
        unsigned                flags;
#define TCQ_F_BUILTIN           1
#define TCQ_F_THROTTLED         2
#define TCQ_F_INGRESS           4
#define TCQ_F_WARN_NONWC        (1 << 16)
        int                     padded;
        struct Qdisc_ops        *ops;
        struct qdisc_size_table *stab;
        struct list_head        list;
        u32                     handle;
        u32                     parent;
        atomic_t                refcnt;
        struct gnet_stats_rate_est      rate_est;
        int                     (*reshape_fail)(struct sk_buff *skb,
                                        struct Qdisc *q);
        void                    *u32_node;
        /* This field is deprecated, but it is still used by CBQ
         * and it will live until better solution will be invented.
         */
        struct Qdisc            *__parent;
        struct netdev_queue     *dev_queue;
        struct Qdisc            *next_sched;
        struct sk_buff          *gso_skb;
        /*
         * For performance sake on SMP, we put highly modified fields at the end
         */
        unsigned long           state;
        struct sk_buff_head     q;
        struct gnet_stats_basic_packed bstats;
        struct gnet_stats_queue qstats;
};

-----------------------------------------------------------------------------------------------------------

noop_qdisc                                                      ::$(kernel)/net/sched/sch_generic.c

struct Qdisc noop_qdisc = {
        .enqueue        =       noop_enqueue,
        .dequeue        =       noop_dequeue,
        .flags          =       TCQ_F_BUILTIN,
        .ops            =       &noop_qdisc_ops,
        .list           =       LIST_HEAD_INIT(noop_qdisc.list),
        .q.lock         =       __SPIN_LOCK_UNLOCKED(noop_qdisc.q.lock),
        .dev_queue      =       &noop_netdev_queue,
};
EXPORT_SYMBOL(noop_qdisc);

*******************************************************************************************************************************************
addrconf_notify() 用于处理网络设备事件::生成link-local的v6地址;IPV6的重复地址检查(DAD:duplicate address detection);
********************************************************************************************************************************************

txq->qdisc != &noop_qdisc 这里得到1
txq->qdisc 和 noop_qdisc 不相同导致进入if,返回false;

 

 

能力有限,只看到这里;
随便提一下:这个link is not ready;可能导致了iwlist scan: no scan results的原因;我不是很肯定;

原创粉丝点击