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
F82049586: D23047.diff
Thu, Apr 25, 12:25 AM
Unknown Object (File)
Tue, Apr 23, 12:55 PM
Unknown Object (File)
Feb 15 2024, 6:08 PM
Unknown Object (File)
Jan 10 2024, 1:13 PM
Unknown Object (File)
Dec 21 2023, 11:46 PM
Unknown Object (File)
Dec 20 2023, 6:05 AM
Unknown Object (File)
Dec 19 2023, 12:04 PM
Unknown Object (File)
Nov 19 2023, 5:28 PM
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 Not Applicable
Unit
Tests Not Applicable

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 ↗(On Diff #66396)

Unrelated blank line.

sys/net/route_var.h
51 ↗(On Diff #66396)

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 ↗(On Diff #66396)

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!