> Bit 0 of 'src' is the bit with value 1 in
> + * src[src_len - 1], bit 1 is the bit with value 2, bit 8 is the bit with 
> value
> + * 1 in src[src_len - 2], and so on, and similarly for 'dst'.

I find this bit of the comments a bit confusing.  My understanding, is
that you are basically saying that the  data is in network byte order?
 If so it may be worth stating that explicitly? When you use the word
'value' in this comment do you perhaps mean 'index' instead?

> + * Required invariants:
> + *   src_ofs + n_bits <= src_len * 8
> + *   dst_ofs + n_bits <= dst_len * 8
> + *   'src' and 'dst' must not overlap.

I think it would be trivial to assert these invariants.  Seems worth it to me.

Do you expect much churn in this code?  If so would it be worth unit
testing?  I don't feel strongly about it.

Looks good,
Ethan
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to