Thomas Graf wrote:
* Patrick McHardy <[EMAIL PROTECTED]> 2005-07-23 06:39
I'm trying to convert tc_index to a u16, which looks OK in all places
but sched_gred. I can't make sense of this code:
/* fix tc_index? --could be controvesial but needed for
requeueing */
skb->tc_index=(skb->tc_index&0xfffffff0) | t->def;
Why is a mask of 0xfffffff0 used? It shouldn't be larger than 0xffff
anyway.
It doesn't really matter, my red patchset will change this to:
#define MAX_DPs 16
#define GRED_VQ_MASK (MAX_DPs - 1)
skb->tc_index = (skb->tc_index & ~GRED_VQ_MASK) | dp;
We can cast GRED_VQ_MASK to u16 if needed.
Great, thanks. Patch coming up in a couple of minutes :)
Regards
Patrick
-
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