On Jun 5, 2013, at 4:50 PM, Ben Pfaff <[email protected]> wrote:

> On Wed, Jun 05, 2013 at 03:21:38PM -0700, Justin Pettit wrote:
>> From: Ethan Jackson <[email protected]>
>> 
>> A future commit will want to know what bits were significant during the
>> classifier lookup.
>> 
>> Co-authored-by: Justin Pettit <[email protected]>
>> Signed-off-by: Justin Pettit <[email protected]>
> 
> The comment on classifier_lookup() is misleading in an important way.
> It says that the function "sets" wc but in fact it just bitwise-ORs
> 1-bits into 'wc', that is, it doesn't initialize 'wc' to zeros at the
> beginning.

Great point.  How about the following comment:

/* If a rule is found and 'wc' is non-null, bitwise-OR's 'wc' with the
 * set of bits that were significant in the lookup.  At some point
 * earlier, 'wc' should have been initialized (e.g., by
 * flow_wildcards_init_catchall()). */

--Justin


_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to