Add OF1.3 TUNNEL_ID support.
authorJarno Rajahalme <jarno.rajahalme@nsn.com>
Thu, 22 Nov 2012 15:25:56 +0000 (17:25 +0200)
committerBen Pfaff <blp@nicira.com>
Tue, 27 Nov 2012 22:50:50 +0000 (14:50 -0800)
Signed-off-by: Jarno Rajahalme <jarno.rajahalme@nsn.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/meta-flow.c
lib/nx-match.c

index 720c917..749898f 100644 (file)
@@ -54,7 +54,7 @@ static const struct mf_field mf_fields[MFF_N_IDS] = {
         MFP_NONE,
         true,
         NXM_NX_TUN_ID, "NXM_NX_TUN_ID",
-        NXM_NX_TUN_ID, "NXM_NX_TUN_ID",
+        OXM_OF_TUNNEL_ID, "OXM_OF_TUNNEL_ID",
     }, {
         MFF_TUN_SRC, "tun_src", NULL,
         MF_FIELD_SIZES(be32),
index a3a8bc3..05f1ce9 100644 (file)
@@ -644,8 +644,8 @@ nx_put_raw(struct ofpbuf *b, bool oxm, const struct match *match,
     }
 
     /* Tunnel ID. */
-    nxm_put_64m(b, NXM_NX_TUN_ID, flow->tunnel.tun_id,
-                match->wc.masks.tunnel.tun_id);
+    nxm_put_64m(b, oxm ? OXM_OF_TUNNEL_ID : NXM_NX_TUN_ID,
+               flow->tunnel.tun_id, match->wc.masks.tunnel.tun_id);
 
     /* Registers. */
     for (i = 0; i < FLOW_N_REGS; i++) {