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

(cherry picked from commit 0b79b007ebfc250a8a7b928df268ada6f1c988c4)

Details

Provenance
melifaroAuthored on Aug 6 2021, 8:27 AM
Differential Revision
D31432: [lltable] Restructure nd6 code
Parents
rG0ea561762ba5: Use lltable calculated header when sending lle holdchain after successful lleā€¦
Branches
Unknown
Tags
Unknown