5 ms·
I don't think TCP_DEFER_ACCEPT does that - "Allow a listener to be awakened only when data arrives on" it just changes the timing of accept()? What you describe
by mkj 5y ago
I don't think TCP_DEFER_ACCEPT does that - "Allow a listener to be awakened only when data arrives on" it just changes the timing of accept()? What you describe sounds more like TCP_CORK, but I don't think that'll work.
Looking a bit more at the network stack perhaps the SYN+ACK is sent straight from the SYN handler with no chance for userspace to pack any data in.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/ipv4/tcp_input.c?h=v5.13#n6860 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...
Edit: Ah, you are right about TCP_DEFER_ACCEPT putting data in the ACK on the client side, I'd forgotten about that.
https://lore.kernel.org/netdev/CAK3+h2ydKQ15U1_2dqWsHAL_LKYm-1xbJvUbeaMJShoOCU_TsA@mail.gmail.com/ https://lore.kernel.org/netdev/CAK3+h2ydKQ15U1_2dqWsHAL_LKYm...
- paraboul 5y agoOops my bad, indeed.