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)
Sat, Dec 21, 5:08 AM
Unknown Object (File)
Nov 29 2024, 11:31 PM
Unknown Object (File)
Nov 11 2024, 6:30 AM
Unknown Object (File)
Oct 13 2024, 8:48 AM
Unknown Object (File)
Oct 4 2024, 8:59 PM
Unknown Object (File)
Oct 4 2024, 7:27 AM
Unknown Object (File)
Oct 4 2024, 5:13 AM
Unknown Object (File)
Sep 30 2024, 1:51 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.