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
F102074948: D45990.diff
Thu, Nov 7, 7:40 AM
Unknown Object (File)
Fri, Nov 1, 4:43 AM
Unknown Object (File)
Wed, Oct 30, 6:09 AM
Unknown Object (File)
Wed, Oct 30, 6:09 AM
Unknown Object (File)
Wed, Oct 30, 6:09 AM
Unknown Object (File)
Wed, Oct 30, 5:48 AM
Unknown Object (File)
Tue, Oct 22, 1:35 AM
Unknown Object (File)
Thu, Oct 17, 11:07 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