On Thu, Aug 27, 2015 at 3:30 PM, David Miller <da...@davemloft.net> wrote:
> I don't like this.
>
> The situation is that some sophisticated qdiscs can function without
> explicit parameters, some cannot.

This is exactly what this patch tries to solve... I already mark those
with a DEFAULTABLE flag.

>
> That is the problem you need to solve.  For example, if "opts" is NULL
> HTB should use a reasonable set of defaults instead of failing.
>
> Furthermore, you can improve the behavior when this happens.
>
> When qdisc_create_dflt() returns NULL because ops->init() fails, do
> something reasonable.
>
> I'm not applying this patch series, it papers over the issue rather
> than actually addressing it properly.

I wish I never mention that crash, which leads you to think I am trying
to fix a crash rather than a more important issue, usability. See below.

Forget about the crash, consider the current behavior:

# echo htb > default_qdisc
# succeed without any error
(then add a root qdisc and remove it)
# failure shown here in dmesg


And compare it with the behavior after my patch:

# echo htb > default_qdisc
Invalid arguments

I think this is clearly an improvement.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to