summaryrefslogtreecommitdiffstats
path: root/src/vcl/vcl_test.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-09-17 22:09:02 -0700
committerDamjan Marion <dmarion@me.com>2018-09-20 10:05:48 +0000
commit0e88e851e058f4fb7cc690dbbdb19216ab360d1c (patch)
tree94b6117dfd76cc7a6da2ee344f676d7765d086e3 /src/vcl/vcl_test.h
parent008dbe109ce2714be69ffb6549a0c0198a07f7d0 (diff)
session/svm: add want_tx_event flag to fifo
Have applications use explicit flag to request events from vpp when it transmits from a full fifo. Change-Id: I687c8f050a066bd5ce739d880eaec1f286038d95 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vcl/vcl_test.h')
-rw-r--r--src/vcl/vcl_test.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/vcl/vcl_test.h b/src/vcl/vcl_test.h
index 83e63e1a4e7..68750af89a1 100644
--- a/src/vcl/vcl_test.h
+++ b/src/vcl/vcl_test.h
@@ -125,9 +125,7 @@ static inline int
vcl_test_write (int fd, uint8_t *buf, uint32_t nbytes,
sock_test_stats_t *stats, uint32_t verbose)
{
- int tx_bytes = 0;
- int nbytes_left = nbytes;
- int rv, errno_val;
+ int tx_bytes = 0, nbytes_left = nbytes, rv;
do
{
@@ -163,10 +161,7 @@ vcl_test_write (int fd, uint8_t *buf, uint32_t nbytes,
if (tx_bytes < 0)
{
- errno_val = errno;
- perror ("ERROR in sock_test_write()");
- fprintf (stderr, "SOCK_TEST: ERROR: socket write failed "
- "(errno = %d)!\n", errno_val);
+ vterr ("vpcom_session_write", -errno);
}
else if (stats)
stats->tx_bytes += tx_bytes;