From: Hagen Paul Pfeifer <hagen@jauu.net>
To: netdev@vger.kernel.org
Cc: shemminger@vyatta.com
Subject: [PATCH] tc: add new queue discipline: head drop fifo
Date: Sun, 24 Jan 2010 23:31:05 +0100 [thread overview]
Message-ID: <1264372265-31442-1-git-send-email-hagen@jauu.net> (raw)
This adds the required changes to gain access to
the head drop classfull queuing discipline named
pfifo_head_drop. In difference to pfifo or pfifo_fast
this queuing discipline will drop the first packet
in the case of queue congestion. As a result the queue
contain always the freshest packets.
To replace the current a root queueing discipline
for eth0:
$ tc qdisc replace dev eth0 root pfifo_head_drop
And show statistics:
$ tc -s qdisc show dev eth0
Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
tc/q_fifo.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/tc/q_fifo.c b/tc/q_fifo.c
index f561752..6242a98 100644
--- a/tc/q_fifo.c
+++ b/tc/q_fifo.c
@@ -25,7 +25,7 @@
static void explain(void)
{
- fprintf(stderr, "Usage: ... [p|b]fifo [ limit NUMBER ]\n");
+ fprintf(stderr, "Usage: ... <[p|b]fifo | pfifo_head_drop> [ limit NUMBER ]\n");
}
static int fifo_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n)
@@ -89,6 +89,12 @@ struct qdisc_util pfifo_qdisc_util = {
.print_qopt = fifo_print_opt,
};
+struct qdisc_util pfifo_head_drop_qdisc_util = {
+ .id = "pfifo_head_drop",
+ .parse_qopt = fifo_parse_opt,
+ .print_qopt = fifo_print_opt,
+};
+
extern int prio_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt);
struct qdisc_util pfifo_fast_qdisc_util = {
.id = "pfifo_fast",
--
1.6.6.196.g1f735.dirty
reply other threads:[~2010-01-24 22:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1264372265-31442-1-git-send-email-hagen@jauu.net \
--to=hagen@jauu.net \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox