diff --git a/extras/libmemif/examples/common/common.h b/extras/libmemif/examples/common/common.h
index ce4ead2..3538e39 100644
--- a/extras/libmemif/examples/common/common.h
+++ b/extras/libmemif/examples/common/common.h
@@ -78,6 +78,10 @@
   uint8_t ip_addr[4];
   /* interface hw address */
   uint8_t hw_addr[6];
+  /* buffer size */
+  uint16_t buffer_size;
+  /* headroom size */
+  uint16_t headroom_size;
 } memif_connection_t;
 
 void print_version ();
@@ -113,4 +117,4 @@
 /* ICMPv4 and ARP handler */
 int icmp_packet_handler (memif_connection_t *conn);
 
-#endif /* COMMON_H */
\ No newline at end of file
+#endif /* COMMON_H */
diff --git a/extras/libmemif/examples/common/responder.c b/extras/libmemif/examples/common/responder.c
index e0fa9e3..3edf911 100644
--- a/extras/libmemif/examples/common/responder.c
+++ b/extras/libmemif/examples/common/responder.c
@@ -19,7 +19,7 @@
     {
       /* allocate tx buffers */
       err = memif_buffer_alloc (conn, qid, c->tx_bufs, c->rx_buf_num,
-				&c->tx_buf_num, 2048);
+				&c->tx_buf_num, c->buffer_size);
       /* suppress full ring error MEMIF_ERR_NOBUF_RING */
       if (err != MEMIF_ERR_SUCCESS && err != MEMIF_ERR_NOBUF_RING)
 	{
@@ -42,7 +42,7 @@
       /* Done processing packets */
 
       /* refill the queue */
-      err = memif_refill_queue (conn, qid, c->tx_buf_num, 0);
+      err = memif_refill_queue (conn, qid, c->tx_buf_num, c->headroom_size);
       if (err != MEMIF_ERR_SUCCESS)
 	{
 	  INFO ("memif_refill_queue: %s", memif_strerror (err));
@@ -70,7 +70,7 @@
   return 0;
 
 error:
-  err = memif_refill_queue (conn, qid, c->rx_buf_num, 0);
+  err = memif_refill_queue (conn, qid, c->rx_buf_num, c->headroom_size);
   if (err != MEMIF_ERR_SUCCESS)
     {
       INFO ("memif_refill_queue: %s", memif_strerror (err));
@@ -130,7 +130,7 @@
 	}
 
       /* refill the queue */
-      err = memif_refill_queue (conn, qid, tx, 0);
+      err = memif_refill_queue (conn, qid, tx, c->headroom_size);
       if (err != MEMIF_ERR_SUCCESS)
 	{
 	  INFO ("memif_refill_queue: %s", memif_strerror (err));
@@ -160,7 +160,7 @@
   return 0;
 
 error:
-  err = memif_refill_queue (conn, qid, c->rx_buf_num, 0);
+  err = memif_refill_queue (conn, qid, c->rx_buf_num, c->headroom_size);
   if (err != MEMIF_ERR_SUCCESS)
     {
       INFO ("memif_refill_queue: %s", memif_strerror (err));
@@ -169,4 +169,4 @@
   c->rx_buf_num = 0;
 
   return -1;
-}
\ No newline at end of file
+}
diff --git a/extras/libmemif/examples/icmp_responder/main.c b/extras/libmemif/examples/icmp_responder/main.c
index 32b8ed7..f89f579 100644
--- a/extras/libmemif/examples/icmp_responder/main.c
+++ b/extras/libmemif/examples/icmp_responder/main.c
@@ -52,13 +52,15 @@
   c->is_connected = 1;
   alloc_memif_buffers (c);
 
-  err = memif_refill_queue (conn, 0, -1, 0);
+  err = memif_refill_queue (conn, 0, -1, c->headroom_size);
   if (err != MEMIF_ERR_SUCCESS)
     {
       INFO ("memif_refill_queue: %s", memif_strerror (err));
       return err;
     }
 
+  print_memif_details (c);
+
   return 0;
 }
 
@@ -104,9 +106,11 @@
   printf ("\t-r\tInterface role <slave|master>. Default: slave\n");
   printf ("\t-s\tSocket path. Supports abstract socket using @ before the "
 	  "path. Default: /run/vpp/memif.sock\n");
+  printf ("\t-b\tBuffer Size. Default: 2048\n");
+  printf ("\t-h\tHeadroom Size. Default: 0\n");
   printf ("\t-i\tInterface id. Default: 0\n");
   printf ("\t-a\tIPv4 address. Default: 192.168.1.1\n");
-  printf ("\t-h\tMac address. Default: aa:aa:aa:aa:aa:aa\n");
+  printf ("\t-m\tMac address. Default: aa:aa:aa:aa:aa:aa\n");
   printf ("\t-?\tShow help and exit.\n");
   printf ("\t-v\tShow libmemif and memif version information and exit.\n");
 }
@@ -130,7 +134,7 @@
   memcpy (intf.ip_addr, IP_ADDR, 4);
   memcpy (intf.hw_addr, HW_ADDR, 6);
 
-  while ((opt = getopt (argc, argv, "r:s:i:a:h:?v")) != -1)
+  while ((opt = getopt (argc, argv, "r:s:b:h:i:a:m:?v")) != -1)
     {
       switch (opt)
 	{
@@ -152,6 +156,12 @@
 	case 's':
 	  sprintf (socket_path, "%s", optarg);
 	  break;
+	case 'b':
+	  intf.buffer_size = atoi (optarg);
+	  break;
+	case 'h':
+	  intf.headroom_size = atoi (optarg);
+	  break;
 	case 'i':
 	  id = atoi (optarg);
 	  break;
@@ -162,7 +172,7 @@
 	      return -1;
 	    }
 	  break;
-	case 'h':
+	case 'm':
 	  if (parse_mac (optarg, intf.hw_addr) != 0)
 	    {
 	      INFO ("Invalid mac address: %s", optarg);
@@ -207,6 +217,8 @@
    * Both interaces are assigned the same socket and same id to create a
    * loopback.
    */
+  if (intf.buffer_size)
+    memif_conn_args.buffer_size = intf.buffer_size;
 
   memif_conn_args.socket = memif_socket;
   memif_conn_args.interface_id = id;
