From: Laurent Vivier <lvivier@redhat.com>
To: passt-dev@passt.top
Cc: Laurent Vivier <lvivier@redhat.com>,
David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH v3 1/6] tcp: remove timer update in tcp_epoll_ctl()
Date: Fri, 9 Jan 2026 17:54:33 +0100 [thread overview]
Message-ID: <20260109165438.2492285-2-lvivier@redhat.com> (raw)
In-Reply-To: <20260109165438.2492285-1-lvivier@redhat.com>
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 <lvivier@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
---
tcp.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/tcp.c b/tcp.c
index e7fa85f346b2..5141cdc7e839 100644
--- a/tcp.c
+++ b/tcp.c
@@ -552,18 +552,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;
}
--
2.52.0
next prev parent reply other threads:[~2026-01-09 16:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-09 16:54 [PATCH v3 0/6] flow: Introduce flow_epoll_set() to centralize epoll operations Laurent Vivier
2026-01-09 16:54 ` Laurent Vivier [this message]
2026-01-09 16:54 ` [PATCH v3 2/6] tcp: cleanup timer creation Laurent Vivier
2026-01-09 16:54 ` [PATCH v3 3/6] udp_flow: remove unneeded epoll_ref indirection Laurent Vivier
2026-01-09 16:54 ` [PATCH v3 4/6] udp_flow: Assign socket to flow inside udp_flow_sock() Laurent Vivier
2026-01-09 16:54 ` [PATCH v3 5/6] tcp_splice: Refactor tcp_splice_conn_epoll_events() to per-side computation Laurent Vivier
2026-01-09 16:54 ` [PATCH v3 6/6] flow: Introduce flow_epoll_set() to centralize epoll operations Laurent Vivier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260109165438.2492285-2-lvivier@redhat.com \
--to=lvivier@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=passt-dev@passt.top \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).