aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-01-14 17:23:11 -0800
committerDave Barach <openvpp@barachs.net>2019-01-17 20:31:39 +0000
commit72b04288d9a670829050a6ca5d931ae5b55b33ed (patch)
tree5f56a66b186c98347e1849531b1b19ee45a3c0e9 /src/vcl
parent4fbc41af4ebbb793da537e90a03affc5b59f492c (diff)
vcl/session: replicate events for shared sessions
Change-Id: I7fb5402d4a530b5f2ffd9bb5787632099f4b4189 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vcl')
-rw-r--r--src/vcl/vcl_private.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/vcl/vcl_private.c b/src/vcl/vcl_private.c
index 32664312f01..4241bcf1789 100644
--- a/src/vcl/vcl_private.c
+++ b/src/vcl/vcl_private.c
@@ -392,6 +392,11 @@ vcl_worker_share_session (vcl_worker_t * parent, vcl_worker_t * wrk,
ss = vcl_shared_session_get (new_s->shared_index);
vec_add1 (ss->workers, wrk->wrk_index);
}
+ if (new_s->rx_fifo)
+ {
+ svm_fifo_add_subscriber (new_s->rx_fifo, wrk->vpp_wrk_index);
+ svm_fifo_add_subscriber (new_s->tx_fifo, wrk->vpp_wrk_index);
+ }
}
int
@@ -416,6 +421,12 @@ vcl_worker_unshare_session (vcl_worker_t * wrk, vcl_session_t * s)
return 1;
}
+ if (s->rx_fifo)
+ {
+ svm_fifo_del_subscriber (s->rx_fifo, wrk->vpp_wrk_index);
+ svm_fifo_del_subscriber (s->tx_fifo, wrk->vpp_wrk_index);
+ }
+
/* If the first removed and not last, start session worker change.
* First request goes to vpp and vpp reflects it back to the right
* worker */