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)
Sun, Apr 21, 9:23 PM
Unknown Object (File)
Fri, Apr 19, 11:25 PM
Unknown Object (File)
Wed, Apr 17, 9:09 PM
Unknown Object (File)
Mar 7 2024, 8:00 PM
Unknown Object (File)
Jan 31 2024, 7:53 AM
Unknown Object (File)
Jan 27 2024, 11:39 AM
Unknown Object (File)
Jan 27 2024, 10:25 AM
Unknown Object (File)
Jan 18 2024, 11:06 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.