[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20101118081452.7a38deb7@nehalam>
Date: Thu, 18 Nov 2010 08:14:52 -0800
From: Stephen Hemminger <shemminger@...tta.com>
To: daniel.turull@...il.com
Cc: David Miller <davem@...emloft.net>, eric.dumazet@...il.com,
netdev@...r.kernel.org, voravit@....se, robert@...julf.net
Subject: Re: [PATH] dev: reusing unregistered ifindex values in net_device
On Thu, 18 Nov 2010 08:01:39 -0800 (PST)
David Miller <davem@...emloft.net> wrote:
> From: Eric Dumazet <eric.dumazet@...il.com>
> Date: Thu, 18 Nov 2010 16:37:08 +0100
>
> > Two bugs
> >
> > 1) ifindex is not initialized : you'll be suprised of random values
> >
> > 2) ifindex should not be reused. You'll be surprised so applications can
> > break. SNMP comes to mind.
>
> Right, the current algorithm is intentionally trying to avoid new
> devices from using indexes that were used by another device in the
> past.
Also think of the case of adding 10,000 VLAN's. If the search started from
beginning on each insertion dev_new_index would go from O(N) to O(N^2) which
really hurts.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists