HomeFreeBSD

Remove per-packet ifa refcounting from IPv6 fast path.

Description

Remove per-packet ifa refcounting from IPv6 fast path.

Currently ip6_input() calls in6ifa_ifwithaddr() for
every local packet, in order to check if the target ip
belongs to the local ifa in proper state and increase
its counters.

in6ifa_ifwithaddr() references found ifa.
With epoch changes, both ip6_input() and all other current callers
of in6ifa_ifwithaddr() do not need this reference
anymore, as epoch provides stability guarantee.

Given that, update in6ifa_ifwithaddr() to allow
it to return ifa without referencing it, while preserving
option for getting referenced ifa if so desired.

Differential Revision: https://reviews.freebsd.org/D28648

(cherry picked from commit 8268d82cff1bcd7969e5b3c676f28684784a7a43)

Details

Provenance
melifaroAuthored on Feb 15 2021, 9:59 PM
Differential Revision
D28648: Remove per-packet ifa refcounting from IPv6 fast path.
Parents
rG4904fbfc7201: Remove now-unused RTF_RNH_LOCKED route flag.
Branches
Unknown
Tags
Unknown