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, Jan 26, 9:37 AM
Unknown Object (File)
Wed, Jan 22, 10:10 PM
Unknown Object (File)
Sat, Jan 18, 5:48 AM
Unknown Object (File)
Dec 26 2024, 12:58 AM
Unknown Object (File)
Dec 13 2024, 9:55 AM
Unknown Object (File)
Nov 3 2024, 3:31 AM
Unknown Object (File)
Sep 18 2024, 9:08 PM
Unknown Object (File)
Sep 18 2024, 11:57 AM
Subscribers

Details

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

Diff Detail

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

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.