Page MenuHomeFreeBSD

TCP_INFO for offloaded connections.
ClosedPublic

Authored by np on Mar 24 2018, 2:07 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 6, 10:13 AM
Unknown Object (File)
Fri, May 3, 6:20 PM
Unknown Object (File)
Sun, Apr 28, 9:06 AM
Unknown Object (File)
Tue, Apr 16, 11:25 AM
Unknown Object (File)
Tue, Apr 16, 10:58 AM
Unknown Object (File)
Tue, Apr 16, 2:57 AM
Unknown Object (File)
Apr 10 2024, 5:57 AM
Unknown Object (File)
Jan 19 2024, 1:23 PM

Details

Summary

Add a toedev hook to allow the driver handling an offloaded connection to
provide accurate TCP_INFO.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This should use some kind of serdes to the toe understanding of tcpi is not dependent on the freebsd understanding of tcpi (which is in flux atm)

In D14816#311651, @kevin.bowling_kev009.com wrote:

This should use some kind of serdes to the toe understanding of tcpi is not dependent on the freebsd understanding of tcpi (which is in flux atm)

Hi Kevin,

I'm not sure I fully understood your comment. See D14817 for the driver implementation -- that's the part that fetches up-to-date state from the hardware and fills up some of the tcpi fields.

This feature is being implemented to support userspace tools to monitor the state of TCP connections of interest (including those being handled by cxgbe's TOE).

I don't think we need an explicit shim between TOE drivers and the kernel to try to insulate from changes to 'tcp_info'. 'tcp_info' is already part of the userland ABI, so changes to its layout are already going to require compat shims, etc. (probably a new socket option enum for the new layout, etc.) such that we should be hesitant to change it very often. For KBI breakage you would only have to worry about altering the layout of existing fields in a stable branch (whereas ABI breakage spans multiple stable branches). We already have padding fields to permit adding new fields in our current stable branches. Do we think there are future changes to 'tcp_info' that can't be accommodated by the existing padding fields?

Any radical departure from the current behavior of basically creating and copying struct tcp_info to user space would require a different getsockopt() optname at a bare minimum, and we'd still have to support the current TCP_INFO getsockopt() anyway.

I'm not seeing a problem with @jhb's approach.

Kevin mentioned offline that he has no objections to this change. Anyone else want to review?

This revision was not accepted when it landed; it landed in state Needs Review.Apr 3 2018, 1:09 AM
This revision was automatically updated to reflect the committed changes.