[ovs-dev] [PATCH v2 06/12] ofp-actions: Support OF1.5 (draft) masked Set-Field, merge with reg_load.

Ben Pfaff blp at nicira.com
Tue Oct 7 23:55:10 UTC 2014


On Mon, Oct 06, 2014 at 12:41:03PM +0900, YAMAMOTO Takashi wrote:
> > OpenFlow 1.5 (draft) extends the OFPAT_SET_FIELD action originally
> > introduced in OpenFlow 1.2 so that it can set not just entire fields but
> > any subset of bits within a field as well.  This commit adds support for
> > that feature when OpenFlow 1.5 is used.
> > 
> > With this feature, OFPAT_SET_FIELD becomes a superset of NXAST_REG_LOAD.
> > Thus, this commit merges the implementations of the two actions into a
> > single ofpact_set_field.
> > 
> > ONF-JIRA: EXT-314
> > Signed-off-by: Ben Pfaff <blp at nicira.com>
> 
> > diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c
> > index eed5a08..19dfe13 100644
> > --- a/lib/ofp-parse.c
> > +++ b/lib/ofp-parse.c
> > @@ -381,6 +381,7 @@ parse_ofp_str__(struct ofputil_flow_mod *fm, int command, char *string,
> >                          return error;
> >                      }
> >                      error = str_to_be64(mask + 1, &fm->cookie_mask);
> > +                    fm->cookie &= fm->cookie_mask;
> >  
> >                      /* Matching of the cookie is only supported through NXM or
> >                       * OF1.1+. */
> 
> this hunk looks unrelated.
> 
> otherwise the code looks reasonable to me.
> Acked-by: YAMAMOTO Takashi <yamamoto at valinux.co.jp>

Thanks!  I've removed that hunk and added your ack.  Jarno separately
pointed out some different suspicious code in this change, so I'll
work that out with him before I apply this.



More information about the dev mailing list