HomeFreeBSD

tcp: improve consistency of SYN-cache handling

Description

tcp: improve consistency of SYN-cache handling

Originally, a SYN-cache entry was always allocated and later freed,
when not needed anymore. Then the allocation was avoided, when no
SYN-cache entry was needed, and a copy on the stack was used.
But the logic regarding freeing was not updated.
This patch doesn't re-check conditions (which may have changed) when
deciding to insert or free the entry, but uses the result of
the earlier check.
This simplifies the code and improves also consistency.

Reviewed by: glebius
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46410

(cherry picked from commit e41364711ca3f7e214f9607ebedf62e03e51633d)

Details

Provenance
tuexenAuthored on Aug 22 2024, 8:17 PM
Reviewer
glebius
Differential Revision
D46410: tcp: improve consistency of SYN-cache handling
Parents
rG5420e4f56389: tcp: initialize the LRO hash table with correct size
Branches
Unknown
Tags
Unknown