From 5614bdc62861f63a25eb2997ddaecbfdc3e06748 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Fri, 9 Jan 2026 17:54:33 +0100 Subject: tcp: remove timer update in tcp_epoll_ctl() Timer update in tcp_epoll_ctl() has been added by bb708111833e ("treewide: Packet abstraction with mandatory boundary checks") because epoll_ref stores "conn - tc" that can change in tcp_table_compact(). But since e2e8219f13b8 ("flow, tcp: Consolidate flow pointer<->index helpers") we use FLOW_IDX() and since 8981a720aac4 ("flow: Avoid moving flow entries to compact table") flow table doesn't use a compaction procedure so FLOW_IDX() never changes. Updating the timer event is now a no-op, remove it from tcp_epoll_ctl(). Fixes: 8981a720aac4 ("flow: Avoid moving flow entries to compact table") Signed-off-by: Laurent Vivier Reviewed-by: David Gibson Signed-off-by: Stefano Brivio --- tcp.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/tcp.c b/tcp.c index 3a9314c..7edfce7 100644 --- a/tcp.c +++ b/tcp.c @@ -550,18 +550,6 @@ static int tcp_epoll_ctl(const struct ctx *c, struct tcp_tap_conn *conn) flow_epollid_set(&conn->f, EPOLLFD_ID_DEFAULT); - if (conn->timer != -1) { - union epoll_ref ref_t = { .type = EPOLL_TYPE_TCP_TIMER, - .fd = conn->timer, - .flow = FLOW_IDX(conn) }; - struct epoll_event ev_t = { .data.u64 = ref_t.u64, - .events = EPOLLIN | EPOLLET }; - - if (epoll_ctl(flow_epollfd(&conn->f), EPOLL_CTL_MOD, - conn->timer, &ev_t)) - return -errno; - } - return 0; } -- cgit v1.2.3