[ovs-dev] [PATCH] faq: Better document how to add vendor extensions.
Yi-Hung Wei
yihung.wei at gmail.com
Thu Oct 26 22:08:00 UTC 2017
On Mon, Oct 9, 2017 at 10:33 AM, Ben Pfaff <blp at ovn.org> wrote:
> Signed-off-by: Ben Pfaff <blp at ovn.org>
> ---
> Documentation/faq/contributing.rst | 44 +++++++++++++++++++++++++++-----------
> include/openvswitch/ofp-errors.h | 4 +++-
> 2 files changed, 34 insertions(+), 14 deletions(-)
>
> diff --git a/Documentation/faq/contributing.rst b/Documentation/faq/contributing.rst
> index 6dfc8bc4d436..d59376cd615c 100644
> --- a/Documentation/faq/contributing.rst
> +++ b/Documentation/faq/contributing.rst
> @@ -33,22 +33,28 @@ Q: How do I implement a new OpenFlow message?
> as needed. (If you configure with ``--enable-Werror``, as described in
> :doc:`/intro/install/general`, 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-msgs``.
> + To add an OpenFlow vendor extension message (aka experimenter message) for
> + a vendor that doesn't yet have any extension messages, you will also need
> + to edit ``build-aux/extract-ofp-msgs`` and at least ``ofphdrs_decode()``
> + and ``ofpraw_put__()`` in ``lib/ofp-msgs.c``. OpenFlow doesn't standardize
> + vendor extensions very well, so it's hard to make the process simpler than
> + that. (If you have a choice of how to design your vendor extension
> + messages, it will be easier if you make them resemble the ONF and OVS
> + extension messages.)
>
> 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. Also, add support to
Instead of ``lib/meta-flow.h``, maybe
``include/openvswitch/meta-flow.h``? Otherwise, looks good to me.
Acked-by: Yi-Hung Wei <yihung.wei at gmail.com>
More information about the dev
mailing list