[ovs-dev] [PATCH 13/41] ofp-util: Improve function to emit a bitmap property.

Ben Pfaff blp at ovn.org
Wed Jan 20 16:25:08 UTC 2016


On Tue, Jan 19, 2016 at 01:21:52PM -0800, Jarno Rajahalme wrote:
> With a minor nit below:
> 
> Acked-by: Jarno Rajahalme <jarno at ovn.org>

Thanks, applied (also the two previous patches).

> > On Jan 18, 2016, at 11:27 PM, Ben Pfaff <blp at ovn.org> wrote:
> > 
> > The callers had some common code that could be reasonably encapsulated, so
> > this commit does so.
> > 
> > Signed-off-by: Ben Pfaff <blp at ovn.org>
> > ---
> > lib/ofp-util.c | 25 +++++++++++--------------
> > 1 file changed, 11 insertions(+), 14 deletions(-)
> > 
> > diff --git a/lib/ofp-util.c b/lib/ofp-util.c
> > index 58f7e23..0c0b571 100644
> > --- a/lib/ofp-util.c
> > +++ b/lib/ofp-util.c
> > @@ -209,12 +209,16 @@ end_property(struct ofpbuf *msg, size_t start_ofs)
> >     ofpbuf_padto(msg, ROUND_UP(msg->size, 8));
> > }
> > 
> > +/* Appends a property to 'msg' whose type is 'type' and whose contents is a
> > + * series of property headers, one for each 1-bit in 'bitmap'. */
> > static void
> > -put_bitmap_properties(struct ofpbuf *msg, uint64_t bitmap)
> > +put_bitmap_property(struct ofpbuf *msg, uint16_t type, uint64_t bitmap)
> > {
> > +    size_t start_ofs = start_property(msg, type);
> 
> Add an empty line here?

OK, done.



More information about the dev mailing list