vcl svm: provide apps access to fifo chunks
[vpp.git] / src / plugins / hs_apps / vcl / vcl_test.h
index 7586e29..6bb3446 100644 (file)
@@ -444,7 +444,8 @@ vcl_test_read (int fd, uint8_t * buf, uint32_t nbytes,
 }
 
 static inline int
-vcl_test_read_ds (int fd, vppcom_data_segments_t ds, vcl_test_stats_t * stats)
+vcl_test_read_ds (int fd, vppcom_data_segment_t * ds,
+                 vcl_test_stats_t * stats)
 {
   int rx_bytes;
 
@@ -452,7 +453,7 @@ vcl_test_read_ds (int fd, vppcom_data_segments_t ds, vcl_test_stats_t * stats)
     {
       if (stats)
        stats->rx_xacts++;
-      rx_bytes = vppcom_session_read_segments (fd, ds);
+      rx_bytes = vppcom_session_read_segments (fd, ds, 2, ~0);
 
       if (rx_bytes < 0)
        {
@@ -518,6 +519,32 @@ vcl_test_write (int fd, uint8_t * buf, uint32_t nbytes,
   return (tx_bytes);
 }
 
+static inline void
+dump_help (void)
+{
+#define INDENT "\n  "
+
+  printf ("CLIENT: Test configuration commands:"
+         INDENT VCL_TEST_TOKEN_HELP
+         "\t\t\tDisplay help."
+         INDENT VCL_TEST_TOKEN_EXIT
+         "\t\t\tExit test client & server."
+         INDENT VCL_TEST_TOKEN_SHOW_CFG
+         "\t\t\tShow the current test cfg."
+         INDENT VCL_TEST_TOKEN_RUN_UNI
+         "\t\t\tRun the Uni-directional test."
+         INDENT VCL_TEST_TOKEN_RUN_BI
+         "\t\t\tRun the Bi-directional test."
+         INDENT VCL_TEST_TOKEN_VERBOSE
+         "\t\t\tToggle verbose setting."
+         INDENT VCL_TEST_TOKEN_RXBUF_SIZE
+         "<rxbuf size>\tRx buffer size (bytes)."
+         INDENT VCL_TEST_TOKEN_TXBUF_SIZE
+         "<txbuf size>\tTx buffer size (bytes)."
+         INDENT VCL_TEST_TOKEN_NUM_WRITES
+         "<# of writes>\tNumber of txbuf writes to server." "\n");
+}
+
 #endif /* __vcl_test_h__ */
 
 /*