[ovs-discuss] Problem compiling ovs-2.3.2 with some extensions.

Haosen Wen wenhaosen at gmail.com
Fri Apr 15 08:26:55 UTC 2016


Hi Ben,

here, I attached the patch file. and the content is as follows:

diff -ruN ovs-origin/openvswitch-2.3.2/include/openflow/openflow-1.3.h
openvswitch-2.3.2/include/openflow/openflow-1.3.h
--- ovs-origin/openvswitch-2.3.2/include/openflow/openflow-1.3.h 2015-06-19
03:32:47.000000000 +0800
+++ openvswitch-2.3.2/include/openflow/openflow-1.3.h 2016-04-15
16:15:27.916835539 +0800
@@ -121,7 +121,8 @@
     OFPAT13_DEC_NW_TTL   = 24,  /* Decrement IP TTL. */
     OFPAT13_SET_FIELD    = 25,  /* Set a header field using OXM TLV
format. */
     OFPAT13_PUSH_PBB     = 26,  /* Push a new PBB service tag (I-TAG) */
-    OFPAT13_POP_PBB      = 27   /* Pop the outer PBB service tag (I-TAG) */
+    OFPAT13_POP_PBB      = 27,  /* Pop the outer PBB service tag (I-TAG) */
+    OFPAT13_FLAT         = 65535/*//hs: for FLAT*/
 };

 /* enum ofp_config_flags value OFPC_INVALID_TTL_TO_CONTROLLER
@@ -138,6 +139,16 @@
     OFPFF13_NO_BYT_COUNTS = 1 << 4  /* Don't keep track of byte count. */
 };

+//hs: Action structure for FLAT.
+struct flat_action{
+    ovs_be16 type;                    /* experimenter,65535 */
+    ovs_be16 len;                     /* Length is 16. */
+    ovs_be32 experimenter;            /* experimenter type 0x1000. */
+    ovs_be16 subtype;                 /* subtype=1 */
+    ovs_be16 timeflake;               /* FLAT timeflake, 1 or 5 */
+    ovs_be32 port;                    /* Output port. */
+};
+
 /* Common header for all meter bands */
 struct ofp13_meter_band_header {
     ovs_be16 type;       /* One of OFPMBT_*. */
diff -ruN ovs-origin/openvswitch-2.3.2/lib/ofp-actions.c
openvswitch-2.3.2/lib/ofp-actions.c
--- ovs-origin/openvswitch-2.3.2/lib/ofp-actions.c 2015-06-19
03:32:47.000000000 +0800
+++ openvswitch-2.3.2/lib/ofp-actions.c 2016-04-15 16:16:25.644836023 +0800
@@ -81,6 +81,7 @@
     struct nx_action_learn learn;
     struct nx_action_mpls_label mpls_label;
     struct nx_action_mpls_tc mpls_tc;
+    struct flat_action flat;//hs
 };

 static enum ofperr
diff -ruN ovs-origin/openvswitch-2.3.2/lib/ofp-actions.h
openvswitch-2.3.2/lib/ofp-actions.h
--- ovs-origin/openvswitch-2.3.2/lib/ofp-actions.h 2015-06-19
03:32:47.000000000 +0800
+++ openvswitch-2.3.2/lib/ofp-actions.h 2016-04-15 16:17:16.320836449 +0800
@@ -108,7 +108,10 @@
     DEFINE_OFPACT(CLEAR_ACTIONS,   ofpact_null,          ofpact)    \
     DEFINE_OFPACT(WRITE_ACTIONS,   ofpact_nest,          ofpact)    \
     DEFINE_OFPACT(WRITE_METADATA,  ofpact_metadata,      ofpact)    \
-    DEFINE_OFPACT(GOTO_TABLE,      ofpact_goto_table,    ofpact)
+    DEFINE_OFPACT(GOTO_TABLE,      ofpact_goto_table,    ofpact)    \
+                                                                    \
+    /*//hs:FLAT */                                                  \
+    DEFINE_OFPACT(FLAT,            ofpact_flat,          ofpact)//hs

 /* enum ofpact_type, with a member OFPACT_<ENUM> for each action. */
 enum OVS_PACKED_ENUM ofpact_type {
@@ -201,6 +204,18 @@
     struct ofpact ofpact;
 };

+/*//hs:OFPACT_FLAT.
+ *
+ * Used for OFPAT_FLAT. */
+struct ofpact_flat{
+    struct ofpact ofpact;
+    ovs_be32 experimenter;            /* experimenter type 0x1000. */
+    ovs_be16 subtype;                 /* subtype=1 */
+    ovs_be16 timeflake;               /* FLAT timeflake, 1 or 5 */
+    ofp_port_t port;                  /* Output port. */
+};
+
+
 /* OFPACT_OUTPUT.
  *
  * Used for OFPAT10_OUTPUT. */



Thanks,

Hs

Haosen Wen

Beijing Foreign Studies University
Addr: 2nd Xisanhuan North Ave., Haidian Dist., Beijing, China
E-Mail: wenhaosen at gmail.com
Tel: 86-183-1003-2269
Site: http://www.hensen-wen.cn

2016-04-15 0:24 GMT+08:00 Ben Pfaff <blp at ovn.org>:

> On Thu, Apr 14, 2016 at 04:19:24PM +0800, Haosen Wen wrote:
> > Hi all,
> >
> > I made some modifications in modules mostly concerning about flowmods and
> > actions, and when I ran "make", I got the following error message:
> >
> > *include/openflow/nicira-ext.h:142: error at "/": parse error*
> > *make[2]: *** [include/openflow/nicira-ext.hstamp] Error 1*
> > *make[1]: *** [all-recursive] Error1*
>
> Can you provide a patch?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20160415/b24a5570/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ovs+flat.patch
Type: text/x-patch
Size: 3349 bytes
Desc: not available
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20160415/b24a5570/attachment-0002.bin>


More information about the discuss mailing list