netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* can't add tc multiq
@ 2009-02-09  8:43 Badalian Vyacheslav
  2009-02-09 16:15 ` Stephen Hemminger
  0 siblings, 1 reply; 13+ messages in thread
From: Badalian Vyacheslav @ 2009-02-09  8:43 UTC (permalink / raw)
  To: netdev@vger.kernel.org

Hello all!
kernel 2.6.28.4
iproute2 - last git
Can't use multiq qdisc. How to fix this?
Thanks!

slavon ~ # tc qdisc add dev eth0 root handle 1: multiq
RTNETLINK answers: Invalid argument
slavon ~ # tc qdisc add dev eth1 root handle 1: multiq
RTNETLINK answers: Invalid argument


# lsmod
Module                  Size  Used by
sch_multiq              9472  0
8021q                  23200  0
xt_tcpudp               7040  0
iptable_filter          6784  0
ip_tables              15120  1 iptable_filter
x_tables               17028  2 xt_tcpudp,ip_tables
usbmouse                8064  0
usbhid                 37728  2
ehci_hcd               38284  0
snd_hda_intel         409776  6
uhci_hcd               26380  0
snd_pcm                72196  2 snd_hda_intel
usbcore               133136  7 usbmouse,usbhid,ehci_hcd,uhci_hcd
snd_timer              23304  2 snd_pcm
snd_page_alloc         12296  2 snd_hda_intel,snd_pcm
thermal                19356  0
snd_hwdep              11140  1 snd_hda_intel
processor              37024  1 thermal
i2c_i801               12944  0
snd                    52516  14 snd_hda_intel,snd_pcm,snd_timer,snd_hwdep
r8169                  36100  0
i2c_core               24724  1 i2c_i801
fglrx                1905884  3
e1000                 123076  0
rng_core                8196  0
mii                     8704  1 r8169
thermal_sys            15144  2 thermal,processor
button                 10128  0


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: can't add tc multiq
  2009-02-09  8:43 can't add tc multiq Badalian Vyacheslav
@ 2009-02-09 16:15 ` Stephen Hemminger
  2009-02-09 21:44   ` [PATCH net-next] " Jarek Poplawski
  2009-02-10 11:37   ` Badalian Vyacheslav
  0 siblings, 2 replies; 13+ messages in thread
From: Stephen Hemminger @ 2009-02-09 16:15 UTC (permalink / raw)
  To: Badalian Vyacheslav; +Cc: netdev@vger.kernel.org

On Mon, 09 Feb 2009 11:43:26 +0300
Badalian Vyacheslav <slavon@bigtelecom.ru> wrote:

> Hello all!
> kernel 2.6.28.4
> iproute2 - last git
> Can't use multiq qdisc. How to fix this?
> Thanks!
> 
> slavon ~ # tc qdisc add dev eth0 root handle 1: multiq
> RTNETLINK answers: Invalid argument
> slavon ~ # tc qdisc add dev eth1 root handle 1: multiq
> RTNETLINK answers: Invalid argument
> 
> 
> # lsmod
> Module                  Size  Used by
> sch_multiq              9472  0
> 8021q                  23200  0
> xt_tcpudp               7040  0
> iptable_filter          6784  0
> ip_tables              15120  1 iptable_filter
> x_tables               17028  2 xt_tcpudp,ip_tables
> usbmouse                8064  0
> usbhid                 37728  2
> ehci_hcd               38284  0
> snd_hda_intel         409776  6
> uhci_hcd               26380  0
> snd_pcm                72196  2 snd_hda_intel
> usbcore               133136  7 usbmouse,usbhid,ehci_hcd,uhci_hcd
> snd_timer              23304  2 snd_pcm
> snd_page_alloc         12296  2 snd_hda_intel,snd_pcm
> thermal                19356  0
> snd_hwdep              11140  1 snd_hda_intel
> processor              37024  1 thermal
> i2c_i801               12944  0
> snd                    52516  14 snd_hda_intel,snd_pcm,snd_timer,snd_hwdep
> r8169                  36100  0
> i2c_core               24724  1 i2c_i801
> fglrx                1905884  3
> e1000                 123076  0
> rng_core                8196  0
> mii                     8704  1 r8169
> thermal_sys            15144  2 thermal,processor
> button                 10128  0

You need hardware with multiple transmit queues. Neither e1000 or r8169
has this.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH net-next] Re: can't add tc multiq
  2009-02-09 16:15 ` Stephen Hemminger
@ 2009-02-09 21:44   ` Jarek Poplawski
  2009-02-09 22:40     ` Stephen Hemminger
  2009-02-10 11:37   ` Badalian Vyacheslav
  1 sibling, 1 reply; 13+ messages in thread
From: Jarek Poplawski @ 2009-02-09 21:44 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Badalian Vyacheslav, netdev@vger.kernel.org

Stephen Hemminger wrote, On 02/09/2009 05:15 PM:

> On Mon, 09 Feb 2009 11:43:26 +0300
> Badalian Vyacheslav <slavon@bigtelecom.ru> wrote:
> 
>> Hello all!
>> kernel 2.6.28.4
>> iproute2 - last git
>> Can't use multiq qdisc. How to fix this?
>> Thanks!
>>
>> slavon ~ # tc qdisc add dev eth0 root handle 1: multiq
>> RTNETLINK answers: Invalid argument
...
> You need hardware with multiple transmit queues. Neither e1000 or r8169
> has this.
------------------->
pkt_sched: sch_multiq: Warn on non-multiqueue devices.

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 add a small printk.

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 |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/net/sched/sch_multiq.c b/net/sched/sch_multiq.c
index 7e15186..a38f0c1 100644
--- a/net/sched/sch_multiq.c
+++ b/net/sched/sch_multiq.c
@@ -201,8 +201,11 @@ static int multiq_tune(struct Qdisc *sch, struct nlattr *opt)
 	struct tc_multiq_qopt *qopt;
 	int i;
 
-	if (!netif_is_multiqueue(qdisc_dev(sch)))
+	if (!netif_is_multiqueue(qdisc_dev(sch))) {
+		printk(KERN_WARNING "multiq: dev %s isn't multiqueue.\n",
+		       qdisc_dev(sch)->name);
 		return -EINVAL;
+	}
 	if (nla_len(opt) < sizeof(*qopt))
 		return -EINVAL;
 

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH net-next] Re: can't add tc multiq
  2009-02-09 21:44   ` [PATCH net-next] " Jarek Poplawski
@ 2009-02-09 22:40     ` Stephen Hemminger
  2009-02-10  7:41       ` [PATCH v2 " Jarek Poplawski
  0 siblings, 1 reply; 13+ messages in thread
From: Stephen Hemminger @ 2009-02-09 22:40 UTC (permalink / raw)
  To: Jarek Poplawski; +Cc: Badalian Vyacheslav, netdev@vger.kernel.org

On Mon, 9 Feb 2009 22:44:47 +0100
Jarek Poplawski <jarkao2@gmail.com> wrote:

> Stephen Hemminger wrote, On 02/09/2009 05:15 PM:
> 
> > On Mon, 09 Feb 2009 11:43:26 +0300
> > Badalian Vyacheslav <slavon@bigtelecom.ru> wrote:
> > 
> >> Hello all!
> >> kernel 2.6.28.4
> >> iproute2 - last git
> >> Can't use multiq qdisc. How to fix this?
> >> Thanks!
> >>
> >> slavon ~ # tc qdisc add dev eth0 root handle 1: multiq
> >> RTNETLINK answers: Invalid argument
> ...
> > You need hardware with multiple transmit queues. Neither e1000 or r8169
> > has this.
> ------------------->
> pkt_sched: sch_multiq: Warn on non-multiqueue devices.
> 
> 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 add a small printk.
> 
> 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 |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/net/sched/sch_multiq.c b/net/sched/sch_multiq.c
> index 7e15186..a38f0c1 100644
> --- a/net/sched/sch_multiq.c
> +++ b/net/sched/sch_multiq.c
> @@ -201,8 +201,11 @@ static int multiq_tune(struct Qdisc *sch, struct nlattr *opt)
>  	struct tc_multiq_qopt *qopt;
>  	int i;
>  
> -	if (!netif_is_multiqueue(qdisc_dev(sch)))
> +	if (!netif_is_multiqueue(qdisc_dev(sch))) {
> +		printk(KERN_WARNING "multiq: dev %s isn't multiqueue.\n",
> +		       qdisc_dev(sch)->name);
>  		return -EINVAL;

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.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 net-next] Re: can't add tc multiq
  2009-02-09 22:40     ` Stephen Hemminger
@ 2009-02-10  7:41       ` Jarek Poplawski
  2009-02-10  8:11         ` David Miller
  2009-02-10 11:30         ` Badalian Vyacheslav
  0 siblings, 2 replies; 13+ messages in thread
From: Jarek Poplawski @ 2009-02-10  7:41 UTC (permalink / raw)
  To: David Miller
  Cc: Stephen Hemminger, Badalian Vyacheslav, netdev@vger.kernel.org

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;
 

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 net-next] Re: can't add tc multiq
  2009-02-10  7:41       ` [PATCH v2 " Jarek Poplawski
@ 2009-02-10  8:11         ` David Miller
  2009-02-10 11:30         ` Badalian Vyacheslav
  1 sibling, 0 replies; 13+ messages in thread
From: David Miller @ 2009-02-10  8:11 UTC (permalink / raw)
  To: jarkao2; +Cc: shemminger, slavon, netdev

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.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 net-next] Re: can't add tc multiq
  2009-02-10  7:41       ` [PATCH v2 " Jarek Poplawski
  2009-02-10  8:11         ` David Miller
@ 2009-02-10 11:30         ` Badalian Vyacheslav
  2009-02-10 11:57           ` Jarek Poplawski
  1 sibling, 1 reply; 13+ messages in thread
From: Badalian Vyacheslav @ 2009-02-10 11:30 UTC (permalink / raw)
  To: Jarek Poplawski; +Cc: David Miller, Stephen Hemminger, netdev@vger.kernel.org

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;
>  
>
>   


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: can't add tc multiq
  2009-02-09 16:15 ` Stephen Hemminger
  2009-02-09 21:44   ` [PATCH net-next] " Jarek Poplawski
@ 2009-02-10 11:37   ` Badalian Vyacheslav
  2009-02-10 16:53     ` Stephen Hemminger
  1 sibling, 1 reply; 13+ messages in thread
From: Badalian Vyacheslav @ 2009-02-10 11:37 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev@vger.kernel.org

Sorry. I have 2 different e1000e and its also can't apply multiq. How
get number of hardware queues of device?

Thanks

> On Mon, 09 Feb 2009 11:43:26 +0300
> Badalian Vyacheslav <slavon@bigtelecom.ru> wrote:
>
>   
>> Hello all!
>> kernel 2.6.28.4
>> iproute2 - last git
>> Can't use multiq qdisc. How to fix this?
>> Thanks!
>>
>> slavon ~ # tc qdisc add dev eth0 root handle 1: multiq
>> RTNETLINK answers: Invalid argument
>> slavon ~ # tc qdisc add dev eth1 root handle 1: multiq
>> RTNETLINK answers: Invalid argument
>>
>>
>> # lsmod
>> Module                  Size  Used by
>> sch_multiq              9472  0
>> 8021q                  23200  0
>> xt_tcpudp               7040  0
>> iptable_filter          6784  0
>> ip_tables              15120  1 iptable_filter
>> x_tables               17028  2 xt_tcpudp,ip_tables
>> usbmouse                8064  0
>> usbhid                 37728  2
>> ehci_hcd               38284  0
>> snd_hda_intel         409776  6
>> uhci_hcd               26380  0
>> snd_pcm                72196  2 snd_hda_intel
>> usbcore               133136  7 usbmouse,usbhid,ehci_hcd,uhci_hcd
>> snd_timer              23304  2 snd_pcm
>> snd_page_alloc         12296  2 snd_hda_intel,snd_pcm
>> thermal                19356  0
>> snd_hwdep              11140  1 snd_hda_intel
>> processor              37024  1 thermal
>> i2c_i801               12944  0
>> snd                    52516  14 snd_hda_intel,snd_pcm,snd_timer,snd_hwdep
>> r8169                  36100  0
>> i2c_core               24724  1 i2c_i801
>> fglrx                1905884  3
>> e1000                 123076  0
>> rng_core                8196  0
>> mii                     8704  1 r8169
>> thermal_sys            15144  2 thermal,processor
>> button                 10128  0
>>     
>
> You need hardware with multiple transmit queues. Neither e1000 or r8169
> has this.
> --
> 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
>
>   


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 net-next] Re: can't add tc multiq
  2009-02-10 11:30         ` Badalian Vyacheslav
@ 2009-02-10 11:57           ` Jarek Poplawski
  2009-02-10 12:07             ` Badalian Vyacheslav
  0 siblings, 1 reply; 13+ messages in thread
From: Jarek Poplawski @ 2009-02-10 11:57 UTC (permalink / raw)
  To: Badalian Vyacheslav
  Cc: David Miller, Stephen Hemminger, netdev@vger.kernel.org

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.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 net-next] Re: can't add tc multiq
  2009-02-10 11:57           ` Jarek Poplawski
@ 2009-02-10 12:07             ` Badalian Vyacheslav
  2009-02-10 12:18               ` Jarek Poplawski
  0 siblings, 1 reply; 13+ messages in thread
From: Badalian Vyacheslav @ 2009-02-10 12:07 UTC (permalink / raw)
  To: Jarek Poplawski; +Cc: David Miller, Stephen Hemminger, netdev@vger.kernel.org

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.
>
>   


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 net-next] Re: can't add tc multiq
  2009-02-10 12:07             ` Badalian Vyacheslav
@ 2009-02-10 12:18               ` Jarek Poplawski
  2009-02-10 12:22                 ` Badalian Vyacheslav
  0 siblings, 1 reply; 13+ messages in thread
From: Jarek Poplawski @ 2009-02-10 12:18 UTC (permalink / raw)
  To: Badalian Vyacheslav
  Cc: David Miller, Stephen Hemminger, netdev@vger.kernel.org

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.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH v2 net-next] Re: can't add tc multiq
  2009-02-10 12:18               ` Jarek Poplawski
@ 2009-02-10 12:22                 ` Badalian Vyacheslav
  0 siblings, 0 replies; 13+ messages in thread
From: Badalian Vyacheslav @ 2009-02-10 12:22 UTC (permalink / raw)
  To: Jarek Poplawski; +Cc: David Miller, Stephen Hemminger, netdev@vger.kernel.org

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.
>
>   


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: can't add tc multiq
  2009-02-10 11:37   ` Badalian Vyacheslav
@ 2009-02-10 16:53     ` Stephen Hemminger
  0 siblings, 0 replies; 13+ messages in thread
From: Stephen Hemminger @ 2009-02-10 16:53 UTC (permalink / raw)
  To: Badalian Vyacheslav; +Cc: netdev@vger.kernel.org

On Tue, 10 Feb 2009 14:37:18 +0300
Badalian Vyacheslav <slavon@bigtelecom.ru> wrote:

> Sorry. I have 2 different e1000e and its also can't apply multiq. How
> get number of hardware queues of device?
> 

e1000e is not multiqueue either, the only intel 1G card that does
multiqueue is the 82575/82576 gigabit ethernet family which uses
the "igb" driver.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-02-10 16:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-09  8:43 can't add tc multiq Badalian Vyacheslav
2009-02-09 16:15 ` Stephen Hemminger
2009-02-09 21:44   ` [PATCH net-next] " Jarek Poplawski
2009-02-09 22:40     ` Stephen Hemminger
2009-02-10  7:41       ` [PATCH v2 " Jarek Poplawski
2009-02-10  8:11         ` David Miller
2009-02-10 11:30         ` Badalian Vyacheslav
2009-02-10 11:57           ` Jarek Poplawski
2009-02-10 12:07             ` Badalian Vyacheslav
2009-02-10 12:18               ` Jarek Poplawski
2009-02-10 12:22                 ` Badalian Vyacheslav
2009-02-10 11:37   ` Badalian Vyacheslav
2009-02-10 16:53     ` Stephen Hemminger

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).