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
F163577665: D45990.id141140.diff
Fri, Jul 24, 4:14 PM
Unknown Object (File)
Fri, Jul 24, 2:52 AM
Unknown Object (File)
Tue, Jul 21, 7:07 PM
Unknown Object (File)
Mon, Jul 20, 10:19 PM
Unknown Object (File)
Mon, Jul 6, 4:20 PM
Unknown Object (File)
Mon, Jun 29, 8:39 PM
Unknown Object (File)
Mon, Jun 29, 8:19 PM
Unknown Object (File)
Sat, Jun 27, 12:09 AM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 58669
Build 55557: arc lint + arc unit

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