Page MenuHomeFreeBSD

Move access to tcp's t_logstate into inline functions and provide new tracepoint and bbpoint capabilities.
ClosedPublic

Authored by rrs on Feb 28 2023, 10:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Aug 8, 4:26 PM
Unknown Object (File)
Wed, Aug 7, 9:10 PM
Unknown Object (File)
Jul 8 2024, 4:24 PM
Unknown Object (File)
Jul 1 2024, 4:24 PM
Unknown Object (File)
Apr 27 2024, 2:09 AM
Unknown Object (File)
Apr 27 2024, 2:01 AM
Unknown Object (File)
Apr 27 2024, 2:00 AM
Unknown Object (File)
Apr 27 2024, 2:00 AM
Subscribers

Details

Summary

The TCP stacks have long accessed t_logstate directly, but in order to do tracepoints and the new bbpoints
we need to move to using the new inline functions. This adds them and moves rack to now use
the tcp_tracepoints.

Test Plan

make sure that the bblogging works as expected with rack/bbr and freebsd..

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

rrs requested review of this revision.Feb 28 2023, 10:32 PM
This revision is now accepted and ready to land.Feb 28 2023, 11:46 PM
cc removed a subscriber: cc.
cc added inline comments.
sys/netinet/tcp_var.h
161

Just curious, why are you trying to rename this variable and the "t_logpoint" below with an extra underscore prefix? The new one does not match the name pattern above and below.

276–277

Doesn't these two arrays together significantly increases 208 bytes (2 * 13 * 8)? Can they be included within #ifdef TCP_BLACKBOX blocks?

sys/netinet/tcp.h
342

Let's use C standard uint64_t instead of 80-ish BSD u_int64_t.

sys/netinet/tcp.h
342

Sure we can do that .. I like that better but have just been following along... (you don't find u_int64_t anywhere in rack :)

sys/netinet/tcp_var.h
161

The reason I moved it to _t_logstate is to make sure and catch anyone direclty referring to t_logstate (which was the old behavior throughout the code). We
need to move to using the inline macros and changing the name makes sure we catch all places that do that.

276–277

sure, but I think we need this under a new option to match up with
rack.

TCP_ACCOUNTING

since the idea of it is to track TCP cycle use.

This addresses Gleb's comment on the u_x_ type and also creates TCP_ACCOUNTING to address cc's comments
on size.

This revision now requires review to proceed.Mar 10 2023, 3:21 PM

Since we now allow TCP_ACCOUNTING lets make sure it compiles.

This revision is now accepted and ready to land.Mar 22 2023, 6:48 PM
sys/netinet/tcp_var.h
611

I found the value of TF2_TCP_ACCOUNTING is not set by the minimum incremental value in the context. Please consider correct it in a next patch.