Page MenuHomeFreeBSD

LinuxKPI: add (skeleton) functions to make things compile
ClosedPublic

Authored by bz on Dec 3 2022, 11:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 18, 12:33 AM
Unknown Object (File)
Feb 20 2024, 5:56 AM
Unknown Object (File)
Dec 20 2023, 5:28 AM
Unknown Object (File)
Dec 12 2023, 2:27 AM
Unknown Object (File)
Oct 12 2023, 12:58 AM
Unknown Object (File)
Sep 30 2023, 7:15 PM
Unknown Object (File)
Aug 25 2023, 4:06 PM
Unknown Object (File)
Aug 15 2023, 10:35 PM

Details

Summary

Add more functions to netdevice.h (netif_napi_add_tx() being the only
one implemented) and add platform_device.h and netlink.h in order to
make driver code compile.
The skeleton functions are used only in very limited scope and not at
all in our usage so far but add (invasive) #ifdef if removed.
Add pr_debug() calls to each of them in order to log a TODO (if DEBUG
compiled in) and someone should hit them in the future.

MFC after: 3 days

Test Plan

In the local dev tree I actually use more prominent logging
or even panic on them and have not come across them.

Diff Detail

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

Event Timeline

bz requested review of this revision.Dec 3 2022, 11:08 PM
hselasky added inline comments.
sys/compat/linuxkpi/common/include/linux/netdevice.h
465

This probably would be READ_ONCE() or the real rcu_dereference()

We have network stuff under EPOCH, so READ_ONCE() is appropriate here, event if it is intended for RCU.

sys/compat/linuxkpi/common/include/linux/platform_device.h
42

space after "int"

bz marked 2 inline comments as done.Dec 18 2022, 10:03 PM
bz added inline comments.
sys/compat/linuxkpi/common/include/linux/platform_device.h
42

Sorry this now looks weird in the review with all the tabs.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 13 2023, 12:40 AM
This revision was automatically updated to reflect the committed changes.
bz marked an inline comment as done.