Page MenuHomeFreeBSD

tcp: improve initializing the fields in tcp_log_buffer
ClosedPublic

Authored by tuexen on Apr 2 2025, 8:56 PM.
Tags
None
Referenced Files
F137170785: D49652.id153142.diff
Fri, Nov 21, 8:52 AM
F137170629: D49652.id153057.diff
Fri, Nov 21, 8:52 AM
F137169149: D49652.id.diff
Fri, Nov 21, 8:45 AM
F137168891: D49652.diff
Fri, Nov 21, 8:43 AM
Unknown Object (File)
Fri, Nov 7, 11:22 AM
Unknown Object (File)
Thu, Nov 6, 1:21 PM
Unknown Object (File)
Wed, Nov 5, 10:10 AM
Unknown Object (File)
Fri, Oct 31, 8:55 PM

Details

Summary

Initialize the fields in the tcp_log_buffer in the sequence they appear in the structure and add the initialization of tlb_flex1, tlb_flex2, and _pad[].

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tuexen requested review of this revision.Apr 2 2025, 8:56 PM

IMHO, these macros are more obfuscation than a helper. I would write one big sparse initializer here and let compiler optimize wrt padding zeroing.

This revision is now accepted and ready to land.Apr 3 2025, 10:51 AM

Note I do agree with Gleb here, these macros are just nasty and not very clear. However I think that making such a change should be a separate commit from this one!