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, May 3, 7:38 PM
Unknown Object (File)
Fri, Apr 19, 11:03 AM
Unknown Object (File)
Mar 14 2024, 12:39 PM
Unknown Object (File)
Mar 14 2024, 12:31 PM
Unknown Object (File)
Feb 26 2024, 6:13 AM
Unknown Object (File)
Jan 29 2024, 8:49 PM
Unknown Object (File)
Jan 14 2024, 2:15 PM
Unknown Object (File)
Dec 20 2023, 7:49 AM
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.