Page MenuHomeFreeBSD

Add fibnum, family and vnet pointer to each rib head.
ClosedPublic

Authored by melifaro on Jan 6 2020, 12:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 23, 7:28 AM
Unknown Object (File)
Sat, Nov 23, 12:28 AM
Unknown Object (File)
Thu, Nov 14, 3:31 PM
Unknown Object (File)
Sep 24 2024, 9:18 AM
Unknown Object (File)
Sep 24 2024, 5:13 AM
Unknown Object (File)
Sep 4 2024, 7:52 AM
Unknown Object (File)
Sep 2 2024, 10:41 AM
Unknown Object (File)
Sep 2 2024, 4:39 AM
Subscribers

Details

Summary

Having metadata such as fibnum or vnet in the struct rib_head is handy as it eases building functionality in the routing space.
The first customer of this proposed change are route redirects.
More upcoming changes in the routing stack would benefit from having these fields.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 28496
Build 26553: arc lint + arc unit

Event Timeline

Remove forgotten fields from rib_head.

Thank you so much for splitting this out. It really helps a lot! спасибо большой!

I assume this will not be MFCed due to KPI change?

sys/net/route.c
369

Unrelated blank line.

sys/net/route_var.h
51

I think tableid could be misleading as it is not a unique ID; there might be multiple tables with the same ID. Maybe just calling it FIB is enough?

This revision is now accepted and ready to land.Jan 9 2020, 1:07 PM
In D23047#506342, @bz wrote:

Thank you so much for splitting this out. It really helps a lot! спасибо большой!

Thank you for reviewing this!

I assume this will not be MFCed due to KPI change?

Well, actually I thought of MFC'ing the version which would keep dom_rtattach() and other functions the same, while filling in rib_family and rib_fibnum directly in the vnet_route_init() after call to the dom_rtattach().
Do you have any concerns about this?

sys/net/route_var.h
51

Naming is hard :-) yep, will rename to fib number.

The AF can be set in in6_inithead() already but I understand if you want to do all in the callers together; sounds like a good compromise for an MFC :-) Thanks!