FAQ: Describe how to add new fields and new actions.
authorBen Pfaff <blp@nicira.com>
Thu, 6 Nov 2014 21:48:39 +0000 (13:48 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 6 Nov 2014 21:48:39 +0000 (13:48 -0800)
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@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
FAQ.md

diff --git a/FAQ.md b/FAQ.md
index 2191292..7621c40 100644 (file)
--- 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 action for a vendor
+   that doesn't yet have any extension actions, then you will also
+   need to edit build-aux/extract-ofp-actions.
+
 
 Contact 
 -------