uint32_t test;
uint32_t ctrl_handle;
uint32_t num_test_sessions;
+ uint32_t num_test_sessions_perq;
+ uint32_t num_test_qsessions;
uint32_t verbose;
uint32_t address_ip6;
uint32_t transport_udp;
- uint32_t transport_tls;
uint64_t rxbuf_size;
uint64_t txbuf_size;
uint64_t num_writes;
char *rxbuf;
vcl_test_cfg_t cfg;
vcl_test_stats_t stats;
+ int session_index;
} vcl_test_session_t;
cfg->test = VCL_TEST_TYPE_NONE;
cfg->ctrl_handle = ~0;
cfg->num_test_sessions = 1;
+ cfg->num_test_sessions_perq = 1;
cfg->verbose = 0;
cfg->rxbuf_size = VCL_TEST_CFG_RXBUF_SIZE_DEF;
cfg->num_writes = VCL_TEST_CFG_NUM_WRITES_DEF;
if (rv < 0)
{
errno = -rv;
- rv = -1;
- }
- if (rv < 0)
- {
- if ((errno == EAGAIN) || (errno == EWOULDBLOCK))
- {
- if (stats)
- stats->tx_eagain++;
- break;
- }
- else
- break;
+ if ((errno == EAGAIN || errno == EWOULDBLOCK) && stats)
+ stats->tx_eagain++;
+ break;
}
tx_bytes += rv;
- if (tx_bytes != nbytes)
- {
- nbytes_left = nbytes_left - rv;
- buf += rv;
- if (stats)
- stats->tx_incomp++;
- }
+ nbytes_left = nbytes_left - rv;
+ buf += rv;
+ if (stats)
+ stats->tx_incomp++;
}
while (tx_bytes != 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__ */
/*