Date: Sat, 5 Apr 2008 18:50:34 +0200 From: Max Laier <max@love2party.net> To: freebsd-net@freebsd.org Cc: Bruce M Simpson <bms@incunabulum.net> Subject: Re: getifaddrs() scalability Message-ID: <200804051850.34371.max@love2party.net> In-Reply-To: <47F78E90.1000706@incunabulum.net> References: <47F78E90.1000706@incunabulum.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 05 April 2008 16:37:04 Bruce M Simpson wrote: > Just off the top of my head... > ...has anyone run into problems with the scalability of this call? > > One of the XORP users needs to create =BB1000 interfaces in Linux, and > I'm wondering if any FreeBSD users need to create that amount of > network interfaces. > > As such the getifaddrs() call is likely to get slow in that scenario, > as it uses a linked list. I'm not sure what you are trying to achieve. getifaddrs is the API to get= =20 a complete and consistent snapshot of all currently configured addresses=20 and I don't think there is a better way to represent that then a linked=20 list. If you need to do lookups in userland you should build your own=20 data structure off of that list. You can use a PF_ROUTE socket to watch=20 for changes and modify your view accordingly. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200804051850.34371.max>