On Mon, 2005-25-07 at 03:31 +0200, Thomas Graf wrote: > Anyways, tc_verd needs a serious cleanup, not just for the > macros which we might want to replace with bitfields or > at least have generic macros to generate the masks.
Right - and as we discussed: -> recall that the use of bit operations is for performance reasons. So if the compiler is smart enough to use bit operations _instead of copying_ when you have bitfields then we should be fine (although comment somewhere on gcc version etc) -> OTOH, if you find above not to be the case then writing generic macros which provide the following operations: GET(register, bit_offset, bit_length) SET(register, bit_offset, bit_length, value) would be valuable not just for the actions but other spots in the kernel as well (I couldnt find such ops hence those macros are stolen from somewhere in some MIPS code) 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