[ovs-dev] [groups v3] Implement OpenFlow 1.1+ "groups" protocol.
Ben Pfaff
blp at nicira.com
Fri Aug 30 16:37:10 UTC 2013
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 <zhuj at 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 <zhuj at centecnetworks.com>
> > Co-authored-by: Ben Pfaff <blp at nicira.com>
> > Signed-off-by: Ben Pfaff <blp at 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.
More information about the dev
mailing list