Page MenuHomeFreeBSD

cxgbe/t4_tom: Detach the toep from the tcpcb when entering TIME_WAIT.
ClosedPublic

Authored by np on Jul 17 2024, 5:50 AM.
Tags
None
Referenced Files
F117619445: D45990.diff
Tue, May 20, 11:15 PM
Unknown Object (File)
Sat, May 17, 5:10 AM
Unknown Object (File)
Tue, May 13, 10:10 PM
Unknown Object (File)
Mon, May 12, 8:24 AM
Unknown Object (File)
Sun, May 4, 7:21 AM
Unknown Object (File)
Fri, Apr 25, 11:38 PM
Unknown Object (File)
Fri, Apr 25, 11:38 PM
Unknown Object (File)
Fri, Apr 25, 6:36 PM
Subscribers

Details

Summary

The kernel used to call tod_pcb_detach when entering TIME_WAIT but that
seems to have changed, likely with the TIME_WAIT overhaul in the kernel
some time ago. Catch up by having the driver perform the detach.

The hardware does not handle TIME_WAIT so it's important to detach and
let the kernel arm the 2MSL timer to deal with it.

Reported by: Sony Arpita Das @ Chelsio

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

np requested review of this revision.Jul 17 2024, 5:50 AM

In commit 0d7445193abc7c68703fd9b6de39f3f6cf6b55c9, tcp_twstart() stopped calling tcp_discardcb(), and tcp_discardcb() is what was calling tod_pcb_detach. I guess in theory when time wait completes and the inp is freed is when detach would get called? Another possible fix would be to change tcp_twstart() to explicitly call tcp_offload_detach()? That would fix T3 and not just T4. Alternatively, we could add a new tod_twstart hook and in then in the T4 TOM driver we could have that call t4_pcb_detach?

This revision is now accepted and ready to land.Jul 19 2024, 3:01 PM