Skip to content

Ry/faster syn expiry#987

Open
rcgoodfellow wants to merge 6 commits into
timeouts-timeoutsfrom
ry/faster-syn-expiry
Open

Ry/faster syn expiry#987
rcgoodfellow wants to merge 6 commits into
timeouts-timeoutsfrom
ry/faster-syn-expiry

Conversation

@rcgoodfellow
Copy link
Copy Markdown
Contributor

@rcgoodfellow rcgoodfellow commented May 8, 2026

A fork of #985 because Github told me bad things might happen if i retarget it to an r19 derivative branch.

Update: indeed bad things happened on a retarget from #985, so this is just R19 plus the commits from #985 cherry picked.

This PR cuts down the TCP state entry expiry times for TCP flow entries
which are either still within the three-way handshake or are actively
being torn down. This does not affect the validity of any LFT entries
which are responsible for actually *procesing* matched packets -- these
exist on their own 60s expiry cadence.

This might have some impact on flow state tracking, but the correct fix
there is to get #744 over the
line.

Should answer for
oxidecomputer/customer-support#1125.
@rcgoodfellow rcgoodfellow force-pushed the ry/faster-syn-expiry branch from 459486a to a114c80 Compare May 8, 2026 01:45
Comment thread lib/opte/src/engine/port/mod.rs Outdated
Comment thread lib/opte/src/engine/tcp.rs Outdated
Comment thread lib/opte/src/engine/port/mod.rs Outdated
| TcpState::CloseWait
| TcpState::FinWait1
| TcpState::FinWait2 => self.quiescent_ttl,
TcpState::SynSent | TcpState::SynRcvd | TcpState::Listen => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm slightly concerned about LISTEN being here. IIUC, this will expire connections that make the handshake and then don't do much for a while. I dunno how bad that is, but it seems like a "normal" connection and one we'd want to apply the existing logic to, which would map this to keepalive_ttl.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LISTEN is the handshake state for passive open, I think we should be ok here. We only exit the handshake through established.

Comment thread lib/opte/src/engine/tcp.rs Outdated
Comment thread crates/opte-api/src/lib.rs Outdated
Comment thread lib/opte/src/engine/tcp_state.rs
Copy link
Copy Markdown
Contributor

@bnaecker bnaecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, thanks for double-checking and answering those questions.

@AlejandroME AlejandroME added this to the 19 milestone May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants