From: David Miller <davem@davemloft.net>
To: stephen@networkplumber.org
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next] qdisc: propagate errors from qdisc_create_dflt
Date: Sun, 17 Mar 2013 14:32:10 -0400 (EDT) [thread overview]
Message-ID: <20130317.143210.2198141328498450246.davem@davemloft.net> (raw)
In-Reply-To: <20130317093622.088bfb3f@nehalam.linuxnetplumber.net>
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Sun, 17 Mar 2013 09:36:22 -0700
> This patch improves the error handling of default queuing discipline.
>
> The function qdisc_create_dflt masks the error code from the underlying
> qdisc init function. Use IS_ERR() to propagate it back out to the callers.
>
> Change the error handling of several qdisc's to report error rather than
> silently substituting a noop qdisc. Change the log level of failure to
> setup queue discipline from info to notice, since it is a real error.
>
> In current kernel, the only likely error from pfifo_fast is out of memory,
> but the API shouldn't be hiding errors.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
If you're going to do this, you must change all the call sites so that
they don't leave error pointers in the various datastructures.
So code that does:
foo->member = qdisc_create_dflt();
must now go:
var = qdisc_create_dflt();
if (IS_ERR(var))
goto out_err;
foo->member = var;
prev parent reply other threads:[~2013-03-17 18:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-17 16:36 [PATCH net-next] qdisc: propagate errors from qdisc_create_dflt Stephen Hemminger
2013-03-17 18:32 ` David Miller [this message]
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=20130317.143210.2198141328498450246.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.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).