cls_u32 u32_classify()
Subsystems (3)
PATCH 1/1 cls_u32 u32_classify()
Currently fine u32 "hashkey ... at ..." not work with relative offsets. There are simpliest fix to use "eat".
Signature · 2 lines
WBR, Denis Kaganovich, [email protected] http://mahatma.bspu.unibel.by
net/sched/cls_u32.c +8 -3
@@ -181,11 +181,13 @@ check_terminal: ht = n->ht_down; sel =0 ; -if (ht->divisor) - sel = ht->divisor&u32_hash_fold (*(u32 *)(ptr+n->sel.hoff), &n->sel,n->fshift); -if (!(n->sel.flags&(TC_U32_VAROFFSET |TC_U32_OFFSET |TC_U32_EAT ))) +if (!(n->sel.flags&(TC_U32_VAROFFSET |TC_U32_OFFSET |TC_U32_EAT ))) { +if (!ht->divisor) + goto next_ht; + sel = ht->divisor&u32_hash_fold (*(u32 *)(ptr+n->sel.hoff), &n->sel,n->fshift); goto next_ht; + }if (n->sel.flags&(TC_U32_OFFSET |TC_U32_VAROFFSET )) { off2 = n->sel.off +3 ;
@@ -198,6 +200,9 @@ check_terminal: off2 =0 ; } +if (ht->divisor) + sel = ht->divisor&u32_hash_fold (*(u32 *)(ptr+n->sel.hoff), &n->sel,n->fshift); +if (ptr <skb_tail_pointer (skb)) goto next_ht; }
David Miller
maintainerFrom: Dzianis Kahanovich <[email protected]>
Date: Wed, 30 Jan 2008 11:16:30 -0200
Quoted 2 lines
Currently fine u32 "hashkey ... at ..." not work with relative offsets. There are simpliest fix to use "eat".
So the question is whether 'sel' is defined to be calculated before all offsets and EAT operations are processed or before.
I do not understand the U32 classifier enough to know what this kind of change might or might not break.
Can some u32 expert review this?
Thanks.
Quoted 1 line · David Miller
Can some u32 expert review this?
http://marc.info/?l=linux-netdev&m=120178638323045&w=2
cheers,
jamal
David Miller
maintainerFrom: jamal <[email protected]>
Date: Tue, 19 Feb 2008 06:54:48 -0500
Quoted 6 lines · David Miller
Quoted 3 lines
Can some u32 expert review this?
Fair enough.
Dzianis, please provide the feedback Jamal is asking for.