Hi Ben, Thank you very much for your clarification on the operation!
Yimin On Tue, May 22, 2012 at 2:15 PM, Ben Pfaff <[email protected]> wrote: > On Tue, May 22, 2012 at 02:11:35PM +0800, YIMIN CHEN wrote: >> I am working on ovs code based on openvswitch-1.1.0pre2, it is kinda >> of old, I know. I ran across this code that I am having hard time >> understanding. If anyone is familiar with this part of code, could you >> please help me? >> >> >> if (!(field_wc & (field_wc - 1))) { <================== if field_wc > > The expression '!(x & (x - 1))' is true if exactly one bit in 'x' is set > to 1 (or if x is zero). _______________________________________________ discuss mailing list [email protected] http://openvswitch.org/mailman/listinfo/discuss
