Subject: Re: [iproute2] iproute2: Allow 'ip addr flush' to loop more than 10 times.

From: Stephen Hemminger <[email-masked]>
Date: Wed, 4 Aug 2010 14:00:12 -0700

On Mon, 28 Jun 2010 22:55:59 -0700
[email-masked] wrote:

> From: Ben Greear <[email-masked]>
> 
> The default remains at 10 for backwards compatibility.
> 
> For instance:
>  # ip addr flush dev eth2
>  *** Flush remains incomplete after 10 rounds. ***
>  # ip -l 20 addr flush dev eth2
>  *** Flush remains incomplete after 20 rounds. ***
>  # ip -loops 0 addr flush dev eth2
>  #
> 
> This is useful for getting rid of large numbers of IP
> addresses in scripts.
> 
> Signed-off-by: Ben Greear <[email-masked]>

The current userspace driven flush behavior is crap.
There really should be an atomic flush netlink message
with kernel support.