python clients can set the API rx message queue length

Change-Id: I7af1493a823747e0f7389ad6c2093e4cec6c2ce9
Signed-off-by: Dave Barach <dave@barachs.net>
diff --git a/src/vpp-api/python/vpp_papi/pneum_wrap.c b/src/vpp-api/python/vpp_papi/pneum_wrap.c
index 5763707..748b967 100644
--- a/src/vpp-api/python/vpp_papi/pneum_wrap.c
+++ b/src/vpp-api/python/vpp_papi/pneum_wrap.c
@@ -45,12 +45,13 @@
 wrap_connect (PyObject *self, PyObject *args)
 {
   char * name, * chroot_prefix = NULL;
+  int rx_qlen=32; /* default rx queue length */
   int rv;
   PyObject * temp = NULL;
   pneum_callback_t cb = NULL;
 
-  if (!PyArg_ParseTuple(args, "s|Os:wrap_connect",
-			&name, &temp, &chroot_prefix))
+  if (!PyArg_ParseTuple(args, "s|Ois:wrap_connect",
+			&name, &temp, &rx_qlen, &chroot_prefix))
     return (NULL);
 
   if (temp)
@@ -67,7 +68,7 @@
       cb = wrap_pneum_callback;
     }
   Py_BEGIN_ALLOW_THREADS
-    rv = pneum_connect(name, chroot_prefix, cb);
+  rv = pneum_connect(name, chroot_prefix, cb, rx_qlen);
   Py_END_ALLOW_THREADS
   return PyLong_FromLong(rv);
 }
diff --git a/src/vpp-api/python/vpp_papi/vpp_papi.py b/src/vpp-api/python/vpp_papi/vpp_papi.py
index 6b6b79f..4577472 100644
--- a/src/vpp-api/python/vpp_papi/vpp_papi.py
+++ b/src/vpp-api/python/vpp_papi/vpp_papi.py
@@ -303,12 +303,12 @@
             self.vpp_dictionary[name] = { 'id' : i, 'crc' : crc }
             self.vpp_dictionary_maxid = max(self.vpp_dictionary_maxid, i)
 
-    def connect(self, name, chroot_prefix = None, async = False):
+    def connect(self, name, chroot_prefix = None, async = False, rx_qlen = 32):
         msg_handler = self.msg_handler if not async else self.msg_handler_async
         if not chroot_prefix:
-            rv = vpp_api.connect(name, msg_handler)
+            rv = vpp_api.connect(name, msg_handler, rx_qlen)
         else:
-            rv = vpp_api.connect(name, msg_handler, chroot_prefix)
+            rv = vpp_api.connect(name, msg_handler, rx_qlen, chroot_prefix)
 
         if rv != 0:
             raise IOError(2, 'Connect failed')