aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session
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/vnet/session
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/vnet/session')
-rw-r--r--src/vnet/session/session_node.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index f5aed7490ea..e2a6f4c67c6 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -817,7 +817,7 @@ skip_dequeue:
{
stream_session_t *s; /* $$$ prefetch 1 ahead maybe */
session_event_t *e;
- u8 is_full;
+ u8 want_tx_evt;
e = &fifo_events[i];
switch (e->event_type)
@@ -836,18 +836,19 @@ skip_dequeue:
clib_warning ("It's dead, Jim!");
continue;
}
- is_full = svm_fifo_is_full (s->server_tx_fifo);
+ want_tx_evt = svm_fifo_want_tx_evt (s->server_tx_fifo);
/* Spray packets in per session type frames, since they go to
* different nodes */
rv = (smm->session_tx_fns[s->session_type]) (vm, node, e, s,
&n_tx_packets);
if (PREDICT_TRUE (rv == SESSION_TX_OK))
{
- /* Notify app there's tx space if not polling */
- if (PREDICT_FALSE (is_full
- && !svm_fifo_has_event (s->server_tx_fifo)))
- session_dequeue_notify (s);
+ if (PREDICT_FALSE (want_tx_evt))
+ {
+ svm_fifo_set_want_tx_evt (s->server_tx_fifo, 0);
+ session_dequeue_notify (s);
+ }
}
else if (PREDICT_FALSE (rv == SESSION_TX_NO_BUFFERS))
{