Page MenuHomeFreeBSD

tcp: sync with latest linux tcp_info struct
ClosedPublic

Authored by rscheff on Oct 17 2022, 8:50 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 8, 8:10 AM
Unknown Object (File)
Thu, Nov 7, 4:35 PM
Unknown Object (File)
Thu, Oct 17, 12:59 PM
Unknown Object (File)
Wed, Oct 16, 9:02 PM
Unknown Object (File)
Wed, Oct 16, 1:14 AM
Unknown Object (File)
Tue, Oct 15, 6:18 PM
Unknown Object (File)
Tue, Oct 15, 6:18 PM
Unknown Object (File)
Tue, Oct 15, 3:23 AM
Subscribers

Details

Summary

Update the tcp_info struct based on the latest linux source code
(including AccECN info). Marking all new fields unused (__xxx).
The struct including padding grows to 320 bytes (5 cachelines).

No functional change.

This is in preparation of populating some of these fields with
AccECN info.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 47855
Build 44742: arc lint + arc unit

Event Timeline

Again, I would suggest not to spent padding in the main branch. This is a more generic question than scope of this change. There are two strategies:

  • Don't spend padding in the main branch, always make the structure larger. When merging to stable/N, spend padding there, to make structure compatible. On branching new stable/N+1 no action required.
  • Spend padding in the main branch. Merge to stable/N without adjustments. Just before branching new stable/N+1 a bunch of padding shall be added.

Pros of first strategy: we can't screw up at branching point and end up with to little padding in a stable branch, which we can't extend later. Cons of first strategy: increased number of ABI breakages in the main branch.
Pros/cons of seconds strategy - the opposite.

I'm strongly advocating towards the first one. But I will easily yield if majority disagrees. I think we should have a defined policy here, to avoid this discussion every time.

Just two notes:

  • Using padding fields only provides backwards compatibility if you add fields *just* before the the padding and then reduce the padding. This is not the case with your change. I don't think it can be MFCed.
  • Not sure if it makes sense to add all kind of fields without having a plan to populate them. Maybe just add the fields you actually want to fill in?

I'm a little confused about the tcp_info struct - there are already lots of unused fields; supposedly to have ABI compatibility with linux... so my understanding was, if taking in new fields for tcp_info from Linux, make sure that the remainder of the struct aligns..

(Also, some of these fields sound like they could be populated by RACK/BBR etc)

  • only add placeholder fields for accecn. populate these with the accecn option patch.
This revision is now accepted and ready to land.Nov 3 2022, 4:00 PM
  • only reserve the accecn related counters
This revision now requires review to proceed.Nov 3 2022, 4:11 PM

Not sure about shrinking the padding, but for the rest I'm fine with it.

This revision is now accepted and ready to land.Nov 3 2022, 4:33 PM
This revision was automatically updated to reflect the committed changes.