[Openswan dev] Small optimisation for lots of interfaces

Herbert Xu herbert at gondor.apana.org.au
Thu Nov 24 13:41:10 CET 2005


Paul Wouters <paul at xelerance.com> wrote:
> 
> What is the speed of 'ip addr' on that same machine? I wonder if this
> is due to 'ifconfig' being a legacy command on Linux. It might get
> translated internally into the appropriate 'ip' command.

It most likely is due to ifconfig's use of BSD ioctl's.  ifconfig has
to issue multiple ioctl's for each interface while 'ip addr' can read
a PAGE_SIZE of info on each syscall using netlink.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert at gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


More information about the Dev mailing list