summaryrefslogtreecommitdiffstats
path: root/src/vcl/ldp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-01-18 08:37:13 -0800
committerDamjan Marion <dmarion@me.com>2019-01-29 16:36:06 +0000
commit0ef8ef2b474473b13de2cee0165b424e79e4e363 (patch)
treebce10bafb40e25844d25604a33095c376e135b0e /src/vcl/ldp.c
parentcac8cfaba977d3822c06452817e43d7f0bdaa189 (diff)
vls: multi-process and multi-threaded apps improvements
- More fine tuning for multi-process applications. - Experimental support for multi-thread apps. This is meant for app whose threads are not vcl workers and the sessions are shared between them. Change-Id: Ie07651da5f2cdcf39f5dead5431f50ad39cf3f74 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vcl/ldp.c')
-rw-r--r--src/vcl/ldp.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c
index 36cff2a67f1..ab4cfbfa257 100644
--- a/src/vcl/ldp.c
+++ b/src/vcl/ldp.c
@@ -739,10 +739,9 @@ ldp_pselect (int nfds, fd_set * __restrict readfds,
vec_len (ldpw->ex_bitmap) *
sizeof (clib_bitmap_t));
- rv = vppcom_select (si_bits, readfds ? ldpw->rd_bitmap : NULL,
- writefds ? ldpw->wr_bitmap : NULL,
- exceptfds ? ldpw->ex_bitmap : NULL,
- vcl_timeout);
+ rv = vls_select (si_bits, readfds ? ldpw->rd_bitmap : NULL,
+ writefds ? ldpw->wr_bitmap : NULL,
+ exceptfds ? ldpw->ex_bitmap : NULL, vcl_timeout);
if (rv < 0)
{
errno = -rv;
@@ -2370,16 +2369,18 @@ ldp_constructor (void)
void
ldp_destructor (void)
{
- swrap_destructor ();
- if (ldp->init)
- ldp->init = 0;
+ /*
+ swrap_destructor ();
+ if (ldp->init)
+ ldp->init = 0;
+ */
/* Don't use clib_warning() here because that calls writev()
* which will call ldp_init().
*/
if (LDP_DEBUG > 0)
- printf ("%s:%d: LDP<%d>: LDP destructor: done!\n",
- __func__, __LINE__, getpid ());
+ fprintf (stderr, "%s:%d: LDP<%d>: LDP destructor: done!\n",
+ __func__, __LINE__, getpid ());
}