ipip: Tunnel flags controlling copying data to/from payload/encap
[vpp.git] / src / vnet / ipip / ipip_cli.c
index 5c7dfec..e252f3a 100644 (file)
@@ -82,7 +82,8 @@ static clib_error_t *create_ipip_tunnel_command_fn(vlib_main_t *vm,
                            &src,
                            &dst,
                            fib_index,
-                           0,
+                           IPIP_TUNNEL_FLAG_NONE,
+                           IP_DSCP_CS0,
                            &sw_if_index);
     }
 
@@ -160,7 +161,7 @@ VLIB_CLI_COMMAND(create_ipip_tunnel_command, static) = {
 };
 VLIB_CLI_COMMAND(delete_ipip_tunnel_command, static) = {
     .path = "delete ipip tunnel",
-    .short_help = "delete ipip tunnel sw_if_index <sw_if_index ",
+    .short_help = "delete ipip tunnel sw_if_index <sw_if_index>",
     .function = delete_ipip_tunnel_command_fn,
 };
 /* *INDENT-ON* */
@@ -175,22 +176,25 @@ static u8 *format_ipip_tunnel(u8 *s, va_list *args) {
                                     fib_proto_from_ip46(type));
   switch (t->mode) {
   case IPIP_MODE_6RD:
-    s = format(s, "[%d] 6rd src %U ip6-pfx %U/%d table-ID %d sw-if-idx %d ",
+    s = format(s, "[%d] 6rd src %U ip6-pfx %U/%d ",
               t->dev_instance,
               format_ip46_address, &t->tunnel_src, type,
-              format_ip6_address, &t->sixrd.ip6_prefix, t->sixrd.ip6_prefix_len,
-              table_id, t->sw_if_index);
+              format_ip6_address, &t->sixrd.ip6_prefix, t->sixrd.ip6_prefix_len);
     break;
   case IPIP_MODE_P2P:
   default:
-    s = format(s, "[%d] instance %d src %U dst %U table-ID %d sw-if-idx %d ",
+    s = format(s, "[%d] instance %d src %U dst %U ",
               t->dev_instance, t->user_instance,
               format_ip46_address, &t->tunnel_src, type,
-              format_ip46_address, &t->tunnel_dst, type,
-              table_id, t->sw_if_index);
+              format_ip46_address, &t->tunnel_dst, type);
     break;
   }
 
+  s = format(s, "table-ID %d sw-if-idx %d flags [%U] dscp %U",
+             table_id, t->sw_if_index,
+             format_ipip_tunnel_flags, t->flags,
+             format_ip_dscp, t->dscp);
+
   return s;
 }
 
@@ -345,12 +349,13 @@ done:
 VLIB_CLI_COMMAND(create_sixrd_tunnel_command, static) = {
     .path = "create 6rd tunnel",
     .short_help = "create 6rd tunnel ip6-pfx <ip6-pfx> ip4-pfx <ip4-pfx> "
-                  "ip4-src <ip4-addr> table-id <ID> [del]",
+                  "ip4-src <ip4-addr> ip4-table-id <ID> ip6-table-id <ID> "
+                  "[security-check]",
     .function = create_sixrd_tunnel_command_fn,
 };
 VLIB_CLI_COMMAND(delete_sixrd_tunnel_command, static) = {
     .path = "delete 6rd tunnel",
-    .short_help = "delete 6rd tunnel sw_if_index <sw_if_index",
+    .short_help = "delete 6rd tunnel sw_if_index <sw_if_index>",
     .function = delete_sixrd_tunnel_command_fn,
 };
 /* *INDENT-ON* */