]> git.puffer.fish Git - mirror/frr.git/commit
lib: Correctly handle ppoll pfds.events == 0 17025/head
authorDonald Sharp <sharpd@nvidia.com>
Tue, 8 Oct 2024 01:46:33 +0000 (21:46 -0400)
committerDonald Sharp <sharpd@nvidia.com>
Thu, 17 Oct 2024 15:07:55 +0000 (11:07 -0400)
commitd11ad98ffb1cf74a6f28b9d8c78cdff9d4ce5b56
treea07ad6a71dd706c9c1264a5c1d8005493bec2128
parent466efab870d20ba4cfde3a27f80ae3dcfa96c84a
lib: Correctly handle ppoll pfds.events == 0

The frrevent system is spitting out this message in bgpd:
20:40:15 mem1-roc-f2-b1-r5-t2-d4 bgpd[13166]: [XETTR-D5MR0][EC 100663316] Attempting to process an I/O event but for fd: 214(8) no thread to handle this!

This is because as each io event is processed, it is possible that a
.events is set to 0.  This can leave a situation where we ask
ppoll to handle anything that happens on a fd with a .events of 0,
in this situation ppoll can return POLLERR, which indicates that
something bad has happened on the fd.

Let's set the ppoll fds.fd value to -1 when there are no more
events to be processed.  ppoll specifically calls out that
it will just skip this particular one.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
lib/event.c