misc: remove GNU Indent directives
[vpp.git] / src / vnet / devices / tap / tap.c
index 7c8a9b0..1e2ee87 100644 (file)
@@ -97,14 +97,12 @@ tap_free (vlib_main_t * vm, virtio_if_t * vif)
 
   virtio_pre_input_node_disable (vm, vif);
 
-  /* *INDENT-OFF* */
   vec_foreach_index (i, vif->vhost_fds) if (vif->vhost_fds[i] != -1)
     close (vif->vhost_fds[i]);
   vec_foreach_index (i, vif->rxq_vrings)
     virtio_vring_free_rx (vm, vif, RX_QUEUE (i));
   vec_foreach_index (i, vif->txq_vrings)
     virtio_vring_free_tx (vm, vif, TX_QUEUE (i));
-  /* *INDENT-ON* */
 
   if (vif->tap_fds)
     {
@@ -334,10 +332,10 @@ tap_create_if (vlib_main_t * vm, tap_create_if_args_t * args)
          args->error = clib_error_return_unix (0, "open '/dev/net/tun'");
          goto error;
        }
+      vec_add1 (vif->tap_fds, qfd);
       _IOCTL (qfd, TUNSETIFF, (void *) &ifr);
       tap_log_dbg (vif, "TUNSETIFF fd %d name %s flags 0x%x", qfd,
                   ifr.ifr_ifrn.ifrn_name, ifr.ifr_flags);
-      vec_add1 (vif->tap_fds, qfd);
     }
 
   for (i = 0; i < vif->num_rxqs; i++)
@@ -694,7 +692,7 @@ tap_create_if (vlib_main_t * vm, tap_create_if_args_t * args)
     {
       hw->min_frame_size = TUN_MIN_PACKET_BYTES;
       vnet_hw_interface_set_mtu (
-       vnm, hw->sw_if_index,
+       vnm, hw->hw_if_index,
        args->host_mtu_size ? args->host_mtu_size : TUN_DEFAULT_PACKET_BYTES);
     }
 
@@ -885,7 +883,6 @@ tap_dump_ifs (tap_interface_details_t ** out_tapids)
   tap_interface_details_t *r_tapids = NULL;
   tap_interface_details_t *tapid = NULL;
 
-  /* *INDENT-OFF* */
   pool_foreach (vif, mm->interfaces) {
     if ((vif->type != VIRTIO_IF_TYPE_TAP)
       && (vif->type != VIRTIO_IF_TYPE_TUN))
@@ -929,7 +926,6 @@ tap_dump_ifs (tap_interface_details_t ** out_tapids)
     tapid->host_ip6_prefix_len = vif->host_ip6_prefix_len;
     tapid->host_mtu_size = vif->host_mtu_size;
   }
-  /* *INDENT-ON* */
 
   *out_tapids = r_tapids;