diff --git a/src/vnet/devices/af_packet/af_packet.api b/src/vnet/devices/af_packet/af_packet.api
index 035096e..c7a81c5 100644
--- a/src/vnet/devices/af_packet/af_packet.api
+++ b/src/vnet/devices/af_packet/af_packet.api
@@ -46,6 +46,46 @@
   vl_api_interface_index_t sw_if_index;
 };
 
+/** \brief Create host-interface
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param hw_addr - interface MAC
+    @param use_random_hw_addr - use random generated MAC
+    @param host_if_name - interface name
+    @param rx_frame_size - frame size for RX
+    @param tx_frame_size - frame size for TX
+    @param rx_frames_per_block - frames per block for RX
+    @param tx_frames_per_block - frames per block for TX
+    @param flags - flags for the af_packet interface creation
+    @param num_rx_queues - number of rx queues
+*/
+define af_packet_create_v2
+{
+  u32 client_index;
+  u32 context;
+
+  vl_api_mac_address_t hw_addr;
+  bool use_random_hw_addr;
+  string host_if_name[64];
+  u32 rx_frame_size;
+  u32 tx_frame_size;
+  u32 rx_frames_per_block;
+  u32 tx_frames_per_block;
+  u32 flags;
+  u16 num_rx_queues [default=1];
+};
+
+/** \brief Create host-interface response
+    @param context - sender context, to match reply w/ request
+    @param retval - return value for request
+*/
+define af_packet_create_v2_reply
+{
+  u32 context;
+  i32 retval;
+  vl_api_interface_index_t sw_if_index;
+};
+
 /** \brief Delete host-interface
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
diff --git a/src/vnet/devices/af_packet/af_packet.c b/src/vnet/devices/af_packet/af_packet.c
index cace345..2dc2630 100644
--- a/src/vnet/devices/af_packet/af_packet.c
+++ b/src/vnet/devices/af_packet/af_packet.c
@@ -38,21 +38,13 @@
 
 af_packet_main_t af_packet_main;
 
-#define AF_PACKET_TX_FRAMES_PER_BLOCK	1024
-#define AF_PACKET_TX_FRAME_SIZE	 	(2048 * 5)
+#define AF_PACKET_DEFAULT_TX_FRAMES_PER_BLOCK 1024
+#define AF_PACKET_DEFAULT_TX_FRAME_SIZE	      (2048 * 5)
 #define AF_PACKET_TX_BLOCK_NR		1
-#define AF_PACKET_TX_FRAME_NR		(AF_PACKET_TX_BLOCK_NR * \
-					 AF_PACKET_TX_FRAMES_PER_BLOCK)
-#define AF_PACKET_TX_BLOCK_SIZE	 	(AF_PACKET_TX_FRAME_SIZE * \
-					 AF_PACKET_TX_FRAMES_PER_BLOCK)
 
-#define AF_PACKET_RX_FRAMES_PER_BLOCK	1024
-#define AF_PACKET_RX_FRAME_SIZE	 	(2048 * 5)
+#define AF_PACKET_DEFAULT_RX_FRAMES_PER_BLOCK 1024
+#define AF_PACKET_DEFAULT_RX_FRAME_SIZE	      (2048 * 5)
 #define AF_PACKET_RX_BLOCK_NR		1
-#define AF_PACKET_RX_FRAME_NR		(AF_PACKET_RX_BLOCK_NR * \
-					 AF_PACKET_RX_FRAMES_PER_BLOCK)
-#define AF_PACKET_RX_BLOCK_SIZE		(AF_PACKET_RX_FRAME_SIZE * \
-					 AF_PACKET_RX_FRAMES_PER_BLOCK)
 
 /*defined in net/if.h but clashes with dpdk headers */
 unsigned int if_nametoindex (const char *ifname);
@@ -241,10 +233,10 @@
 }
 
 int
-af_packet_create_if (vlib_main_t * vm, u8 * host_if_name, u8 * hw_addr_set,
-		     u32 * sw_if_index)
+af_packet_create_if (af_packet_create_if_arg_t *arg)
 {
   af_packet_main_t *apm = &af_packet_main;
+  vlib_main_t *vm = vlib_get_main ();
   int ret, fd = -1, fd2 = -1;
   struct tpacket_req *rx_req = 0;
   struct tpacket_req *tx_req = 0;
@@ -261,28 +253,41 @@
   uword if_index;
   u8 *host_if_name_dup = 0;
   int host_if_index = -1;
+  u32 rx_frames_per_block, tx_frames_per_block;
+  u32 rx_frame_size, tx_frame_size;
 
-  p = mhash_get (&apm->if_index_by_host_if_name, host_if_name);
+  p = mhash_get (&apm->if_index_by_host_if_name, arg->host_if_name);
   if (p)
     {
       apif = vec_elt_at_index (apm->interfaces, p[0]);
-      *sw_if_index = apif->sw_if_index;
+      arg->sw_if_index = apif->sw_if_index;
       return VNET_API_ERROR_IF_ALREADY_EXISTS;
     }
 
-  host_if_name_dup = vec_dup (host_if_name);
+  host_if_name_dup = vec_dup (arg->host_if_name);
+
+  rx_frames_per_block = arg->rx_frames_per_block ?
+			  arg->rx_frames_per_block :
+			  AF_PACKET_DEFAULT_RX_FRAMES_PER_BLOCK;
+  tx_frames_per_block = arg->tx_frames_per_block ?
+			  arg->tx_frames_per_block :
+			  AF_PACKET_DEFAULT_TX_FRAMES_PER_BLOCK;
+  rx_frame_size =
+    arg->rx_frame_size ? arg->rx_frame_size : AF_PACKET_DEFAULT_RX_FRAME_SIZE;
+  tx_frame_size =
+    arg->tx_frame_size ? arg->tx_frame_size : AF_PACKET_DEFAULT_TX_FRAME_SIZE;
 
   vec_validate (rx_req, 0);
-  rx_req->tp_block_size = AF_PACKET_RX_BLOCK_SIZE;
-  rx_req->tp_frame_size = AF_PACKET_RX_FRAME_SIZE;
+  rx_req->tp_block_size = rx_frame_size * rx_frames_per_block;
+  rx_req->tp_frame_size = rx_frame_size;
   rx_req->tp_block_nr = AF_PACKET_RX_BLOCK_NR;
-  rx_req->tp_frame_nr = AF_PACKET_RX_FRAME_NR;
+  rx_req->tp_frame_nr = AF_PACKET_RX_BLOCK_NR * rx_frames_per_block;
 
   vec_validate (tx_req, 0);
-  tx_req->tp_block_size = AF_PACKET_TX_BLOCK_SIZE;
-  tx_req->tp_frame_size = AF_PACKET_TX_FRAME_SIZE;
+  tx_req->tp_block_size = tx_frame_size * tx_frames_per_block;
+  tx_req->tp_frame_size = tx_frame_size;
   tx_req->tp_block_nr = AF_PACKET_TX_BLOCK_NR;
-  tx_req->tp_frame_nr = AF_PACKET_TX_FRAME_NR;
+  tx_req->tp_frame_nr = AF_PACKET_TX_BLOCK_NR * tx_frames_per_block;
 
   /*
    * make sure host side of interface is 'UP' before binding AF_PACKET
@@ -297,13 +302,14 @@
       goto error;
     }
 
-  clib_memcpy (ifr.ifr_name, (const char *) host_if_name,
-	       vec_len (host_if_name));
+  clib_memcpy (ifr.ifr_name, (const char *) arg->host_if_name,
+	       vec_len (arg->host_if_name));
   if (ioctl (fd2, SIOCGIFINDEX, &ifr) < 0)
     {
-      vlib_log_debug (apm->log_class,
-		      "Failed to retrieve the interface (%s) index: %s (errno %d)",
-		      host_if_name, strerror (errno), errno);
+      vlib_log_debug (
+	apm->log_class,
+	"Failed to retrieve the interface (%s) index: %s (errno %d)",
+	arg->host_if_name, strerror (errno), errno);
       ret = VNET_API_ERROR_INVALID_INTERFACE;
       goto error;
     }
@@ -342,7 +348,7 @@
   if (ret != 0)
     goto error;
 
-  ret = is_bridge (host_if_name);
+  ret = is_bridge (arg->host_if_name);
 
   if (ret == 0)			/* is a bridge, ignore state */
     host_if_index = -1;
@@ -370,8 +376,8 @@
     clib_spinlock_init (&apif->lockp);
 
   /*use configured or generate random MAC address */
-  if (hw_addr_set)
-    clib_memcpy (hw_addr, hw_addr_set, 6);
+  if (arg->hw_addr)
+    clib_memcpy (hw_addr, arg->hw_addr, 6);
   else
     {
       f64 now = vlib_time_now (vm);
@@ -429,8 +435,7 @@
 
   mhash_set_mem (&apm->if_index_by_host_if_name, host_if_name_dup, &if_index,
 		 0);
-  if (sw_if_index)
-    *sw_if_index = apif->sw_if_index;
+  arg->sw_if_index = apif->sw_if_index;
 
   return 0;
 
@@ -447,7 +452,7 @@
 }
 
 int
-af_packet_delete_if (vlib_main_t * vm, u8 * host_if_name)
+af_packet_delete_if (u8 *host_if_name)
 {
   vnet_main_t *vnm = vnet_get_main ();
   af_packet_main_t *apm = &af_packet_main;
@@ -507,7 +512,7 @@
 }
 
 int
-af_packet_set_l4_cksum_offload (vlib_main_t * vm, u32 sw_if_index, u8 set)
+af_packet_set_l4_cksum_offload (u32 sw_if_index, u8 set)
 {
   vnet_main_t *vnm = vnet_get_main ();
   vnet_hw_interface_t *hw;
@@ -538,7 +543,6 @@
   af_packet_if_detail_t *r_af_packet_ifs = NULL;
   af_packet_if_detail_t *af_packet_if = NULL;
 
-  /* *INDENT-OFF* */
   pool_foreach (apif, apm->interfaces)
      {
       vec_add2 (r_af_packet_ifs, af_packet_if, 1);
@@ -550,7 +554,6 @@
 		       strlen ((const char *) apif->host_if_name)));
 	}
     }
-  /* *INDENT-ON* */
 
   *out_af_packet_ifs = r_af_packet_ifs;
 
diff --git a/src/vnet/devices/af_packet/af_packet.h b/src/vnet/devices/af_packet/af_packet.h
index fc35b48..3163aa0 100644
--- a/src/vnet/devices/af_packet/af_packet.h
+++ b/src/vnet/devices/af_packet/af_packet.h
@@ -69,15 +69,26 @@
   vlib_log_class_t log_class;
 } af_packet_main_t;
 
+typedef struct
+{
+  u8 *host_if_name;
+  u8 *hw_addr;
+  u32 rx_frame_size;
+  u32 tx_frame_size;
+  u32 rx_frames_per_block;
+  u32 tx_frames_per_block;
+
+  /* return */
+  u32 sw_if_index;
+} af_packet_create_if_arg_t;
+
 extern af_packet_main_t af_packet_main;
 extern vnet_device_class_t af_packet_device_class;
 extern vlib_node_registration_t af_packet_input_node;
 
-int af_packet_create_if (vlib_main_t * vm, u8 * host_if_name,
-			 u8 * hw_addr_set, u32 * sw_if_index);
-int af_packet_delete_if (vlib_main_t * vm, u8 * host_if_name);
-int af_packet_set_l4_cksum_offload (vlib_main_t * vm, u32 sw_if_index,
-				    u8 set);
+int af_packet_create_if (af_packet_create_if_arg_t *arg);
+int af_packet_delete_if (u8 *host_if_name);
+int af_packet_set_l4_cksum_offload (u32 sw_if_index, u8 set);
 int af_packet_dump_ifs (af_packet_if_detail_t ** out_af_packet_ifs);
 
 format_function_t format_af_packet_device_name;
diff --git a/src/vnet/devices/af_packet/af_packet_api.c b/src/vnet/devices/af_packet/af_packet_api.c
index d4d041f..80a2d92 100644
--- a/src/vnet/devices/af_packet/af_packet_api.c
+++ b/src/vnet/devices/af_packet/af_packet_api.c
@@ -36,33 +36,61 @@
 static void
 vl_api_af_packet_create_t_handler (vl_api_af_packet_create_t * mp)
 {
-  vlib_main_t *vm = vlib_get_main ();
+  af_packet_create_if_arg_t _arg, *arg = &_arg;
   vl_api_af_packet_create_reply_t *rmp;
   int rv = 0;
-  u8 *host_if_name = NULL;
-  u32 sw_if_index;
 
-  host_if_name = format (0, "%s", mp->host_if_name);
-  vec_add1 (host_if_name, 0);
+  clib_memset (arg, 0, sizeof (*arg));
 
-  rv = af_packet_create_if (vm, host_if_name,
-			    mp->use_random_hw_addr ? 0 : mp->hw_addr,
-			    &sw_if_index);
+  arg->host_if_name = format (0, "%s", mp->host_if_name);
+  vec_add1 (arg->host_if_name, 0);
 
-  vec_free (host_if_name);
+  arg->hw_addr = mp->use_random_hw_addr ? 0 : mp->hw_addr;
+  rv = af_packet_create_if (arg);
 
-  /* *INDENT-OFF* */
-  REPLY_MACRO2(VL_API_AF_PACKET_CREATE_REPLY,
-  ({
-    rmp->sw_if_index = clib_host_to_net_u32(sw_if_index);
-  }));
-  /* *INDENT-ON* */
+  vec_free (arg->host_if_name);
+
+  REPLY_MACRO2 (VL_API_AF_PACKET_CREATE_REPLY, ({
+		  rmp->sw_if_index = clib_host_to_net_u32 (arg->sw_if_index);
+		}));
+}
+
+static void
+vl_api_af_packet_create_v2_t_handler (vl_api_af_packet_create_v2_t *mp)
+{
+  af_packet_create_if_arg_t _arg, *arg = &_arg;
+  vl_api_af_packet_create_v2_reply_t *rmp;
+  int rv = 0;
+
+  clib_memset (arg, 0, sizeof (*arg));
+
+  arg->host_if_name = format (0, "%s", mp->host_if_name);
+  vec_add1 (arg->host_if_name, 0);
+
+  arg->rx_frame_size = clib_net_to_host_u32 (mp->rx_frame_size);
+  arg->tx_frame_size = clib_net_to_host_u32 (mp->tx_frame_size);
+  arg->rx_frames_per_block = clib_net_to_host_u32 (mp->rx_frames_per_block);
+  arg->tx_frames_per_block = clib_net_to_host_u32 (mp->tx_frames_per_block);
+  arg->hw_addr = mp->use_random_hw_addr ? 0 : mp->hw_addr;
+
+  if (mp->num_rx_queues > 1)
+    {
+      rv = VNET_API_ERROR_INVALID_VALUE;
+      goto out;
+    }
+
+  rv = af_packet_create_if (arg);
+
+out:
+  vec_free (arg->host_if_name);
+  REPLY_MACRO2 (VL_API_AF_PACKET_CREATE_V2_REPLY, ({
+		  rmp->sw_if_index = clib_host_to_net_u32 (arg->sw_if_index);
+		}));
 }
 
 static void
 vl_api_af_packet_delete_t_handler (vl_api_af_packet_delete_t * mp)
 {
-  vlib_main_t *vm = vlib_get_main ();
   vl_api_af_packet_delete_reply_t *rmp;
   int rv = 0;
   u8 *host_if_name = NULL;
@@ -70,7 +98,7 @@
   host_if_name = format (0, "%s", mp->host_if_name);
   vec_add1 (host_if_name, 0);
 
-  rv = af_packet_delete_if (vm, host_if_name);
+  rv = af_packet_delete_if (host_if_name);
 
   vec_free (host_if_name);
 
@@ -81,11 +109,10 @@
   vl_api_af_packet_set_l4_cksum_offload_t_handler
   (vl_api_af_packet_set_l4_cksum_offload_t * mp)
 {
-  vlib_main_t *vm = vlib_get_main ();
   vl_api_af_packet_delete_reply_t *rmp;
   int rv = 0;
 
-  rv = af_packet_set_l4_cksum_offload (vm, ntohl (mp->sw_if_index), mp->set);
+  rv = af_packet_set_l4_cksum_offload (ntohl (mp->sw_if_index), mp->set);
   REPLY_MACRO (VL_API_AF_PACKET_SET_L4_CKSUM_OFFLOAD_REPLY);
 }
 
diff --git a/src/vnet/devices/af_packet/cli.c b/src/vnet/devices/af_packet/cli.c
index e5466c9..bae4f61 100644
--- a/src/vnet/devices/af_packet/cli.c
+++ b/src/vnet/devices/af_packet/cli.c
@@ -44,12 +44,12 @@
 			     vlib_cli_command_t * cmd)
 {
   unformat_input_t _line_input, *line_input = &_line_input;
-  u8 *host_if_name = NULL;
-  u8 hwaddr[6];
-  u8 *hw_addr_ptr = 0;
-  u32 sw_if_index;
-  int r;
+  af_packet_create_if_arg_t _arg, *arg = &_arg;
   clib_error_t *error = NULL;
+  u8 hwaddr[6];
+  int r;
+
+  clib_memset (arg, 0, sizeof (*arg));
 
   /* Get a line of input. */
   if (!unformat_user (input, unformat_line_input, line_input))
@@ -57,12 +57,21 @@
 
   while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
-      if (unformat (line_input, "name %s", &host_if_name))
+      if (unformat (line_input, "name %s", &arg->host_if_name))
 	;
-      else
-	if (unformat
-	    (line_input, "hw-addr %U", unformat_ethernet_address, hwaddr))
-	hw_addr_ptr = hwaddr;
+      else if (unformat (line_input, "rx-size %u", &arg->rx_frame_size))
+	;
+      else if (unformat (line_input, "tx-size %u", &arg->tx_frame_size))
+	;
+      else if (unformat (line_input, "rx-per-block %u",
+			 &arg->rx_frames_per_block))
+	;
+      else if (unformat (line_input, "tx-per-block %u",
+			 &arg->tx_frames_per_block))
+	;
+      else if (unformat (line_input, "hw-addr %U", unformat_ethernet_address,
+			 hwaddr))
+	arg->hw_addr = hwaddr;
       else
 	{
 	  error = clib_error_return (0, "unknown input `%U'",
@@ -71,13 +80,13 @@
 	}
     }
 
-  if (host_if_name == NULL)
+  if (arg->host_if_name == NULL)
     {
       error = clib_error_return (0, "missing host interface name");
       goto done;
     }
 
-  r = af_packet_create_if (vm, host_if_name, hw_addr_ptr, &sw_if_index);
+  r = af_packet_create_if (arg);
 
   if (r == VNET_API_ERROR_SYSCALL_ERROR_1)
     {
@@ -98,10 +107,10 @@
     }
 
   vlib_cli_output (vm, "%U\n", format_vnet_sw_if_index_name, vnet_get_main (),
-		   sw_if_index);
+		   arg->sw_if_index);
 
 done:
-  vec_free (host_if_name);
+  vec_free (arg->host_if_name);
   unformat_free (line_input);
 
   return error;
@@ -129,13 +138,11 @@
  * Once the host interface is created, enable the interface using:
  * @cliexcmd{set interface state host-vpp1 up}
 ?*/
-/* *INDENT-OFF* */
 VLIB_CLI_COMMAND (af_packet_create_command, static) = {
   .path = "create host-interface",
   .short_help = "create host-interface name <ifname> [hw-addr <mac-addr>]",
   .function = af_packet_create_command_fn,
 };
-/* *INDENT-ON* */
 
 static clib_error_t *
 af_packet_delete_command_fn (vlib_main_t * vm, unformat_input_t * input,
@@ -167,7 +174,7 @@
       goto done;
     }
 
-  af_packet_delete_if (vm, host_if_name);
+  af_packet_delete_if (host_if_name);
 
 done:
   vec_free (host_if_name);
@@ -186,13 +193,11 @@
  * Example of how to delete a host interface named host-vpp1:
  * @cliexcmd{delete host-interface name vpp1}
 ?*/
-/* *INDENT-OFF* */
 VLIB_CLI_COMMAND (af_packet_delete_command, static) = {
   .path = "delete host-interface",
   .short_help = "delete host-interface name <ifname>",
   .function = af_packet_delete_command_fn,
 };
-/* *INDENT-ON* */
 
 static clib_error_t *
 af_packet_set_l4_cksum_offload_command_fn (vlib_main_t * vm,
@@ -210,8 +215,8 @@
 
   while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
     {
-      if (unformat
-	  (line_input, "%U", unformat_vnet_sw_interface, vnm, &sw_if_index))
+      if (unformat (line_input, "%U", unformat_vnet_sw_interface, vnm,
+		    &sw_if_index))
 	;
       else if (unformat (line_input, "on"))
 	set = 1;
@@ -225,7 +230,7 @@
 	}
     }
 
-  if (af_packet_set_l4_cksum_offload (vm, sw_if_index, set) < 0)
+  if (af_packet_set_l4_cksum_offload (sw_if_index, set) < 0)
     error = clib_error_return (0, "not an af_packet interface");
 
 done:
@@ -243,13 +248,11 @@
  * @cliexcmd{set host-interface l4-cksum-offload host-vpp0 off}
  * @cliexcmd{set host-interface l4-cksum-offload host-vpp0 on}
 ?*/
-/* *INDENT-OFF* */
 VLIB_CLI_COMMAND (af_packet_set_l4_cksum_offload_command, static) = {
   .path = "set host-interface l4-cksum-offload",
   .short_help = "set host-interface l4-cksum-offload <host-if-name> <on|off>",
   .function = af_packet_set_l4_cksum_offload_command_fn,
 };
-/* *INDENT-ON* */
 
 clib_error_t *
 af_packet_cli_init (vlib_main_t * vm)
diff --git a/src/vnet/devices/af_packet/device.c b/src/vnet/devices/af_packet/device.c
index 8a6ff1d..0542b16 100644
--- a/src/vnet/devices/af_packet/device.c
+++ b/src/vnet/devices/af_packet/device.c
@@ -74,25 +74,34 @@
   af_packet_main_t *apm = &af_packet_main;
   af_packet_if_t *apif = pool_elt_at_index (apm->interfaces, dev_instance);
   clib_spinlock_lock_if_init (&apif->lockp);
-  u32 block_size = apif->tx_req->tp_block_size;
-  u32 frame_size = apif->tx_req->tp_frame_size;
-  u32 frame_num = apif->tx_req->tp_frame_nr;
+  u32 tx_block_sz = apif->tx_req->tp_block_size;
+  u32 tx_frame_sz = apif->tx_req->tp_frame_size;
+  u32 tx_frame_nr = apif->tx_req->tp_frame_nr;
+  u32 tx_block_nr = apif->tx_req->tp_block_nr;
+  u32 rx_block_size = apif->rx_req->tp_block_size;
+  u32 rx_frame_size = apif->rx_req->tp_frame_size;
+  u32 rx_frame_nr = apif->rx_req->tp_frame_nr;
+  u32 rx_block_nr = apif->rx_req->tp_block_nr;
   int block = 0;
-  u8 *block_start = apif->tx_ring + block * block_size;
+  u8 *tx_block_start = apif->tx_ring + block * tx_block_sz;
   u32 tx_frame = apif->next_tx_frame;
   struct tpacket2_hdr *tph;
 
   s = format (s, "Linux PACKET socket interface\n");
-  s = format (s, "%Ublock:%d frame:%d\n", format_white_space, indent,
-	      block_size, frame_size);
+  s = format (s, "%UTX block size:%d nr:%d  TX frame size:%d nr:%d\n",
+	      format_white_space, indent, tx_block_sz, tx_block_nr,
+	      tx_frame_sz, tx_frame_nr);
+  s = format (s, "%URX block size:%d nr:%d  RX frame size:%d nr:%d\n",
+	      format_white_space, indent, rx_block_size, rx_block_nr,
+	      rx_frame_size, rx_frame_nr);
   s = format (s, "%Unext frame:%d\n", format_white_space, indent,
 	      apif->next_tx_frame);
 
   int n_send_req = 0, n_avail = 0, n_sending = 0, n_tot = 0, n_wrong = 0;
   do
     {
-      tph = (struct tpacket2_hdr *) (block_start + tx_frame * frame_size);
-      tx_frame = (tx_frame + 1) % frame_num;
+      tph = (struct tpacket2_hdr *) (tx_block_start + tx_frame * tx_frame_sz);
+      tx_frame = (tx_frame + 1) % tx_frame_nr;
       if (tph->tp_status == 0)
 	n_avail++;
       else if (tph->tp_status & TP_STATUS_SEND_REQUEST)
@@ -371,7 +380,6 @@
   return 0;			/* no error */
 }
 
-/* *INDENT-OFF* */
 VNET_DEVICE_CLASS (af_packet_device_class) = {
   .name = "af-packet",
   .format_device_name = format_af_packet_device_name,
@@ -385,7 +393,6 @@
   .subif_add_del_function = af_packet_subif_add_del_function,
   .mac_addr_change_function = af_packet_set_mac_address_function,
 };
-/* *INDENT-ON* */
 
 /*
  * fd.io coding-style-patch-verification: ON
diff --git a/src/vnet/devices/af_packet/node.c b/src/vnet/devices/af_packet/node.c
index 9fd115f..caddcfa 100644
--- a/src/vnet/devices/af_packet/node.c
+++ b/src/vnet/devices/af_packet/node.c
@@ -387,7 +387,6 @@
   return n_rx_packets;
 }
 
-/* *INDENT-OFF* */
 VLIB_REGISTER_NODE (af_packet_input_node) = {
   .name = "af-packet-input",
   .flags = VLIB_NODE_FLAG_TRACE_SUPPORTED,
@@ -398,7 +397,6 @@
   .n_errors = AF_PACKET_INPUT_N_ERROR,
   .error_strings = af_packet_input_error_strings,
 };
-/* *INDENT-ON* */
 
 
 /*
