Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
vcl: unset fifo evt before size check
[vpp.git]
/
src
/
vcl
/
vppcom.c
diff --git
a/src/vcl/vppcom.c
b/src/vcl/vppcom.c
index
4b2f1f1
..
e929fa1
100644
(file)
--- a/
src/vcl/vppcom.c
+++ b/
src/vcl/vppcom.c
@@
-2052,13
+2052,13
@@
vppcom_session_read_internal (uint32_t session_handle, void *buf, int n,
if (svm_fifo_is_empty_cons (rx_fifo))
{
if (svm_fifo_is_empty_cons (rx_fifo))
{
+ if (is_ct)
+ svm_fifo_unset_event (s->rx_fifo);
+ svm_fifo_unset_event (rx_fifo);
if (is_nonblocking)
{
if (vcl_session_is_closing (s))
return vcl_session_closing_error (s);
if (is_nonblocking)
{
if (vcl_session_is_closing (s))
return vcl_session_closing_error (s);
- if (is_ct)
- svm_fifo_unset_event (s->rx_fifo);
- svm_fifo_unset_event (rx_fifo);
return VPPCOM_EWOULDBLOCK;
}
while (svm_fifo_is_empty_cons (rx_fifo))
return VPPCOM_EWOULDBLOCK;
}
while (svm_fifo_is_empty_cons (rx_fifo))
@@
-2164,11
+2164,13
@@
vppcom_session_read_segments (uint32_t session_handle,
if (svm_fifo_is_empty_cons (rx_fifo))
{
if (svm_fifo_is_empty_cons (rx_fifo))
{
+ if (is_ct)
+ svm_fifo_unset_event (s->rx_fifo);
+ svm_fifo_unset_event (rx_fifo);
if (is_nonblocking)
{
if (is_nonblocking)
{
- if (is_ct)
- svm_fifo_unset_event (s->rx_fifo);
- svm_fifo_unset_event (rx_fifo);
+ if (vcl_session_is_closing (s))
+ return vcl_session_closing_error (s);
return VPPCOM_EWOULDBLOCK;
}
while (svm_fifo_is_empty_cons (rx_fifo))
return VPPCOM_EWOULDBLOCK;
}
while (svm_fifo_is_empty_cons (rx_fifo))