Page MenuHomeFreeBSD

Fix issue with RACK/BBR when VIMAGE is enabled
ClosedPublic

Authored by tuexen on Jul 18 2021, 10:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Oct 22, 3:05 AM
Unknown Object (File)
Oct 3 2024, 6:58 PM
Unknown Object (File)
Sep 30 2024, 9:01 AM
Unknown Object (File)
Sep 27 2024, 8:27 AM
Unknown Object (File)
Sep 26 2024, 5:10 AM
Unknown Object (File)
Sep 24 2024, 6:53 PM
Unknown Object (File)
Sep 24 2024, 11:44 AM
Unknown Object (File)
Sep 22 2024, 2:20 PM
Subscribers

Details

Summary

CURVNET_RESTORE expands to multiple expressions. So enclose it in curly brackets when used in an if statement.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

why not fix curvnet macros?

In D31212#702735, @mjg wrote:

why not fix curvnet macros?

Are they broken? I guess you can change them for CURVNET_RESTORE, but not for CURVNET_SET. So I guess they are done this way for consistency... But I don't know for sure, since I did not invent them...

The man page explicitly state that

if (condition)
        CURVNET_SET(vnet);

will not work, but it does not say anything regarding CURVNET_RESTORE.

This revision is now accepted and ready to land.Jul 19 2021, 6:26 PM

The need to guard their use with { } is most definitely a bug and will keep tripping people over.

Looking at the code I have to say I don't see a fix which does not induce churn. If the set/restore macros took an argument we would be set, but it's definitely not something I'm going to spend time on nor will demand someone else does.