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)
Tue, Apr 23, 1:35 PM
Unknown Object (File)
Mon, Apr 22, 11:08 PM
Unknown Object (File)
Fri, Apr 12, 4:52 AM
Unknown Object (File)
Thu, Apr 11, 3:48 PM
Unknown Object (File)
Thu, Apr 11, 2:25 PM
Unknown Object (File)
Tue, Apr 9, 7:56 PM
Unknown Object (File)
Sun, Apr 7, 1:25 AM
Unknown Object (File)
Sat, Apr 6, 10:14 PM
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.