21 Oct
2025
21 Oct
'25
2:14 p.m.
On 20/10/2025 03:34, David Gibson wrote:
@@ -570,7 +572,8 @@ static void tcp_timer_ctl(const struct ctx *c, struct tcp_tap_conn *conn) } conn->timer = fd;
- if (epoll_ctl(c->epollfd, EPOLL_CTL_ADD, conn->timer, &ev)) { + if (epoll_ctl(flow_epollfd(&conn->f), EPOLL_CTL_ADD, + conn->timer, &ev)) { Possibly a question for an earlier patch, but is there a reason we can't use epoll_add() here?
Yes, the fd we use in epoll_ctl() and the fd stored in ref are not the same. The fd in ref is conn->sock (epoll_add() takes fd from ref) but in epoll_ctl() we add conn->timer (the fd from timerfd_create()). Thanks, Laurent