HomeFreeBSD

routing: provide dedicated function for nhgrp creation and linking.

Description

routing: provide dedicated function for nhgrp creation and linking.

There is a need to store client metadata in nexthops and nexthop groups.
This metadata is immutable and participate in nhop/nhg comparison.

Nexthops KPI already supports its: nexthop creation pattern is

nhop_alloc()
nhop_set_...()
...
nhop_get_nhop()

This change provides a similar pattern for the nexthop groups.
Specifically, it adds nhgrp_alloc(), nhgrp_get_nhgrp() and
nhgrp_set_uidx().

MFC after: 2 weeks

Details

Provenance
melifaroAuthored on Dec 2 2022, 5:58 PM
Parents
rGda5d0a1dbc28: kboot: Use unsigned long long.
Branches
Unknown
Tags
Unknown