]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Speed up non-status operations applied to a single interface
authorPatrick Kelsey <pkelsey@FreeBSD.org>
Mon, 28 Jan 2019 20:30:04 +0000 (20:30 +0000)
committerPatrick Kelsey <pkelsey@FreeBSD.org>
Mon, 28 Jan 2019 20:30:04 +0000 (20:30 +0000)
commit80e72d52169469742befe2f0a47b90d316c507ab
treeab6e0976e62f5e8fbb8735083e9c4f4c123a6032
parent59099cd3853da12a4868388d32d1e5578cafa1c5
Speed up non-status operations applied to a single interface

When performing a non-status operation on a single interface, it is
not necessary for ifconfig to build a list of all addresses in the
system, sort them, then iterate through them looking for the entry for
the single interface of interest. Doing so becomes increasingly
expensive as the number of interfaces in the system grows (e.g., in a
system with 1000+ vlan(4) interfaces).

Reviewed by: ae, kp
MFC after: 1 week
Sponsored by: RG Nets
Differential Revision: https://reviews.freebsd.org/D18919
sbin/ifconfig/ifconfig.c