]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
routing: provide dedicated function for nhgrp creation and linking.
authorAlexander V. Chernikov <melifaro@FreeBSD.org>
Fri, 2 Dec 2022 17:58:03 +0000 (17:58 +0000)
committerAlexander V. Chernikov <melifaro@FreeBSD.org>
Fri, 2 Dec 2022 20:08:47 +0000 (20:08 +0000)
commit42f8123a4fa8354f07e3ebce1d3b6c2def7db5a3
tree7cec35c66b650ca628e3850342b112324c0a7f40
parentda5d0a1dbc2838eae7033254705c684d7a013fce
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
sys/net/route/nhgrp_ctl.c
sys/net/route/nhop.h