simple examples of how to

Thursday, October 15, 2009

Linux network kernel does not allow virtual device is busy!!

http://lxr.linux.no/linux+v2.6.26.6/net/core/dev.c#L1733

1733                                rc = 0;
1734                                if (!dev_hard_start_xmit(skb, dev)) {
1735                                        HARD_TX_UNLOCK(dev); 
1736                                        goto out; 
1737                                } 
1738                        } 
1739                        HARD_TX_UNLOCK(dev); 
1740                        if (net_ratelimit()) 
1741                                printk(KERN_CRIT "Virtual device %s asks to " 
1742                                       "queue packet!\n", dev->name);

if dev_hard_start_xmit failed, it does not report the reason to upper layer.
Look, rc is zero (which means TX_OK),

How about 
rc = dev_hard_start_xmit(), to report that the virtual device is going crazy ?

No comments:

Post a Comment