gso: remove the interface count

Type: refactor

Change-Id: I51405b9d09fb6fb03d08569369fdd4e11c647908
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
diff --git a/src/vnet/ip/ip4_forward.c b/src/vnet/ip/ip4_forward.c
index a67b061..bb036c8 100644
--- a/src/vnet/ip/ip4_forward.c
+++ b/src/vnet/ip/ip4_forward.c
@@ -2394,8 +2394,7 @@
 ip4_rewrite_inline_with_gso (vlib_main_t * vm,
 			     vlib_node_runtime_t * node,
 			     vlib_frame_t * frame,
-			     int do_counters, int is_midchain, int is_mcast,
-			     int do_gso)
+			     int do_counters, int is_midchain, int is_mcast)
 {
   ip_lookup_main_t *lm = &ip4_main.lookup_main;
   u32 *from = vlib_frame_vector_args (frame);
@@ -2477,9 +2476,9 @@
       u16 ip0_len = clib_net_to_host_u16 (ip0->length);
       u16 ip1_len = clib_net_to_host_u16 (ip1->length);
 
-      if (do_gso && (b[0]->flags & VNET_BUFFER_F_GSO))
+      if (b[0]->flags & VNET_BUFFER_F_GSO)
 	ip0_len = gso_mtu_sz (b[0]);
-      if (do_gso && (b[1]->flags & VNET_BUFFER_F_GSO))
+      if (b[1]->flags & VNET_BUFFER_F_GSO)
 	ip1_len = gso_mtu_sz (b[1]);
 
       ip4_mtu_check (b[0], ip0_len,
@@ -2653,7 +2652,7 @@
       /* Check MTU of outgoing interface. */
       u16 ip0_len = clib_net_to_host_u16 (ip0->length);
 
-      if (do_gso && (b[0]->flags & VNET_BUFFER_F_GSO))
+      if (b[0]->flags & VNET_BUFFER_F_GSO)
 	ip0_len = gso_mtu_sz (b[0]);
 
       ip4_mtu_check (b[0], ip0_len,
@@ -2751,7 +2750,7 @@
 
       /* Check MTU of outgoing interface. */
       u16 ip0_len = clib_net_to_host_u16 (ip0->length);
-      if (do_gso && (b[0]->flags & VNET_BUFFER_F_GSO))
+      if (b[0]->flags & VNET_BUFFER_F_GSO)
 	ip0_len = gso_mtu_sz (b[0]);
 
       ip4_mtu_check (b[0], ip0_len,
@@ -2833,15 +2832,8 @@
 		    vlib_frame_t * frame,
 		    int do_counters, int is_midchain, int is_mcast)
 {
-  vnet_main_t *vnm = vnet_get_main ();
-  if (PREDICT_FALSE (vnm->interface_main.gso_interface_count > 0))
-    return ip4_rewrite_inline_with_gso (vm, node, frame, do_counters,
-					is_midchain, is_mcast,
-					1 /* do_gso */ );
-  else
-    return ip4_rewrite_inline_with_gso (vm, node, frame, do_counters,
-					is_midchain, is_mcast,
-					0 /* no do_gso */ );
+  return ip4_rewrite_inline_with_gso (vm, node, frame, do_counters,
+				      is_midchain, is_mcast);
 }