]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Do not reference returned ifa in in6_ifawithifp().
authorAlexander V. Chernikov <melifaro@FreeBSD.org>
Sun, 14 Feb 2021 10:11:06 +0000 (10:11 +0000)
committerAlexander V. Chernikov <melifaro@FreeBSD.org>
Wed, 10 Mar 2021 21:44:31 +0000 (21:44 +0000)
commit3cff9b2ccfd0b0a2d2309f80bfb98dbd3b025c01
tree839b7f6214a43570bd1d15931f62a2386b5e6c37
parentf21c0366f532888bec164717a93964610ab6baf6
Do not reference returned ifa in in6_ifawithifp().

The only place where in6_ifawithifp() is used is ip6_output(),
 which uses the returned ifa to bump traffic counters.
Given ifa stability guarantees is provided by epoch, do not refcount ifa.

This eliminates 2 atomic ops from IPv6 fast path.

Reviewed By: rstone
Differential Revision: https://reviews.freebsd.org/D28649

(cherry picked from commit 1bd44b11e59f1e9ee7245f8de1f823bc5287b9ef)
sys/netinet6/in6.c
sys/netinet6/ip6_output.c