From: Ido Schimmel <idosch@idosch.org>
To: Martin Zaharinov <micron10@gmail.com>
Cc: Eric Dumazet <edumazet@google.com>, netdev <netdev@vger.kernel.org>
Subject: Re: Very slow remove interface from kernel
Date: Tue, 9 May 2023 13:20:20 +0300 [thread overview]
Message-ID: <ZFoeZLOZbNZPUfcg@shredder> (raw)
In-Reply-To: <371A6638-8D92-4891-8DF5-C0EA4FBC1977@gmail.com>
On Tue, May 09, 2023 at 11:22:13AM +0300, Martin Zaharinov wrote:
> add vlans :
> for i in $(seq 2 4094); do ip link add link eth1 name vlan$i type vlan id $i; done
> for i in $(seq 2 4094); do ip link set dev vlan$i up; done
>
>
> and after that run :
>
> for i in $(seq 2 4094); do ip link del link eth1 name vlan$i type vlan id $i; done
>
>
> time for remove for this 4093 vlans is 5-10 min .
>
> Is there options to make fast this ?
If you know you are going to delete all of them together, then you can
add them to the same group during creation:
for i in $(seq 2 4094); do ip link add link eth1 name vlan$i up group 10 type vlan id $i; done
Then delete the group:
ip link del group 10
IIRC, in the past there was a patchset to allow passing a list of
ifindexes instead of a group number, but it never made its way upstream.
next prev parent reply other threads:[~2023-05-09 10:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-09 8:22 Very slow remove interface from kernel Martin Zaharinov
2023-05-09 10:20 ` Ido Schimmel [this message]
2023-05-09 10:32 ` Eric Dumazet
2023-05-09 11:10 ` Martin Zaharinov
2023-05-09 12:36 ` Eric Dumazet
2023-05-09 18:50 ` Martin Zaharinov
2023-05-09 20:08 ` Ido Schimmel
2023-05-09 20:16 ` Martin Zaharinov
2023-05-10 5:31 ` Martin Zaharinov
2023-05-10 6:06 ` Martin Zaharinov
2023-05-10 9:40 ` Eric Dumazet
2023-05-10 13:15 ` Martin Zaharinov
2023-05-25 7:50 ` Martin Zaharinov
2023-05-10 9:16 ` Martin Zaharinov
2023-05-10 9:22 ` Eric Dumazet
2023-05-09 20:08 ` Martin Zaharinov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZFoeZLOZbNZPUfcg@shredder \
--to=idosch@idosch.org \
--cc=edumazet@google.com \
--cc=micron10@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.