Page MenuHomeFreeBSD

ifnet/API: Privatize the implementation of the drbr_* APIs
ClosedPublic

Authored by jhibbits on Jan 17 2023, 4:20 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 8, 7:13 PM
Unknown Object (File)
Fri, Nov 8, 7:12 PM
Unknown Object (File)
Wed, Nov 6, 12:10 PM
Unknown Object (File)
Thu, Oct 31, 4:59 PM
Unknown Object (File)
Sep 30 2024, 9:21 AM
Unknown Object (File)
Sep 24 2024, 1:28 PM
Unknown Object (File)
Sep 24 2024, 1:28 PM
Unknown Object (File)
Sep 24 2024, 1:28 PM
Subscribers

Details

Summary

When ALTQ is enabled ifnet accessors already need to be called, largely
defeating the purpose of the inline. To that extent, make the ALTQ form
functions in the netstack proper, and make them always available.

Diff Detail

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

Event Timeline

sys/net/ifq.h
317–331
318–328

IMHO, these forward declarations should be under #ifdef ALTQ. Otherwise, with non-ALTQ case, we will have a forward declaration of a function as non-static, followed by a static implementation. Looks like our compiler doesn't care about that, but it could confuse other compilers. I could be wrong here, but better stay safe.

331

drbr_free() being the same for both cases should go down below (or may be higher up).

338
sys/net/ifq.h
318–328

Correct, my build testing was with LINT, which enables ALTQ so I didn't see any errors or warnings. Will fix it.

331

Moving this down below the block, since it needs drbr_flush().

This revision is now accepted and ready to land.Jan 23 2023, 7:09 PM

Faied to build with ALTQ disabled, functions redefined. Explicitly define ALTQ to only get the prototypes, and also suggest this is intended only for ALTQ.

This revision now requires review to proceed.Jan 25 2023, 8:47 PM
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.