summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-04-24 17:09:25 +0000
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-08-13 17:20:47 +0000
commit138d43ce77443559da70432905a98569f54270b7 (patch)
treea79cffb7d1f7eedf4e8c56a78138d065edb6bda4 /src
parent3b49dc6cc80e1a373363b2ff055327dda89e50db (diff)
vcl: generate select events on read/write errors
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I3429f9d0406b6d710846fc82d77400f26f77fdf4 (cherry picked from commit 5e6222a0332e38316b5a58b23c35cca69bb72025)
Diffstat (limited to 'src')
-rw-r--r--src/vcl/ldp.c1
-rw-r--r--src/vcl/vppcom.c16
2 files changed, 9 insertions, 8 deletions
diff --git a/src/vcl/ldp.c b/src/vcl/ldp.c
index 8bb512a5082..15f5b0753b8 100644
--- a/src/vcl/ldp.c
+++ b/src/vcl/ldp.c
@@ -775,6 +775,7 @@ ldp_pselect (int nfds, fd_set * __restrict readfds,
{
errno = -rv;
rv = -1;
+ goto done;
}
else if (rv > 0)
{
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index 9bf009d7bfa..befaf155692 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -2252,12 +2252,12 @@ vppcom_select (int n_bits, vcl_si_set * read_map, vcl_si_set * write_map,
clib_bitmap_foreach (sid, wrk->wr_bitmap, ({
if (!(session = vcl_session_get (wrk, sid)))
{
- if (except_map && sid < minbits)
- clib_bitmap_set_no_check (except_map, sid, 1);
- continue;
+ clib_bitmap_set_no_check ((uword*)write_map, sid, 1);
+ bits_set++;
+ continue;
}
- if (vcl_session_write_ready (session) > 0)
+ if (vcl_session_write_ready (session))
{
clib_bitmap_set_no_check ((uword*)write_map, sid, 1);
bits_set++;
@@ -2273,12 +2273,12 @@ check_rd:
clib_bitmap_foreach (sid, wrk->rd_bitmap, ({
if (!(session = vcl_session_get (wrk, sid)))
{
- if (except_map && sid < minbits)
- clib_bitmap_set_no_check (except_map, sid, 1);
- continue;
+ clib_bitmap_set_no_check ((uword*)read_map, sid, 1);
+ bits_set++;
+ continue;
}
- if (vcl_session_read_ready (session) > 0)
+ if (vcl_session_read_ready (session))
{
clib_bitmap_set_no_check ((uword*)read_map, sid, 1);
bits_set++;