From: Andy Furniss <andy.furniss@dsl.pipex.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] ESFQ?
Date: Tue, 11 Jan 2005 23:06:27 +0000 [thread overview]
Message-ID: <41E45BF3.1040208@dsl.pipex.com> (raw)
In-Reply-To: <41DAB1B4.6030902@expertron.co.za>
Thomas Graf wrote:
> * Andy Furniss <41E3F088.6060708@dsl.pipex.com> 2005-01-11 15:28
>
>>diff -urN linux-2.6.10.orig/include/linux/pkt_sched.h linux-2.6.10/include/linux/pkt_sched.h
>>@@ -136,6 +143,7 @@
>> __u32 limit; /* Maximal packets in queue */
>> unsigned divisor; /* Hash divisor */
>> unsigned flows; /* Maximal number of flows */
>>+ unsigned hash_kind; /* Hash function to use for flow identification */
>> };
>
>
> This breaks compatibility to older iproute2 versions
> compiled with older header versions (not including
> the additional 4 octets). sch_sfq.c:
>
> if (opt->rta_len < RTA_LENGTH(sizeof(*ctl)))
> return -EINVAL;
I did wonder if it could just come out now that iproute2 uses its own
pkt_sched.h.
Just to be sure I understand - it's a risk that always existed eg.
before Stephen maintained iproute2, when it compiled against kernel
headers. If I patched kernel and failed to compile new tc/had old tc
ahead in path etc. then sfq would be broken.
So if you patch make sure you build and use new tc do tc -V / check you
don't have an old one in /sbin as iproute2's make install uses /usr/sbin
by default.
>
>>+static int esfq_change(struct Qdisc *sch, struct rtattr *opt)
>>+{
>>+ struct esfq_sched_data *q = qdisc_priv(sch);
>>+ struct tc_sfq_qopt *ctl = RTA_DATA(opt);
>>+ int old_perturb = q->perturb_period;
>>+
>>+ if (opt->rta_len < RTA_LENGTH(sizeof(*ctl)))
>>+ return -EINVAL;
>>+
>>+ sch_tree_lock(sch);
>>+ q->quantum = ctl->quantum ? : psched_mtu(sch->dev);
>>+ q->perturb_period = ctl->perturb_period*HZ;
>>+// q->hash_divisor = ctl->divisor;
>>+// q->tail = q->limit = q->depth = ctl->flows;
>>+
>>+ if (ctl->limit)
>>+ q->limit = min_t(u32, ctl->limit, q->depth);
>>+
>>+ if (ctl->hash_kind) {
>>+ q->hash_kind = ctl->hash_kind;
>>+ if (q->hash_kind != TCA_SFQ_HASH_CLASSIC)
>>+ q->perturb_period = 0;
>>+ }
>>+
>>+ // is sch_tree_lock enough to do this ?
>>+ while (sch->q.qlen >= q->limit-1)
>>+ esfq_drop(sch);
>>+
>>+ if (old_perturb)
>>+ del_timer(&q->perturb_timer);
>>+ if (q->perturb_period) {
>>+ q->perturb_timer.expires = jiffies + q->perturb_period;
>>+ add_timer(&q->perturb_timer);
>>+ } else {
>>+ q->perturbation = 0;
>>+ }
>>+ sch_tree_unlock(sch);
>>+ return 0;
>>+}
>
>
> Must be changed to use tcf_exts and ematch api once those patches
> are merged. I will take care of this.
>
> I'll have a closer look later on this week.
>
Thanks.
Andy.
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next prev parent reply other threads:[~2005-01-11 23:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-04 15:09 [LARTC] ESFQ? Justin Schoeman
2005-01-04 18:04 ` Jonathan Day
2005-01-05 7:18 ` Justin Schoeman
2005-01-05 8:20 ` Andy Furniss
2005-01-05 8:46 ` Justin Schoeman
2005-01-11 15:28 ` Andy Furniss
2005-01-11 15:33 ` Brian Carrig
2005-01-11 15:51 ` Justin Schoeman
2005-01-11 20:38 ` Thomas Graf
2005-01-11 23:06 ` Andy Furniss [this message]
2005-01-12 0:21 ` Stephen Hemminger
2005-01-12 1:08 ` Andy Furniss
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=41E45BF3.1040208@dsl.pipex.com \
--to=andy.furniss@dsl.pipex.com \
--cc=lartc@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