* [PATCH] net: Only store high 16 bits of kernel generated filter priorities
@ 2009-05-02 20:43 Robert Love
2009-05-02 20:48 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Robert Love @ 2009-05-02 20:43 UTC (permalink / raw)
To: hadi, netdev; +Cc: davem, robert.w.love, jeffrey.t.kirsher
The kernel should only be using the high 16 bits of a kernel
generated priority. Filter priorities in all other cases only
use the upper 16 bits of the u32 'prio' field of 'struct tcf_proto',
but when the kernel generates the priority of a filter is saves all
32 bits which can result in incorrect lookup failures when a filter
needs to be deleted or modified.
Signed-off-by: Robert Love <robert.w.love@intel.com>
---
net/sched/cls_api.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 173fcc4..0759f32 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -254,7 +254,7 @@ replay:
}
tp->ops = tp_ops;
tp->protocol = protocol;
- tp->prio = nprio ? : tcf_auto_prio(*back);
+ tp->prio = nprio ? : TC_H_MAJ(tcf_auto_prio(*back));
tp->q = q;
tp->classify = tp_ops->classify;
tp->classid = parent;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: Only store high 16 bits of kernel generated filter priorities
2009-05-02 20:43 [PATCH] net: Only store high 16 bits of kernel generated filter priorities Robert Love
@ 2009-05-02 20:48 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-05-02 20:48 UTC (permalink / raw)
To: robert.w.love; +Cc: hadi, netdev, jeffrey.t.kirsher
From: Robert Love <robert.w.love@intel.com>
Date: Sat, 02 May 2009 13:43:20 -0700
> The kernel should only be using the high 16 bits of a kernel
> generated priority. Filter priorities in all other cases only
> use the upper 16 bits of the u32 'prio' field of 'struct tcf_proto',
> but when the kernel generates the priority of a filter is saves all
> 32 bits which can result in incorrect lookup failures when a filter
> needs to be deleted or modified.
>
> Signed-off-by: Robert Love <robert.w.love@intel.com>
Applied, thanks Robert!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-02 20:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-02 20:43 [PATCH] net: Only store high 16 bits of kernel generated filter priorities Robert Love
2009-05-02 20:48 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox