netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question:  Virtual device error return is mangled
@ 2006-06-15 23:33 Mark Huth
  0 siblings, 0 replies; only message in thread
From: Mark Huth @ 2006-06-15 23:33 UTC (permalink / raw)
  To: netdev

Why does net/core/dev.c: dev_queue_transmit not pass back the actual 
status from hard_start_xmit in the case of a virtual device, and why is 
an error return considered a critical kernel error?

ie why:

          if (!dev->hard_start_xmit(skb, dev)) {
             ...
    rc = -ENETDOWN;
             ...
    return rc;


instead of :
          if (!rc = dev->hard_start_xmit(skb, dev)) {
             ...

             ...
    return rc;

In the case of a real device, a qdisc error gets returned up the stack, 
while in the case of say a bonding device enslaving the real device and 
encountering the same error, success gets returned up the stack.  The 
various virtual devices seem to return success whatever happens, but it 
seems like this behavior is chosen due to the fact that the real status 
cannot be passed back, even if the virtural device manages the skb ref 
count correctly, as dev_queue_transmit will turn it into -ENETDOWN.

Thanks,
Mark Huth

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-06-15 23:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-15 23:33 Question: Virtual device error return is mangled Mark Huth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).