From: Mark Huth <mhuth@mvista.com>
To: netdev@vger.kernel.org
Subject: Question: Virtual device error return is mangled
Date: Thu, 15 Jun 2006 16:33:30 -0700 [thread overview]
Message-ID: <4491EE4A.8060001@mvista.com> (raw)
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
reply other threads:[~2006-06-15 23:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4491EE4A.8060001@mvista.com \
--to=mhuth@mvista.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).