netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Lahav Schlesinger <lschlesinger@drivenets.com>,
	Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev@vger.kernel.org, kuba@kernel.org, idosch@idosch.org,
	nicolas.dichtel@6wind.com, nikolay@nvidia.com
Subject: Re: [PATCH net-next v6] rtnetlink: Support fine-grained netdevice bulk deletion
Date: Tue, 4 Jan 2022 17:18:12 -0700	[thread overview]
Message-ID: <df31afed-13a2-a02b-a5f8-4b76c57631d3@gmail.com> (raw)
In-Reply-To: <20220104204033.rq4467r3kaaowczj@kgollan-pc>

On 1/4/22 1:40 PM, Lahav Schlesinger wrote:
> I tried using dev->unreg_list but it doesn't work e.g. for veth pairs
> where ->dellink() of a veth automatically adds the peer. Therefore if
> @ifindices contains both peers then the first ->dellink() will remove
> the next device from @list_kill. This caused a page fault when
> @list_kill was further iterated on.

make sure you add a selftest for the bulk delete and cover cases with
veth, vlan, vrf, dummy, bridge, ...

> 
> I opted to add a flag to struct net_device as David suggested in order
> to avoid increasing sizeof(struct net_device), but perhaps it's not that
> big of an issue.
> If it's fine then I'll update it.

I was hoping to avoid bloating net_device with 16B that has such a
limited need. In one config I use, net_device is 2048B - a nice size and
an additional 16B makes netdevs much more expensive. A ubuntu config
comes in at 2368, so not really an issue there.

Staring at the existing list_head options close_list seems like a
candidate for a union with bulk_kill_list. If that does not work we can
add a new one.

  parent reply	other threads:[~2022-01-05  0:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-04  8:10 [PATCH net-next v6] rtnetlink: Support fine-grained netdevice bulk deletion Lahav Schlesinger
2022-01-04 14:32 ` Eric Dumazet
2022-01-04 20:40   ` Lahav Schlesinger
2022-01-04 21:12     ` Jakub Kicinski
2022-01-05  0:19       ` David Ahern
2022-01-06 19:51         ` Lahav Schlesinger
2022-01-05  0:18     ` David Ahern [this message]
2022-01-05 16:09       ` David Ahern
2022-01-06 19:54         ` Lahav Schlesinger

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=df31afed-13a2-a02b-a5f8-4b76c57631d3@gmail.com \
    --to=dsahern@gmail.com \
    --cc=eric.dumazet@gmail.com \
    --cc=idosch@idosch.org \
    --cc=kuba@kernel.org \
    --cc=lschlesinger@drivenets.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    --cc=nikolay@nvidia.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).