flow: The type of vni in VxLAN flow should be u32 20/30320/5
authorChenmin Sun <chenmin.sun@intel.com>
Mon, 7 Dec 2020 16:42:43 +0000 (00:42 +0800)
committerDamjan Marion <dmarion@me.com>
Wed, 14 Apr 2021 10:26:07 +0000 (10:26 +0000)
Type: fix

Signed-off-by: Chenmin Sun <chenmin.sun@intel.com>
Change-Id: I40732dfb4fee4a5cfd699a8badea13d070f6b367

src/vnet/flow/flow.h
src/vnet/flow/flow_cli.c
src/vnet/flow/flow_types.api

index 04305ed..3ae5b6b 100644 (file)
   _fe(ip_port_and_mask_t, src_port) \
   _fe(ip_port_and_mask_t, dst_port)
 
-#define foreach_flow_entry_ip4_vxlan \
-  foreach_flow_entry_ip4_n_tuple \
-  _fe(u16, vni)
+#define foreach_flow_entry_ip4_vxlan                                          \
+  foreach_flow_entry_ip4_n_tuple _fe (u32, vni)
 
-#define foreach_flow_entry_ip6_vxlan \
-  foreach_flow_entry_ip6_n_tuple \
-  _fe(u16, vni)
+#define foreach_flow_entry_ip6_vxlan                                          \
+  foreach_flow_entry_ip6_n_tuple _fe (u32, vni)
 
 #define foreach_flow_entry_ip4_gtpc \
   foreach_flow_entry_ip4_n_tuple \
index aea2534..e2a3141 100644 (file)
@@ -353,7 +353,7 @@ test_flow (vlib_main_t * vm, unformat_input_t * input,
   u32 hw_if_index = ~0, flow_index = ~0;
   int rv;
   u32 teid = 0, session_id = 0, spi = 0;
-  u16 vni = 0;
+  u32 vni = 0;
   vnet_flow_type_t type = VNET_FLOW_TYPE_UNKNOWN;
   ip4_address_and_mask_t ip4s = { };
   ip4_address_and_mask_t ip4d = { };
index 7df46d2..86f7ce1 100644 (file)
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-option version = "0.0.2";
+option version = "0.0.3";
 import "vnet/ethernet/ethernet_types.api";
 import "vnet/ip/ip_types.api";
 
@@ -157,7 +157,7 @@ typedef flow_ip4_vxlan
   vl_api_ip_prot_and_mask_t protocol;
   vl_api_ip_port_and_mask_t src_port;
   vl_api_ip_port_and_mask_t dst_port;
-  u16 vni;
+  u32 vni;
 };
 
 typedef flow_ip6_vxlan
@@ -168,7 +168,7 @@ typedef flow_ip6_vxlan
   vl_api_ip_prot_and_mask_t protocol;
   vl_api_ip_port_and_mask_t src_port;
   vl_api_ip_port_and_mask_t dst_port;
-  u16 vni;
+  u32 vni;
 };
 
 typedef flow_ip4_gtpc