diff mbox

[v2,net-next] Re: can't add tc multiq

Message ID 20090210074154.GA4190@ff.dom.local
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Jarek Poplawski Feb. 10, 2009, 7:41 a.m. UTC
On Mon, Feb 09, 2009 at 02:40:52PM -0800, Stephen Hemminger wrote:
...
> Rather than warning which will buried off on some console that user will never
> see (and can cause DoS overload). A better errno should be chosen.

I think admins are used to reading console messages, but we can try
with a better errno too.

Thanks,
Jarek P.
-------------------> take 2

pkt_sched: sch_multiq: Change errno on non-multiqueue devices use.

Current "RTNETLINK answers: Invalid argument" warning, while trying to
add multiq qdisc to non-multiqueue device, isn't very helpful and some
of these devs can be changed btw., so let's use a better errno.

With feedback from Stephen Hemminger <shemminger@vyatta.com>

Reported-by: Badalian Vyacheslav <slavon@bigtelecom.ru>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
---

 net/sched/sch_multiq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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

Comments

David Miller Feb. 10, 2009, 8:11 a.m. UTC | #1
From: Jarek Poplawski <jarkao2@gmail.com>
Date: Tue, 10 Feb 2009 07:41:54 +0000

> pkt_sched: sch_multiq: Change errno on non-multiqueue devices use.
> 
> Current "RTNETLINK answers: Invalid argument" warning, while trying to
> add multiq qdisc to non-multiqueue device, isn't very helpful and some
> of these devs can be changed btw., so let's use a better errno.
> 
> With feedback from Stephen Hemminger <shemminger@vyatta.com>
> 
> Reported-by: Badalian Vyacheslav <slavon@bigtelecom.ru>
> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>

Applied, thanks everyone.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Badalian Vyacheslav Feb. 10, 2009, 11:30 a.m. UTC | #2
Thanks all! i will go to buy e1000e.
> On Mon, Feb 09, 2009 at 02:40:52PM -0800, Stephen Hemminger wrote:
> ...
>   
>> Rather than warning which will buried off on some console that user will never
>> see (and can cause DoS overload). A better errno should be chosen.
>>     
>
> I think admins are used to reading console messages, but we can try
> with a better errno too.
>
> Thanks,
> Jarek P.
> -------------------> take 2
>
> pkt_sched: sch_multiq: Change errno on non-multiqueue devices use.
>
> Current "RTNETLINK answers: Invalid argument" warning, while trying to
> add multiq qdisc to non-multiqueue device, isn't very helpful and some
> of these devs can be changed btw., so let's use a better errno.
>
> With feedback from Stephen Hemminger <shemminger@vyatta.com>
>
> Reported-by: Badalian Vyacheslav <slavon@bigtelecom.ru>
> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
> ---
>
>  net/sched/sch_multiq.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/sched/sch_multiq.c b/net/sched/sch_multiq.c
> index 7e15186..9127312 100644
> --- a/net/sched/sch_multiq.c
> +++ b/net/sched/sch_multiq.c
> @@ -202,7 +202,7 @@ static int multiq_tune(struct Qdisc *sch, struct nlattr *opt)
>  	int i;
>  
>  	if (!netif_is_multiqueue(qdisc_dev(sch)))
> -		return -EINVAL;
> +		return -EOPNOTSUPP;
>  	if (nla_len(opt) < sizeof(*qopt))
>  		return -EINVAL;
>  
>
>   

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jarek Poplawski Feb. 10, 2009, 11:57 a.m. UTC | #3
On Tue, Feb 10, 2009 at 02:30:28PM +0300, Badalian Vyacheslav wrote:
> Thanks all! i will go to buy e1000e.

Try to grep in drivers/net for 'alloc_etherdev_mq' to find multiqueue
NICs/drivers.

Jarek P.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Badalian Vyacheslav Feb. 10, 2009, 12:07 p.m. UTC | #4
Ohh... so small. e1000 and e1000e not have hw queues in life or its
simple not have implementation in driver?
Thanks again and again!

> On Tue, Feb 10, 2009 at 02:30:28PM +0300, Badalian Vyacheslav wrote:
>   
>> Thanks all! i will go to buy e1000e.
>>     
>
> Try to grep in drivers/net for 'alloc_etherdev_mq' to find multiqueue
> NICs/drivers.
>
> Jarek P.
>
>   

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jarek Poplawski Feb. 10, 2009, 12:18 p.m. UTC | #5
On Tue, Feb 10, 2009 at 03:07:23PM +0300, Badalian Vyacheslav wrote:
> Ohh... so small.

Yes. (I hope you didn't forget -R with grep.)

> e1000 and e1000e not have hw queues in life or its
> simple not have implementation in driver?

I don't know.

Jarek P.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Badalian Vyacheslav Feb. 10, 2009, 12:22 p.m. UTC | #6
Jarek Poplawski пишет:
> On Tue, Feb 10, 2009 at 03:07:23PM +0300, Badalian Vyacheslav wrote:
>   
>> Ohh... so small.
>>     
>
> Yes. (I hope you didn't forget -R with grep.)
>   
yep
>   
>> e1000 and e1000e not have hw queues in life or its
>> simple not have implementation in driver?
>>     
>
> I don't know.
>   

Thanks for all!

> Jarek P.
>
>   

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

Patch

diff --git a/net/sched/sch_multiq.c b/net/sched/sch_multiq.c
index 7e15186..9127312 100644
--- a/net/sched/sch_multiq.c
+++ b/net/sched/sch_multiq.c
@@ -202,7 +202,7 @@  static int multiq_tune(struct Qdisc *sch, struct nlattr *opt)
 	int i;
 
 	if (!netif_is_multiqueue(qdisc_dev(sch)))
-		return -EINVAL;
+		return -EOPNOTSUPP;
 	if (nla_len(opt) < sizeof(*qopt))
 		return -EINVAL;