Page MenuHomeFreeBSD

bpf: Add "_if" tap APIs
ClosedPublic

Authored by jhibbits on Jan 17 2023, 4:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 17 2024, 10:56 PM
Unknown Object (File)
Jan 14 2024, 2:14 PM
Unknown Object (File)
Sep 5 2023, 10:08 AM
Unknown Object (File)
Aug 30 2023, 4:06 PM
Unknown Object (File)
Aug 30 2023, 4:03 PM
Unknown Object (File)
Aug 30 2023, 3:54 PM
Unknown Object (File)
Jun 1 2023, 6:20 PM
Unknown Object (File)
May 27 2023, 11:00 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.