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)
Mon, Dec 9, 12:37 PM
Unknown Object (File)
Wed, Dec 4, 2:44 AM
Unknown Object (File)
Tue, Nov 26, 8:44 PM
Unknown Object (File)
Sat, Nov 16, 8:48 PM
Unknown Object (File)
Nov 10 2024, 11:10 AM
Unknown Object (File)
Oct 10 2024, 3:04 AM
Unknown Object (File)
Sep 27 2024, 3:17 PM
Unknown Object (File)
Sep 24 2024, 1:22 PM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 49148
Build 46037: arc lint + arc unit

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.