Page MenuHomeFreeBSD

tcp: Make tcp_var.h more self-contained
ClosedPublic

Authored by markj on Apr 8 2024, 5:40 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jan 4, 7:36 AM
Unknown Object (File)
Dec 6 2024, 3:50 PM
Unknown Object (File)
Nov 26 2024, 3:01 PM
Unknown Object (File)
Nov 25 2024, 4:10 PM
Unknown Object (File)
Nov 25 2024, 11:27 AM
Unknown Object (File)
Nov 23 2024, 11:45 PM
Unknown Object (File)
Nov 5 2024, 3:02 AM
Unknown Object (File)
Nov 3 2024, 4:43 AM

Details

Summary

struct tcpcb embeds a struct osd and a struct callout. Rather than
forcing all consumers to pull in the same
headers, include the headers directly.

No functional change intended.

Diff Detail

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

Event Timeline

markj requested review of this revision.Apr 8 2024, 5:40 PM

There is a guard at line 88:

#if defined(_KERNEL) || defined(_WANT_TCPCB)

Maybe move the includes there, just next to netinet/cc/cc.h?
What's the final goal of the change?

Include headers only when needed.

There is a guard at line 88:

#if defined(_KERNEL) || defined(_WANT_TCPCB)

Maybe move the includes there, just next to netinet/cc/cc.h?

Thanks, I missed that. Done.

What's the final goal of the change?

In general we've been trying to make kernel headers self-contained when possible. In my case I found some bits in net-snmp which do not compile because these includes are missing.

I'm fine with this change, but I really prefer net-snmp not to know anything about struct tcpcb. I'll take a look at it later.

This revision was not accepted when it landed; it landed in state Needs Review.Apr 10 2024, 12:54 PM
This revision was automatically updated to reflect the committed changes.