On Sun, Oct 18, 2015 at 10:58:35AM -0700, Justin Pettit wrote: > > > On Oct 17, 2015, at 2:07 PM, Ben Pfaff <b...@nicira.com> wrote: > > > > > > + if (!port && sf->field->id == MFF_REG6) { > > Is there a reason you're using MFF_REG6 instead of MFF_IN_PORT?
MFF_LOG_INPORT, which is what I want, wasn't available here. We've run into this problem before. I'm going to propose moving the MFF_LOG_* definitions into a new header. I'll post a v3 of the series that does that. > > + sf = ofpact_put_SET_FIELD(ofpacts); > > + sf->field = mf_from_id(MFF_IN_PORT); > > + bitwise_put(UINT64_MAX, &sf->mask, sf->field->n_bytes, 0, > > + sf->field->n_bits); > > Is there a reason to use this instead of bitwise_one(), which seems to > have clearer intent? The code right above doesn't do it either, so > I'm just curious if it's not equivalent. bitwise_one() works nicely too. Previously, I guess I used bitwise_put() because it had the same form as the bitwise_put() in the pairing of value and mask: bitwise_put(port, &sf->value, sf->field->n_bytes, 0, sf->field->n_bits); bitwise_put(UINT64_MAX, &sf->mask, sf->field->n_bytes, 0, sf->field->n_bits); and then in this case I just cut-and-paste the code. I'll change them both to bitwise_one(). > Acked-by: Justin Pettit <jpet...@nicira.com> Thanks, I'll post v3 in a few minutes. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev