diff options
author | Florin Coras <fcoras@cisco.com> | 2020-04-20 01:32:38 +0000 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2020-04-20 14:46:23 +0000 |
commit | cbce80aaa3f1853856d4d64c95f10d65caa4d786 (patch) | |
tree | 42973c3e26d14ee3cfcc0e7472296d23ccce17f6 /src/vcl | |
parent | b86437b79b82493c2e9728929df417f55b153824 (diff) |
vcl: expand vcl select maps in ldp if needed
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I56c487821233cebf2146745a4706cb573cc088a5
Diffstat (limited to 'src/vcl')
-rw-r--r-- | src/vcl/ldp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c index 66c6d938df6..c23f995d567 100644 --- a/src/vcl/ldp.c +++ b/src/vcl/ldp.c @@ -620,12 +620,13 @@ ldp_select_init_maps (fd_set * __restrict original, if (vlsh == VLS_INVALID_HANDLE) clib_bitmap_set_no_check (*libcb, fd, 1); else - clib_bitmap_set_no_check (*vclb, vlsh_to_session_index (vlsh), 1); + *vclb = clib_bitmap_set (*vclb, vlsh_to_session_index (vlsh), 1); })); /* *INDENT-ON* */ si_bits_set = clib_bitmap_last_set (*vclb) + 1; *si_bits = (si_bits_set > *si_bits) ? si_bits_set : *si_bits; + clib_bitmap_validate (*resultb, *si_bits); libc_bits_set = clib_bitmap_last_set (*libcb) + 1; *libc_bits = (libc_bits_set > *libc_bits) ? libc_bits_set : *libc_bits; @@ -757,15 +758,15 @@ ldp_pselect (int nfds, fd_set * __restrict readfds, { if (readfds) clib_memcpy_fast (ldpw->rd_bitmap, ldpw->si_rd_bitmap, - vec_len (ldpw->rd_bitmap) * + vec_len (ldpw->si_rd_bitmap) * sizeof (clib_bitmap_t)); if (writefds) clib_memcpy_fast (ldpw->wr_bitmap, ldpw->si_wr_bitmap, - vec_len (ldpw->wr_bitmap) * + vec_len (ldpw->si_wr_bitmap) * sizeof (clib_bitmap_t)); if (exceptfds) clib_memcpy_fast (ldpw->ex_bitmap, ldpw->si_ex_bitmap, - vec_len (ldpw->ex_bitmap) * + vec_len (ldpw->si_ex_bitmap) * sizeof (clib_bitmap_t)); rv = vls_select (si_bits, readfds ? ldpw->rd_bitmap : NULL, |