Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
session svm: non blocking mq
[vpp.git]
/
src
/
plugins
/
unittest
/
session_test.c
diff --git
a/src/plugins/unittest/session_test.c
b/src/plugins/unittest/session_test.c
index
6496a99
..
cd99b0c
100644
(file)
--- a/
src/plugins/unittest/session_test.c
+++ b/
src/plugins/unittest/session_test.c
@@
-1738,9
+1738,7
@@
wait_for_event (svm_msg_q_t * mq, int fd, int epfd, u8 use_eventfd)
{
if (!use_eventfd)
{
{
if (!use_eventfd)
{
- svm_msg_q_lock (mq);
- while (svm_msg_q_is_empty (mq))
- svm_msg_q_wait (mq);
+ svm_msg_q_wait (mq, SVM_MQ_WAIT_EMPTY);
}
else
{
}
else
{
@@
-1764,10
+1762,7
@@
wait_for_event (svm_msg_q_t * mq, int fd, int epfd, u8 use_eventfd)
continue;
if (!svm_msg_q_is_empty (mq))
continue;
if (!svm_msg_q_is_empty (mq))
- {
- svm_msg_q_lock (mq);
- break;
- }
+ break;
}
}
}
}
}
}
@@
-1871,7
+1866,7
@@
session_test_mq_speed (vlib_main_t * vm, unformat_input_t * input)
for (i = 0; i < n_test_msgs; i++)
{
wait_for_event (mq, prod_fd, epfd, use_eventfd);
for (i = 0; i < n_test_msgs; i++)
{
wait_for_event (mq, prod_fd, epfd, use_eventfd);
- svm_msg_q_sub_
w_lock
(mq, &msg);
+ svm_msg_q_sub_
raw
(mq, &msg);
svm_msg_q_free_msg (mq, &msg);
svm_msg_q_unlock (mq);
*counter = *counter + 1;
svm_msg_q_free_msg (mq, &msg);
svm_msg_q_unlock (mq);
*counter = *counter + 1;