HomeFreeBSD

[lltable] Restructure nd6 code.

Description

[lltable] Restructure nd6 code.

Factor out lltable locking logic from lltable_try_set_entry_addr()
into a separate lltable_acquire_wlock(), so the latter can be used
in other parts of the code w/o duplication.

Create nd6_try_set_entry_addr() to avoid code duplication in nd6.c
and nd6_nbr.c.

Move lle creation logic from nd6_resolve_slow() into a separate
nd6_get_llentry() to simplify the former.

These changes serve as a pre-requisite for implementing
RFC8950 (IPv4 prefixes with IPv6 nexthops).

Differential Revision: https://reviews.freebsd.org/D31432
MFC after: 2 weeks

Details

Provenance
melifaroAuthored on Aug 6 2021, 8:27 AM
Differential Revision
D31432: [lltable] Restructure nd6 code
Parents
rG3676512b60d6: bhyve: Use fspacectl(2) for BOP_DELETE on regular file images
Branches
Unknown
Tags
Unknown