[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071105143536.GC1933@ff.dom.local>
Date: Mon, 5 Nov 2007 15:35:36 +0100
From: Jarek Poplawski <jarkao2@...pl>
To: jamal <hadi@...erus.ca>
Cc: Radu Rendec <radu.rendec@...s.ro>, netdev@...r.kernel.org
Subject: Re: Endianness problem with u32 classifier hash masks
On Mon, Nov 05, 2007 at 08:47:06AM -0500, jamal wrote:
> On Mon, 2007-05-11 at 10:12 +0100, Jarek Poplawski wrote:
>
> > BTW: when looking around this I think, maybe, in u32_change():
> >
> > 1) if (--divisor > 0x100) should be probably ">=",
>
> Does it really matter? Divisor can be max of 0xff.
But, according to this max is 0x100... It doesn't really matter,
but we have to wonder which one check is correct if they differ.
>
> > but is it really needed to check this 2 times (including tc)?
>
> I dont mind letting users shoot themselves in the foot by sending crap.
> If it can be avoided with simplicity, then better.
>
> > 2) this while() loop for n->fshift could be replaced with ffs()?
>
> I think so. Can you please send a patch (after some testing of course
> maybe using Radu's test data)?
Since this would be cosmetics here, I think it could wait for this
main patch. But, since testing isn't my best side, maybe I'd ask
Radu for including this "btw"... I mean only something like this:
{
u8 i = 0;
u32 mask = s->hmask;
if (mask) {
- while (!(mask & 1)) {
- i++;
- mask>>=1;
- }
i = ffs(mask) + 1;
}
n->fshift = i;
}
Thanks,
Jarek P.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists