[ovs-dev] [PATCH] FAQ: Describe how to add new fields and new actions.

Andy Zhou azhou at nicira.com
Thu Nov 6 21:20:41 UTC 2014


I am in the process adding a new action. The steps described are good
starting points.  Thanks for documenting them.

Acked-by: Andy Zhou <azhou at nicira.com>


On Tue, Nov 4, 2014 at 10:59 AM, Ben Pfaff <blp at nicira.com> wrote:
> We get these questions from time to time and it would be nice to just be
> able to cut and paste the answer.  (And possibly some people might actually
> read the answer straight from the FAQ.)
>
> Signed-off-by: Ben Pfaff <blp at nicira.com>
> ---
>  FAQ.md |   23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
>
> diff --git a/FAQ.md b/FAQ.md
> index 2191292..e349a26 100644
> --- a/FAQ.md
> +++ b/FAQ.md
> @@ -1636,6 +1636,29 @@ A: Add your new message to "enum ofpraw" and "enum ofptype" in
>     vendor that doesn't yet have any extension messages, then you will
>     also need to edit build-aux/extract-ofp-msgs.
>
> +### Q: How do I add support for a new field or header?
> +
> +A: Add new members for your field to "struct flow" in lib/flow.h, and
> +   add new enumerations for your new field to "enum mf_field_id" in
> +   lib/meta-flow.h, following the existing pattern.  Then recompile
> +   and fix all of the new warnings, implementing new functionality for
> +   the new field or header as needed.  (If you configure with
> +   --enable-Werror, as described in [INSTALL.md], then it is
> +   impossible to miss any warnings.)
> +
> +### Q: How do I add support for a new OpenFlow action?
> +
> +A: Add your new action to "enum ofp_raw_action_type" in
> +   lib/ofp-actions.c, following the existing pattern.  Then recompile
> +   and fix all of the new warnings, implementing new functionality for
> +   the new action as needed.  (If you configure with --enable-Werror,
> +   as described in [INSTALL.md], then it is impossible to miss any
> +   warnings.)
> +
> +   If you need to add an OpenFlow vendor extension message for a
> +   vendor that doesn't yet have any extension messages, then you will
> +   also need to edit build-aux/extract-ofp-actions.
> +
>
>  Contact
>  -------
> --
> 1.7.10.4
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev



More information about the dev mailing list