From: Robert Love Date: Sat, 2 May 2009 20:48:32 +0000 (-0700) Subject: net: Only store high 16 bits of kernel generated filter priorities X-Git-Tag: v3.0~9075^2~78 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d0ab8ff81bf1b01bae7d6b92ca067badbbb02cc9;p=platform%2Fkernel%2Flinux-amlogic.git net: Only store high 16 bits of kernel generated filter priorities 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 Signed-off-by: David S. Miller --- 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;