Fix issue with xconnect not working on the main interface 27/12527/3
authorDamjan Marion <damarion@cisco.com>
Thu, 10 May 2018 18:26:36 +0000 (20:26 +0200)
committerJohn Lo <loj@cisco.com>
Fri, 11 May 2018 07:04:00 +0000 (07:04 +0000)
Due to union, l2 sub-interface bits were wrongly set
causing sporadic misconfiguration of l2 mode on some
interfaces.

Change-Id: Id77ee281e3a0030878641a786c22ffe16ce1c759
Signed-off-by: Damjan Marion <damarion@cisco.com>
src/vnet/interface.h

index 6eaf501..87addbe 100644 (file)
@@ -681,17 +681,14 @@ typedef struct
 
   u32 link_speed;
 
-  union
-  {
-    /* VNET_SW_INTERFACE_TYPE_HARDWARE. */
-    u32 hw_if_index;
+  /* VNET_SW_INTERFACE_TYPE_HARDWARE. */
+  u32 hw_if_index;
 
-    /* VNET_SW_INTERFACE_TYPE_SUB. */
-    vnet_sub_interface_t sub;
+  /* VNET_SW_INTERFACE_TYPE_SUB. */
+  vnet_sub_interface_t sub;
 
-    /* VNET_SW_INTERFACE_TYPE_P2P. */
-    vnet_p2p_sub_interface_t p2p;
-  };
+  /* VNET_SW_INTERFACE_TYPE_P2P. */
+  vnet_p2p_sub_interface_t p2p;
 
   vnet_flood_class_t flood_class;
 } vnet_sw_interface_t;