summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/sched/cls_u32.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index 8b870402bc96..821d3b9c5c55 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -91,6 +91,7 @@ struct tc_u_hnode
{
struct tc_u_hnode *next;
u32 handle;
+ u32 prio;
struct tc_u_common *tp_c;
int refcnt;
unsigned divisor;
@@ -323,6 +324,7 @@ static int u32_init(struct tcf_proto *tp)
root_ht->divisor = 0;
root_ht->refcnt++;
root_ht->handle = tp_c ? gen_new_htid(tp_c) : 0x80000000;
+ root_ht->prio = tp->prio;
if (tp_c == NULL) {
tp_c = kmalloc(sizeof(*tp_c), GFP_KERNEL);
@@ -587,6 +589,7 @@ static int u32_change(struct tcf_proto *tp, unsigned long base, u32 handle,
ht->refcnt = 0;
ht->divisor = divisor;
ht->handle = handle;
+ ht->prio = tp->prio;
ht->next = tp_c->hlist;
tp_c->hlist = ht;
*arg = (unsigned long)ht;
@@ -703,6 +706,8 @@ static void u32_walk(struct tcf_proto *tp, struct tcf_walker *arg)
return;
for (ht = tp_c->hlist; ht; ht = ht->next) {
+ if (ht->prio != tp->prio)
+ continue;
if (arg->count >= arg->skip) {
if (arg->fn(tp, (unsigned long)ht, arg) < 0) {
arg->stop = 1;