Page MenuHomeFreeBSD

ip_mroute: refactor epoch-based locking
ClosedPublic

Authored by wma on Jan 25 2022, 9:23 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 27, 11:23 PM
Unknown Object (File)
Thu, Apr 24, 10:32 AM
Unknown Object (File)
Tue, Apr 22, 5:28 AM
Unknown Object (File)
Mar 26 2025, 1:47 PM
Unknown Object (File)
Mar 23 2025, 3:52 AM
Unknown Object (File)
Mar 19 2025, 2:09 AM
Unknown Object (File)
Mar 2 2025, 11:31 PM
Unknown Object (File)
Mar 1 2025, 3:25 PM
Subscribers

Details

Summary
Remove duplicated epoch_enter and epoch_exit in IP inp/outp routines.
Remove unnecessary macros as well.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

wma requested review of this revision.Jan 25 2022, 9:23 AM

Why do you still require the epoch to enter X_ip_mrouter_done? Epoch isn't required to write to a pointer that points at data protected by epoch.

Do we still need include <netinet/ip_mroute.h> in ip_input.c and ip_output.c after this change?

Updated.

There is still a potential race between rip_detach and handling MRT_DONE (both call ip_mrouter_done). AFAIK these functions are not used at the same time so its highly unlikely this ever happen - I've never seen it so far.
I'm planning to further refactor ip_mroute.c to avoid this kind of issues, but not in this commit.

This revision is now accepted and ready to land.Feb 1 2022, 6:54 PM
This revision was automatically updated to reflect the committed changes.