On Fri, Aug 30, 2013 at 04:30:39PM +0900, Simon Horman wrote: > On Thu, Aug 29, 2013 at 02:00:51PM -0700, Ben Pfaff wrote: > > From: Neil Zhu <z...@centecnetworks.com> > > > > This doesn't include a dpif implementation of groups functionality. In its > > current form, it is untested. Before this is committed, it needs some > > more comments and an ovs-ofctl manpage update. > > > > Signed-off-by: Neil Zhu <z...@centecnetworks.com> > > Co-authored-by: Ben Pfaff <b...@nicira.com> > > Signed-off-by: Ben Pfaff <b...@nicira.com> > > ... > > > +ofputil_decode_group_stats_reply(struct ofpbuf *msg, > > + struct ofputil_group_stats *gs) > > +{ > > + struct ofp11_bucket_counter *obc; > > + struct ofp11_group_stats *ogs11; > > + enum ofpraw raw; > > + enum ofperr error; > > + size_t base_len; > > + size_t length; > > + size_t i; > > + > > + if (!msg->size) { > > + return EOF; > > + } > > + > > + error = (msg->l2 > > + ? ofpraw_decode(&raw, msg->l2) > > + : ofpraw_pull(&raw, msg)); > > + if (error) { > > + return error; > > + } > > It seems to me that the msg->size check should appear after > the ofpraw_decode()/ofpraw_pull() call in order to allow for > a stats reply with an empty array of stats.
You're right. Thanks a lot, I've now moved it. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev