[ovs-dev] [of1.1 resend 7/7] Add basic OpenFlow 1.1 protocol support.

Ben Pfaff blp at nicira.com
Thu Jul 4 11:59:29 UTC 2013


Thanks a lot for reviewing these patches. I've wanted to get in the
OpenFlow 1.1 support for some time (it seems silly to support both earlier
and later versions but not 1.1 itself).

I'm currently on vacation but I'll get to responding to your comments and
applying these patches next week.
On Jul 3, 2013 11:35 PM, "Joe Stringer" <joe at wand.net.nz> wrote:

> On Sat, Jun 29, 2013 at 8:27 AM, Ben Pfaff <blp at nicira.com> wrote:
> > @@ -1514,7 +1593,17 @@ ofputil_decode_flow_mod(struct ofputil_flow_mod
> *fm,
> >
> >          /* Translate the message. */
> >          fm->priority = ntohs(ofm->priority);
> > -        if (ofm->command == OFPFC_ADD) {
> > +        if (oh->version == OFP11_VERSION
> > +            && (ofm->command == OFPFC_MODIFY ||
> > +                ofm->command == OFPFC_MODIFY_STRICT)
> > +            && ofm->cookie_mask == htonll(0)) {
> > +            /* In OpenFlow 1.1 only, a "modify" or "modify-strict" that
> does
> > +             * not match on the cookie is treated as an "add" if there
> is no
> > +             * match. */
> > +            fm->cookie = htonll(0);
> > +            fm->cookie_mask = htonll(0);
> > +            fm->new_cookie = ofm->cookie;
> > +        } else if (ofm->command == OFPFC_ADD) {
> >              fm->cookie = htonll(0);
> >              fm->cookie_mask = htonll(0);
> >              fm->new_cookie = ofm->cookie;
>
> Is this flowmod init code duplicated just to keep the OF1.1 comment
> separate? The first two if statements here are combined in the similar
> encode_flow_mod() code.
>
> Otherwise, the tests seem to check the OF1.1-specific behaviour, and
> they pass, so it looks pretty good to me.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20130704/2e7973f8/attachment-0004.html>


More information about the dev mailing list