From: Jarek Poplawski <jarkao2@gmail.com>
To: Denys Fedoryshchenko <denys@visp.net.lb>
Cc: netdev@vger.kernel.org
Subject: [PATCH] Re: SFQ depth limit
Date: Sun, 29 Jun 2008 21:11:13 +0200 [thread overview]
Message-ID: <20080629191113.GA8817@ami.dom.local> (raw)
In-Reply-To: <200806282202.59581.denys@visp.net.lb>
Denys Fedoryshchenko wrote, On 06/28/2008 09:02 PM:
> Hi
>
> Is there any particular reason to limit SFQ depth to 127 packets?
> #define SFQ_DEPTH 128
>
> Just to buffer data on 1Gbps rate for 1 second i need 87k packets, let's say just for 10ms buffer - 873 packets, which is out of limit.
> Also if i will use external SFQ flow classifier made by Patrick McHardy, let's say for 4096 ip's, i am not sure also if i hit this limit.
> As i understand, if i increase it - it will increase also data structures size in memory.
Hi,
Yes, this 128 limit is extremely low, but changing this is not enough:
you've to change at least sfq_index typedef too, eg. to unsigned short,
but I didn't check if this is all.
> And probably i hit some unknown issue.
> Example:
> tc qdisc add dev eth0 handle 1 root sfq
> tc filter add dev eth0 protocol ip pref 1 parent 1: handle 1 flow hash keys dst divisor 1024
...
> MegaRouterCore-KARAM ~ #tc -s -d qdisc show dev eth0
> qdisc sfq 1: root limit 127p quantum 1514b flows 127/1024
> Sent 16232 bytes 118 pkt (dropped 9, overlimits 0 requeues 0)
> rate 0bit 0pps backlog 0b 0p requeues 0
>
> after that host is dead...
If it's with vanilla kernel something is wrong, but I couldn't
reproduce this: probably some additianal data is needed. BTW,
I see this "flows" number above isn't very useful, as it always
repeats "limit". I attach a patch proposal to change this.
Regards,
Jarek P.
----------------------->
sch_sfq: dump a real number of flows
Dump the "flows" number according to the number of active flows
instead of repeating the "limit".
Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
---
net/sched/sch_sfq.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
index f0463d7..5bc78c3 100644
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -536,7 +536,14 @@ static int sfq_dump(struct Qdisc *sch, struct sk_buff *skb)
opt.limit = q->limit;
opt.divisor = SFQ_HASH_DIVISOR;
- opt.flows = q->limit;
+ opt.flows = 0;
+ if (q->tail != SFQ_DEPTH) {
+ unsigned int i;
+
+ for (i = 0; i < SFQ_HASH_DIVISOR; i++)
+ if (q->ht[i] != SFQ_DEPTH)
+ opt.flows++;
+ }
NLA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt);
next prev parent reply other threads:[~2008-06-29 19:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-28 19:02 SFQ depth limit Denys Fedoryshchenko
2008-06-29 19:11 ` Jarek Poplawski [this message]
2008-06-29 19:38 ` [PATCH] " Denys Fedoryshchenko
2008-07-24 4:34 ` David Miller
2008-07-24 8:45 ` Patrick McHardy
2008-07-24 9:49 ` Jarek Poplawski
2008-07-24 9:57 ` Patrick McHardy
2008-07-24 10:53 ` [PATCH] pkt_sched: sch_sfq: revert "dump a real number of flows" patch Jarek Poplawski
2008-07-26 9:29 ` David Miller
2008-07-26 10:58 ` Jarek Poplawski
2008-07-27 0:24 ` David Miller
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=20080629191113.GA8817@ami.dom.local \
--to=jarkao2@gmail.com \
--cc=denys@visp.net.lb \
--cc=netdev@vger.kernel.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 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).