Re: [ovs-dev] [xc 3/4] classifier: Add 'wc' argument to classifier_lookup().
On Thu, Jun 06, 2013 at 09:05:43AM -0700, Justin Pettit wrote: > On Jun 5, 2013, at 4:50 PM, Ben Pfaff wrote: > > > On Wed, Jun 05, 2013 at 03:21:38PM -0700, Justin Pettit wrote: > >> From: Ethan Jackson > >> > >> A future commit will want to know what bits were significant during the > >> classifier lookup. > >> > >> Co-authored-by: Justin Pettit > >> Signed-off-by: Justin Pettit > > > > 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()). */ Yes, thanks. ___ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev
Re: [ovs-dev] [xc 3/4] classifier: Add 'wc' argument to classifier_lookup().
On Jun 5, 2013, at 4:50 PM, Ben Pfaff wrote: > On Wed, Jun 05, 2013 at 03:21:38PM -0700, Justin Pettit wrote: >> From: Ethan Jackson >> >> A future commit will want to know what bits were significant during the >> classifier lookup. >> >> Co-authored-by: Justin Pettit >> Signed-off-by: Justin Pettit > > 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 dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev