From: Patrick McHardy <kaber@trash.net>
To: Martin Devera <devik@cdi.cz>
Cc: netdev@oss.sgi.com
Subject: [PATCH]: Check for leaf-class when classifying by priority
Date: Thu, 13 Nov 2003 16:00:50 +0100 [thread overview]
Message-ID: <3FB39CA2.401@trash.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 224 bytes --]
Hi devik,
this patch makes htb_classify check if a class is a leaf when classifying
by priority. It also adds a check from cbq to skip htb_find if the majors
of skb->priority and sch->handle differ.
Best regards,
Patrick
[-- Attachment #2: htb-classify.diff --]
[-- Type: text/plain, Size: 1145 bytes --]
# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.1430 -> 1.1431
# net/sched/sch_htb.c 1.15 -> 1.16
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/11/12 kaber@trash.net 1.1431
# Check for leaf-class when classifying by priority, don't try if majors differ
# --------------------------------------------
#
diff -Nru a/net/sched/sch_htb.c b/net/sched/sch_htb.c
--- a/net/sched/sch_htb.c Thu Nov 13 15:52:28 2003
+++ b/net/sched/sch_htb.c Thu Nov 13 15:52:28 2003
@@ -303,8 +303,10 @@
rules in it */
if (skb->priority == sch->handle)
return HTB_DIRECT; /* X:0 (direct flow) selected */
- if ((cl = htb_find(skb->priority,sch)) != NULL)
- return cl;
+ if (TC_H_MAJ(skb->priority^sch->handle) == 0 &&
+ (cl = htb_find(skb->priority,sch)) != NULL)
+ if (cl->level == 0)
+ return cl;
tcf = q->filter_list;
while (tcf && (result = tc_classify(skb, tcf, &res)) >= 0) {
next reply other threads:[~2003-11-13 15:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-13 15:00 Patrick McHardy [this message]
2003-11-19 1:37 ` [PATCH]: Check for leaf-class when classifying by priority David S. 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=3FB39CA2.401@trash.net \
--to=kaber@trash.net \
--cc=devik@cdi.cz \
--cc=netdev@oss.sgi.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;
as well as URLs for NNTP newsgroup(s).