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)
Oct 9 2024, 1:59 PM
Unknown Object (File)
Sep 24 2024, 12:39 PM
Unknown Object (File)
Sep 24 2024, 12:39 PM
Unknown Object (File)
Sep 24 2024, 12:39 PM
Unknown Object (File)
Sep 24 2024, 12:38 PM
Unknown Object (File)
Sep 24 2024, 12:28 PM
Unknown Object (File)
Sep 24 2024, 3:23 AM
Unknown Object (File)
Sep 23 2024, 11:01 AM

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.