svm: fix eventfd signal write error check

Type: fix

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I706c8642ca0877430a42cc0ca5bc61a45428fc98
(cherry picked from commit e4a08c1f3bf58670ff94382b2821518ad954a854)
This commit is contained in:
Florin Coras
2020-01-08 02:37:57 +00:00
committed by Dave Wallace
parent 756437e6f2
commit 06f4a811a7

View File

@ -125,8 +125,8 @@ svm_queue_send_signal_inline (svm_queue_t * q, u8 is_prod)
ASSERT (q->consumer_evtfd > 0 && q->producer_evtfd > 0);
fd = is_prod ? q->producer_evtfd : q->consumer_evtfd;
rv = write (fd, &data, sizeof (data));
if (PREDICT_FALSE (rv))
clib_unix_warning ("signal write returned %d", rv);
if (PREDICT_FALSE (rv < 0))
clib_unix_warning ("signal write on %d returned %d", fd, rv);
}
}