Page MenuHomeFreeBSD

inpcb: remove unused KPIs to manipulate inpcbs
ClosedPublic

Authored by glebius on Mar 12 2024, 1:12 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 13, 2:43 PM
Unknown Object (File)
Oct 18 2024, 9:34 AM
Unknown Object (File)
Oct 2 2024, 5:13 AM
Unknown Object (File)
Sep 20 2024, 4:29 PM
Unknown Object (File)
Sep 17 2024, 6:00 PM
Unknown Object (File)
Sep 17 2024, 7:46 AM
Unknown Object (File)
Sep 16 2024, 3:37 PM
Unknown Object (File)
Sep 16 2024, 1:25 AM
Subscribers

Details

Summary

These KPIs were added in 9d29c635daa69 and through 15 years had zero use.
They slightly remind what IfAPI does for struct ifnet. But IfAPI does
that for the sake of large collection of NIC drivers not being aware of
struct ifnet. For the inpcb it is unclear what could be a large
collection of externally written kernel modules that need extensively use
inpcb and not be aware of its internals at the same time. This isolation
of a structure knowledge requires a lot of work, and just throwing in a
few KPIs isn't helpful.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 56548
Build 53436: arc lint + arc unit

Event Timeline

You may note in the commit message that the inp_inpcbtotcpcb() simply does not work.

This revision is now accepted and ready to land.Mar 12 2024, 1:23 AM
bz added inline comments.
sys/netinet/toecore.h
39

Why is this in this change of removing KPIs?

Otherwise looks good to me.

sys/netinet/toecore.h
39

Because previously tcpcb was implicitly declared via the deleted KPI functions.

sys/netinet/toecore.h
39

How? You are not removing any declaration or #include. It was used but that doesn't declare. Not that it really matters, just feels weird in this change.

sys/netinet/toecore.h
39

I think presence of it in inp_inpcbtotcpcb() was enough to make it compilable before. I will double check, maybe this addition actually belongs to the D44311.

sys/netinet/toecore.h
39

Re-checked. Yes, this makes it not compilable:

-struct tcpcb *
-       inp_inpcbtotcpcb(struct inpcb *inp);