summaryrefslogtreecommitdiffstats
path: root/src/plugins/hs_apps/vcl/vcl_test.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/hs_apps/vcl/vcl_test.h')
-rw-r--r--src/plugins/hs_apps/vcl/vcl_test.h31
1 files changed, 11 insertions, 20 deletions
diff --git a/src/plugins/hs_apps/vcl/vcl_test.h b/src/plugins/hs_apps/vcl/vcl_test.h
index ab05f7ae9cf..7586e29749a 100644
--- a/src/plugins/hs_apps/vcl/vcl_test.h
+++ b/src/plugins/hs_apps/vcl/vcl_test.h
@@ -86,10 +86,11 @@ typedef struct __attribute__ ((packed))
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;
@@ -119,6 +120,7 @@ typedef struct
char *rxbuf;
vcl_test_cfg_t cfg;
vcl_test_stats_t stats;
+ int session_index;
} vcl_test_session_t;
@@ -201,6 +203,7 @@ vcl_test_cfg_init (vcl_test_cfg_t * cfg)
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;
@@ -491,28 +494,16 @@ vcl_test_write (int fd, uint8_t * buf, uint32_t nbytes,
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);