Page MenuHomeFreeBSD

bpf: Add "_if" tap APIs
ClosedPublic

Authored by jhibbits on Jan 17 2023, 4:18 PM.
Tags
None
Referenced Files
F84265253: D38103.id.diff
Tue, May 21, 3:58 PM
Unknown Object (File)
Mon, May 20, 12:17 AM
Unknown Object (File)
Sun, May 19, 6:09 PM
Unknown Object (File)
Sun, May 19, 5:02 PM
Unknown Object (File)
Sat, May 18, 8:51 AM
Unknown Object (File)
Sat, May 18, 3:11 AM
Unknown Object (File)
Thu, May 16, 9:09 PM
Unknown Object (File)
Sun, May 12, 10:28 AM
Subscribers

Details

Reviewers
glebius
Group Reviewers
network
Commits
rG950cc1f44fbd: bpf: Add "_if" tap APIs
Summary

Hide more netstack by making the BPF_TAP macros real functions in the
netstack. "struct ifnet" is used in the header instead of "if_t" to
keep header pollution down.

Diff Detail

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

Event Timeline

Do we really need the "_if" suffix for the new functions? Why don't name them the same way the old macros are named, just lowercase them?

Do we really need the "_if" suffix for the new functions? Why don't name them the same way the old macros are named, just lowercase them?

That would work for the ETHER_BPF_MTAP() analogue, but not the BPF_TAP(), BPF_MTAP() and BPF_MTAP2() macros, those lowercase names are already KPIs that take a BPF pointer. I named ether_bpf_mtap_if() as I did to keep parity with the bpf_tap/mtap_if() names. I considered just co-opting the bpf_tap(), etc names instead, but figured they're KPIs that are probably used by others and didn't want to step on toes there.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 31 2023, 8:03 PM
This revision was automatically updated to reflect the committed changes.