linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] IPROUTE: Modify tc for new PRIO multiqueue behavior
@ 2007-04-25  1:39 Peter P Waskiewicz Jr
  2007-04-25  4:05 ` Stephen Hemminger
  0 siblings, 1 reply; 5+ messages in thread
From: Peter P Waskiewicz Jr @ 2007-04-25  1:39 UTC (permalink / raw)
  To: shemminger
  Cc: netdev, linux-kernel, jgarzik, cramerj, auke-jan.h.kok,
	christopher.leech, davem

From: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>

Modified tc so PRIO can now have a multiqueue parameter passed to it.  This
will turn on multiqueue behavior if a device has more than 1 queue.  Also,
running tc qdisc ls dev <dev> will display if multiqueue is on or off.

Signed-off-by: Peter P. Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
---

 include/linux/pkt_sched.h |    1 +
 tc/q_prio.c               |    9 ++++++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
index d10f353..bab0b9e 100644
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -99,6 +99,7 @@ struct tc_prio_qopt
 {
 	int	bands;			/* Number of bands */
 	__u8	priomap[TC_PRIO_MAX+1];	/* Map: logical priority -> PRIO band */
+	unsigned short multiqueue;	/* 0 for no mq, 1 for mq */
 };
 
 /* TBF section */
diff --git a/tc/q_prio.c b/tc/q_prio.c
index d696e1b..55cb207 100644
--- a/tc/q_prio.c
+++ b/tc/q_prio.c
@@ -29,7 +29,7 @@
 
 static void explain(void)
 {
-	fprintf(stderr, "Usage: ... prio bands NUMBER priomap P1 P2...\n");
+	fprintf(stderr, "Usage: ... prio [multiqueue] bands NUMBER priomap P1 P2...\n");
 }
 
 #define usage() return(-1)
@@ -39,7 +39,7 @@ static int prio_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct n
 	int ok=0;
 	int pmap_mode = 0;
 	int idx = 0;
-	struct tc_prio_qopt opt={3,{ 1, 2, 2, 2, 1, 2, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 }};
+	struct tc_prio_qopt opt={3,{ 1, 2, 2, 2, 1, 2, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 },0};
 
 	while (argc > 0) {
 		if (strcmp(*argv, "bands") == 0) {
@@ -57,7 +57,9 @@ static int prio_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct n
 				return -1;
 			}
 			pmap_mode = 1;
-		} else if (strcmp(*argv, "help") == 0) {
+		} else if (strcmp(*argv, "multiqueue") == 0)
+			opt.multiqueue = 1;
+		else if (strcmp(*argv, "help") == 0) {
 			explain();
 			return -1;
 		} else {
@@ -105,6 +107,7 @@ int prio_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
 	if (RTA_PAYLOAD(opt)  < sizeof(*qopt))
 		return -1;
 	qopt = RTA_DATA(opt);
+	fprintf(f, "multiqueue %s  ", qopt->multiqueue ? "on" : "off");
 	fprintf(f, "bands %u priomap ", qopt->bands);
 	for (i=0; i<=TC_PRIO_MAX; i++)
 		fprintf(f, " %d", qopt->priomap[i]);


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

* Re: [PATCH] IPROUTE: Modify tc for new PRIO multiqueue behavior
  2007-04-25  1:39 [PATCH] IPROUTE: Modify tc for new PRIO multiqueue behavior Peter P Waskiewicz Jr
@ 2007-04-25  4:05 ` Stephen Hemminger
  2007-04-25 11:36   ` jamal
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2007-04-25  4:05 UTC (permalink / raw)
  To: Peter P Waskiewicz Jr
  Cc: netdev, linux-kernel, jgarzik, cramerj, auke-jan.h.kok,
	christopher.leech, davem

Peter P Waskiewicz Jr wrote:
> From: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
>
> Modified tc so PRIO can now have a multiqueue parameter passed to it.  This
> will turn on multiqueue behavior if a device has more than 1 queue.  Also,
> running tc qdisc ls dev <dev> will display if multiqueue is on or off.
>
> Signed-off-by: Peter P. Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
> ---
>
>  include/linux/pkt_sched.h |    1 +
>  tc/q_prio.c               |    9 ++++++---
>  2 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
> index d10f353..bab0b9e 100644
> --- a/include/linux/pkt_sched.h
> +++ b/include/linux/pkt_sched.h
> @@ -99,6 +99,7 @@ struct tc_prio_qopt
>  {
>  	int	bands;			/* Number of bands */
>  	__u8	priomap[TC_PRIO_MAX+1];	/* Map: logical priority -> PRIO band */
> +	unsigned short multiqueue;	/* 0 for no mq, 1 for mq */
>  };
>  
>  /* TBF section */
> diff --git a/tc/q_prio.c b/tc/q_prio.c
> index d696e1b..55cb207 100644
> --- a/tc/q_prio.c
> +++ b/tc/q_prio.c
> @@ -29,7 +29,7 @@
>  
>  static void explain(void)
>  {
> -	fprintf(stderr, "Usage: ... prio bands NUMBER priomap P1 P2...\n");
> +	fprintf(stderr, "Usage: ... prio [multiqueue] bands NUMBER priomap P1 P2...\n");
>  }
>  
>  #define usage() return(-1)
> @@ -39,7 +39,7 @@ static int prio_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct n
>  	int ok=0;
>  	int pmap_mode = 0;
>  	int idx = 0;
> -	struct tc_prio_qopt opt={3,{ 1, 2, 2, 2, 1, 2, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 }};
> +	struct tc_prio_qopt opt={3,{ 1, 2, 2, 2, 1, 2, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 },0};
>  
>  	while (argc > 0) {
>  		if (strcmp(*argv, "bands") == 0) {
> @@ -57,7 +57,9 @@ static int prio_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct n
>  				return -1;
>  			}
>  			pmap_mode = 1;
> -		} else if (strcmp(*argv, "help") == 0) {
> +		} else if (strcmp(*argv, "multiqueue") == 0)
> +			opt.multiqueue = 1;
> +		else if (strcmp(*argv, "help") == 0) {
>  			explain();
>  			return -1;
>  		} else {
> @@ -105,6 +107,7 @@ int prio_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
>  	if (RTA_PAYLOAD(opt)  < sizeof(*qopt))
>  		return -1;
>  	qopt = RTA_DATA(opt);
> +	fprintf(f, "multiqueue %s  ", qopt->multiqueue ? "on" : "off");
>  	fprintf(f, "bands %u priomap ", qopt->bands);
>  	for (i=0; i<=TC_PRIO_MAX; i++)
>  		fprintf(f, " %d", qopt->priomap[i]);
>
>   
Only if this binary compatiable with older kernels.

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

* Re: [PATCH] IPROUTE: Modify tc for new PRIO multiqueue behavior
  2007-04-25  4:05 ` Stephen Hemminger
@ 2007-04-25 11:36   ` jamal
  2007-04-25 17:45     ` Waskiewicz Jr, Peter P
  0 siblings, 1 reply; 5+ messages in thread
From: jamal @ 2007-04-25 11:36 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Peter P Waskiewicz Jr, netdev, linux-kernel, jgarzik, cramerj,
	auke-jan.h.kok, christopher.leech, davem

On Tue, 2007-24-04 at 21:05 -0700, Stephen Hemminger wrote:
> Peter P Waskiewicz Jr wrote:

> Only if this binary compatiable with older kernels.

It is not. But i think that is a lesser problem, the bigger question is:
Why would you need to change a qdisc just so you can support egress
multiqueues?

BTW, is there any reason this is being cced to lkml?

cheers,
jamal

PS:- I havent read the kernel patches (i am congested and about 1000
messages behind on netdev) and my opinions may be influenced by an
approach i have in trying to help someone fixup a wireless driver with
multiqueue support.


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

* RE: [PATCH] IPROUTE: Modify tc for new PRIO multiqueue behavior
  2007-04-25 11:36   ` jamal
@ 2007-04-25 17:45     ` Waskiewicz Jr, Peter P
  2007-04-26 18:49       ` Jan Engelhardt
  0 siblings, 1 reply; 5+ messages in thread
From: Waskiewicz Jr, Peter P @ 2007-04-25 17:45 UTC (permalink / raw)
  To: hadi, Stephen Hemminger
  Cc: netdev, linux-kernel, jgarzik, cramerj, Kok, Auke-jan H, Leech,
	Christopher, davem

> -----Original Message-----
> From: J Hadi Salim [mailto:j.hadi123@gmail.com] On Behalf Of jamal
> Sent: Wednesday, April 25, 2007 4:37 AM
> To: Stephen Hemminger
> Cc: Waskiewicz Jr, Peter P; netdev@vger.kernel.org; 
> linux-kernel@vger.kernel.org; jgarzik@pobox.com; cramerj; 
> Kok, Auke-jan H; Leech, Christopher; davem@davemloft.net
> Subject: Re: [PATCH] IPROUTE: Modify tc for new PRIO 
> multiqueue behavior
> 
> On Tue, 2007-24-04 at 21:05 -0700, Stephen Hemminger wrote:
> > Peter P Waskiewicz Jr wrote:
> 
> > Only if this binary compatiable with older kernels.
> 
> It is not. But i think that is a lesser problem, the bigger 
> question is:
> Why would you need to change a qdisc just so you can support 
> egress multiqueues?

The previous version of my multiqueue patches I sent for consideration
had feedback from Patrick McHardy asking that the user be able to
configure the PRIO qdisc to run with multiqueue support or not.  That is
why TC needed a modification, since I agreed with Patrick that this
would be a useful option.

All the versions of multiqueue network device support I've sent for
consideration had PRIO modified to support multiqueue devices, since it
lends itself well for the model of multiple, independent flows.

> 
> BTW, is there any reason this is being cced to lkml?

Since this change affects how tc interacts with the qdisc layer, I cced
lkml.

> 
> cheers,
> jamal
> 
> PS:- I havent read the kernel patches (i am congested and 
> about 1000 messages behind on netdev) and my opinions may be 
> influenced by an approach i have in trying to help someone 
> fixup a wireless driver with multiqueue support.

As long as someone is looking at them, I'll be happy.  :-)

Thanks,

-PJ Waskiewicz

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

* RE: [PATCH] IPROUTE: Modify tc for new PRIO multiqueue behavior
  2007-04-25 17:45     ` Waskiewicz Jr, Peter P
@ 2007-04-26 18:49       ` Jan Engelhardt
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Engelhardt @ 2007-04-26 18:49 UTC (permalink / raw)
  To: Waskiewicz Jr, Peter P
  Cc: hadi, Stephen Hemminger, netdev, linux-kernel, jgarzik, cramerj,
	Kok, Auke-jan H, Leech, Christopher, davem


On Apr 25 2007 10:45, Waskiewicz Jr, Peter P wrote:
>> 
>> BTW, is there any reason this is being cced to lkml?
>
>Since this change affects how tc interacts with the qdisc layer, I cced
>lkml.

Fine with me, at least I get to know that tc could break :)



Jan
-- 

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

end of thread, other threads:[~2007-04-26 19:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-25  1:39 [PATCH] IPROUTE: Modify tc for new PRIO multiqueue behavior Peter P Waskiewicz Jr
2007-04-25  4:05 ` Stephen Hemminger
2007-04-25 11:36   ` jamal
2007-04-25 17:45     ` Waskiewicz Jr, Peter P
2007-04-26 18:49       ` Jan Engelhardt

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