Re: [ovs-dev] [PATCH v2] doc: Added OVS Extensions document

2019-10-04 Thread Ben Pfaff
On Wed, Oct 02, 2019 at 10:23:05AM -0700, Ashish Varma wrote:
> OVS supports OVS Extensions as various vendor messages or as vendor
> types in stats or multipart messages. Added a document to describe the
> extensions as currently supported by OVS.
> 
> Signed-off-by: Ashish Varma 
> ---
> v1-v2:
> Fixed the indentation in the commit message.
> Converted the document from FAQ format to regular document format.
> Changed the multiple references to Nicira extension to Open vSwitch 
> extensions.
> Changed the file name from ovs-nicira-extension.rst to ovs-extensions.rst.
> Removed references from 'objects' to 'extensions'.
> Refer to ofp-msgs.h instead of ofp-msgs.inc.
> NXM description now refers to ovs-fields(7).
> The C structures are now being referred to respective files instead of copying
> it in the document.

Thanks.

I edited this a bit, and then I applied it to master.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v2] doc: Added OVS Extensions document

2019-10-02 Thread Ashish Varma
OVS supports OVS Extensions as various vendor messages or as vendor
types in stats or multipart messages. Added a document to describe the
extensions as currently supported by OVS.

Signed-off-by: Ashish Varma 
---
v1-v2:
Fixed the indentation in the commit message.
Converted the document from FAQ format to regular document format.
Changed the multiple references to Nicira extension to Open vSwitch extensions.
Changed the file name from ovs-nicira-extension.rst to ovs-extensions.rst.
Removed references from 'objects' to 'extensions'.
Refer to ofp-msgs.h instead of ofp-msgs.inc.
NXM description now refers to ovs-fields(7).
The C structures are now being referred to respective files instead of copying
it in the document.

---
 Documentation/automake.mk   |   1 +
 Documentation/index.rst |   3 +-
 Documentation/topics/index.rst  |   1 +
 Documentation/topics/ovs-extensions.rst | 147 
 4 files changed, 151 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/topics/ovs-extensions.rst

diff --git a/Documentation/automake.mk b/Documentation/automake.mk
index 2a3214a..5aa494a 100644
--- a/Documentation/automake.mk
+++ b/Documentation/automake.mk
@@ -64,6 +64,7 @@ DOC_SOURCE = \
Documentation/topics/porting.rst \
Documentation/topics/role-based-access-control.rst \
Documentation/topics/tracing.rst \
+   Documentation/topics/ovs-extensions.rst \
Documentation/topics/windows.rst \
Documentation/howto/index.rst \
Documentation/howto/docker.rst \
diff --git a/Documentation/index.rst b/Documentation/index.rst
index bace34d..4e4bb61 100644
--- a/Documentation/index.rst
+++ b/Documentation/index.rst
@@ -77,7 +77,8 @@ Deeper Dive
 - **Architecture** :doc:`topics/design` |
   :doc:`topics/openflow` |
   :doc:`topics/integration` |
-  :doc:`topics/porting`
+  :doc:`topics/porting` |
+  :doc:`topics/ovs-extensions`
 
 - **DPDK** :doc:`howto/dpdk` |
   :doc:`topics/dpdk/vhost-user`
diff --git a/Documentation/topics/index.rst b/Documentation/topics/index.rst
index 057649d..6b514a5 100644
--- a/Documentation/topics/index.rst
+++ b/Documentation/topics/index.rst
@@ -51,6 +51,7 @@ OVS
testing
tracing
idl-compound-indexes
+   ovs-extensions
 
 OVN
 ---
diff --git a/Documentation/topics/ovs-extensions.rst 
b/Documentation/topics/ovs-extensions.rst
new file mode 100644
index 000..babc603
--- /dev/null
+++ b/Documentation/topics/ovs-extensions.rst
@@ -0,0 +1,147 @@
+..
+  Licensed under the Apache License, Version 2.0 (the "License"); you may
+  not use this file except in compliance with the License. You may obtain
+  a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+  License for the specific language governing permissions and limitations
+  under the License.
+
+  Convention for heading levels in Open vSwitch documentation:
+
+  ===  Heading 0 (reserved for the title in a document)
+  ---  Heading 1
+  ~~~  Heading 2
+  +++  Heading 3
+  '''  Heading 4
+
+  Avoid deeper levels because they do not render well.
+
+===
+Open vSwitch Extensions
+===
+
+Introduction
+
+OpenFlow since version 1.0 allows vendor extensions to be added in the
+protocol and OVS has used these extensions in the implementation. (Initially
+also known as 'Nicira extensions'. This is the reason we see the prefix
+'NX' in the different vendor extension messages.)
+These extensions have been used to add additional functionality for the
+desired features not present in the standard OpenFlow protocol.
+
+
+OVS vendor extension messages in OpenFlow and OVS
+-
+
+1. **OFPT_VENDOR (In OpenFlow 1.0) or
+   OFPT_EXPERIMENTER (In OpenFlow 1.1+)**
+
+This is a vendor message type with value the value of OFPT_VENDOR
+or OFPT_EXPERIMENTER (refer to respective OpenFlow specifications)
+in the OpenFlow header 'type' field. After the header of this message,
+there is a vendor id field which identifies the vendor. This is followed
+by a subtype field which defines the vendor specific message types.
+The vendor ids are defined in: ovs/include/openflow/openflow-common.h
+
+To see a list of all the vendor message subtypes, we
+can refer to 'ovs/lib/ofp-msgs.h' file. We can see the instances
+of 'ofpraw' enum which has a comment containing the keyword NXT.
+For e.g. in the below mentioned line containing OFPRAW_NXT_FLOW_MOD:
+
+::
+
+   /* NXT 1.0+ (13): struct nx_flow_mod, uint8_t[8][]. */
+   OFPRAW_NXT_FLOW_MOD,
+
+   NXT  - stands for Nicira extension message.
+   nx_flow_mod  - data that follow