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

YAMAMOTO Takashi yamamoto at valinux.co.jp
Mon Oct 6 03:41:03 UTC 2014


> 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>



More information about the dev mailing list