All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
To: shemminger@linux-foundation.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	jgarzik@pobox.com, cramerj@intel.com, auke-jan.h.kok@intel.com,
	christopher.leech@intel.com, davem@davemloft.net
Subject: [PATCH] IPROUTE: Modify tc for new PRIO multiqueue behavior
Date: Tue, 24 Apr 2007 18:39:20 -0700	[thread overview]
Message-ID: <20070425013920.6031.30149.stgit@gitlost.site> (raw)

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


             reply	other threads:[~2007-04-25  1:22 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-25  1:39 Peter P Waskiewicz Jr [this message]
2007-04-25  4:05 ` [PATCH] IPROUTE: Modify tc for new PRIO multiqueue behavior Stephen Hemminger
2007-04-25 11:36   ` jamal
2007-04-25 17:45     ` Waskiewicz Jr, Peter P
2007-04-26 13:27       ` jamal
2007-04-26 15:57         ` Patrick McHardy
2007-04-26 16:30           ` Waskiewicz Jr, Peter P
2007-04-26 16:44             ` Patrick McHardy
2007-04-26 16:50               ` Waskiewicz Jr, Peter P
2007-04-27 15:09             ` jamal
2007-04-27 15:45               ` Waskiewicz Jr, Peter P
2007-04-30 12:56                 ` jamal
2007-05-01 18:27                   ` Waskiewicz Jr, Peter P
2007-05-01 22:11                     ` jamal
2007-05-01 23:04                       ` Waskiewicz Jr, Peter P
2007-05-02 12:43                         ` jamal
2007-05-03 21:03                           ` Waskiewicz Jr, Peter P
2007-05-03 23:54                             ` jamal
2007-05-04 15:48                               ` Waskiewicz Jr, Peter P
2007-05-04 20:01                             ` Stephen Hemminger
2007-05-04 20:06                               ` David Miller
2007-05-04 20:43                               ` Waskiewicz Jr, Peter P
2007-05-04 21:00                                 ` David Miller
2007-05-04 21:22                                 ` Johannes Berg
2007-05-08  9:33                                   ` Zhu Yi
2007-05-08  9:45                                     ` Johannes Berg
2007-05-08 13:28                                       ` jamal
2007-05-08 15:35                                         ` Waskiewicz Jr, Peter P
2007-05-08 23:28                                           ` jamal
2007-05-10  3:02                                             ` Zhu Yi
2007-05-10 12:35                                               ` jamal
2007-05-11  1:58                                                 ` Zhu Yi
2007-05-11  2:23                                                   ` jamal
2007-05-10 18:22                                             ` Waskiewicz Jr, Peter P
2007-05-10 20:00                                               ` jamal
2007-05-09 14:16                                         ` Johannes Berg
2007-04-27 14:58           ` jamal
2007-04-27 15:43             ` Jeff Garzik
2007-04-27 15:46               ` Waskiewicz Jr, Peter P
2007-04-26 18:49       ` Jan Engelhardt

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=20070425013920.6031.30149.stgit@gitlost.site \
    --to=peter.p.waskiewicz.jr@intel.com \
    --cc=auke-jan.h.kok@intel.com \
    --cc=christopher.leech@intel.com \
    --cc=cramerj@intel.com \
    --cc=davem@davemloft.net \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.