Re: [PATCH] cls_u32 u32_classify()
From: jamal <[EMAIL PROTECTED]> Date: Tue, 19 Feb 2008 06:54:48 -0500 > On Mon, 2008-18-02 at 21:46 -0800, David Miller wrote: > > > > Can some u32 expert review this? > > http://marc.info/?l=linux-netdev&m=120178638323045&w=2 Fair enough. Dzianis, please provide the feedback Jamal is asking for. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] cls_u32 u32_classify()
On Mon, 2008-18-02 at 21:46 -0800, David Miller wrote: > Can some u32 expert review this? http://marc.info/?l=linux-netdev&m=120178638323045&w=2 cheers, jamal -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] cls_u32 u32_classify()
From: Dzianis Kahanovich <[EMAIL PROTECTED]> Date: Wed, 30 Jan 2008 11:16:30 -0200 > 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. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] cls_u32 u32_classify() +
On Wed, 2008-30-01 at 11:31 -0200, Dzianis Kahanovich wrote: > Currently fine u32 "hashkey ... at ..." not work with relative offsets. > There are simpliest fix to use "eat". > (sorry, v2) > Hi, Please send me the commands you are trying to run that motivated this patch. cheers, jamal -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] cls_u32 u32_classify() +
Currently fine u32 "hashkey ... at ..." not work with relative offsets. There are simpliest fix to use "eat". (sorry, v2) -- WBR, Denis Kaganovich, [EMAIL PROTECTED] http://mahatma.bspu.unibel.by diff -pruN linux-2.6.orig/net/sched/cls_u32.c linux-2.6/net/sched/cls_u32.c --- linux-2.6.orig/net/sched/cls_u32.c 2008-01-29 23:02:50.0 +0200 +++ linux-2.6/net/sched/cls_u32.c 2008-01-30 11:28:00.0 +0200 @@ -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 && ptr+n->sel.hoff < skb_tail_pointer(skb)) + sel = ht->divisor&u32_hash_fold(*(u32*)(ptr+n->sel.hoff), &n->sel,n->fshift); + if (ptr < skb_tail_pointer(skb)) goto next_ht; }
[PATCH] cls_u32 u32_classify() ++
Currently fine u32 "hashkey ... at ..." not work with relative offsets. There are simpliest fix to use "eat". (sorry, i'm idiot) -- WBR, Denis Kaganovich, [EMAIL PROTECTED] http://mahatma.bspu.unibel.by diff -pruN linux-2.6.orig/net/sched/cls_u32.c linux-2.6/net/sched/cls_u32.c --- linux-2.6.orig/net/sched/cls_u32.c 2008-01-29 23:02:50.0 +0200 +++ linux-2.6/net/sched/cls_u32.c 2008-01-30 11:37:31.0 +0200 @@ -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 && ptr+n->sel.hoff+4 < skb_tail_pointer(skb)) + sel = ht->divisor&u32_hash_fold(*(u32*)(ptr+n->sel.hoff), &n->sel,n->fshift); + if (ptr < skb_tail_pointer(skb)) goto next_ht; }
[PATCH] cls_u32 u32_classify()
Currently fine u32 "hashkey ... at ..." not work with relative offsets. There are simpliest fix to use "eat". -- WBR, Denis Kaganovich, [EMAIL PROTECTED] http://mahatma.bspu.unibel.by diff -pruN linux-2.6.orig/net/sched/cls_u32.c linux-2.6/net/sched/cls_u32.c --- linux-2.6.orig/net/sched/cls_u32.c 2008-01-29 23:02:50.0 +0200 +++ linux-2.6/net/sched/cls_u32.c 2008-01-30 10:56:11.0 +0200 @@ -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; }