From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
To: Kirill Tkhai <ktkhai@virtuozzo.com>
Cc: santosh.shilimkar@oracle.com, davem@davemloft.net,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
rds-devel@oss.oracle.com, edumazet@google.com
Subject: Re: [PATCH RFC RFC] rds: Use NETDEV_UNREGISTER in rds_tcp_dev_event() (then kill NETDEV_UNREGISTER_FINAL)
Date: Fri, 16 Mar 2018 09:00:08 -0400 [thread overview]
Message-ID: <20180316130008.GE16870@oracle.com> (raw)
In-Reply-To: <152120385651.2065.2567466917573907029.stgit@localhost.localdomain>
On (03/16/18 15:38), Kirill Tkhai wrote:
>
> 467fa15356acf by Sowmini Varadhan added NETDEV_UNREGISTER_FINAL dependence
> with the commentary:
>
> /* rds-tcp registers as a pernet subys, so the ->exit will only
> * get invoked after network acitivity has quiesced. We need to
> * clean up all sockets to quiesce network activity, and use
> * the unregistration of the per-net loopback device as a trigger
> * to start that cleanup.
> */
>
> It seems all the protocols pernet subsystems meet this situation, but they
> solve it in generic way. What does rds so specific have?
The difference with rds is this: most consumers of netns associate
a net_device with the netns, and cleanup of the netns state
happens as part of the net_device teardown without the constraint
above. rds-tcp does has a netns tied to listening socket, not
to a specific network interface (net_device) so it registers
as a pernet-subsys. But this means that cleanup has to be
cone carefully (see comments in net_namespace.h before
register_pernet_subsys)
For rds-tcp, we need to be able to do the right thing in both of these
cases
1. modprobe -r rds-tcp (cleanup of rds-tcp state should happen in
every namespace, including init_net)
2. netns delete (rds_tcp.ko should remain loaded for other namespaces)
> This commit makes event handler to iterate rds_tcp_conn_list and
> kill them. If we change the stage to NETDEV_UNREGISTER, what will change?
The above two cases need to work correctly.
> Can unregistered loopback device on dead net add new items to rds_tcp_conn_list?
> How it's possible?
I dont understand the question- no unregistered loopback devices
cannot add items.
fwiw, I had asked questions about this (netns per net_device
vs netns for module) on the netdev list a few years ago, I can
try to hunt down that thread for you later (nobody replied to
it, but maybe it will help answer your questions).
--Sowmini
next prev parent reply other threads:[~2018-03-16 13:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-16 12:38 [PATCH RFC RFC] rds: Use NETDEV_UNREGISTER in rds_tcp_dev_event() (then kill NETDEV_UNREGISTER_FINAL) Kirill Tkhai
2018-03-16 13:00 ` Sowmini Varadhan [this message]
2018-03-16 13:17 ` Kirill Tkhai
2018-03-16 13:53 ` Sowmini Varadhan
2018-03-16 14:36 ` Kirill Tkhai
2018-03-16 14:41 ` Kirill Tkhai
2018-03-16 17:29 ` Sowmini Varadhan
2018-03-16 18:14 ` Kirill Tkhai
2018-03-16 18:31 ` Sowmini Varadhan
2018-03-16 18:48 ` Kirill Tkhai
2018-03-16 18:53 ` Sowmini Varadhan
2018-03-17 14:15 ` Sowmini Varadhan
2018-03-17 21:13 ` Kirill Tkhai
2018-03-17 21:26 ` [rds-devel] " Sowmini Varadhan
2018-03-17 21:55 ` Kirill Tkhai
2018-03-18 20:45 ` Sowmini Varadhan
2018-03-19 10:08 ` Kirill Tkhai
2018-03-20 11:37 ` Håkon Bugge
2018-03-20 13:29 ` Sowmini Varadhan
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=20180316130008.GE16870@oracle.com \
--to=sowmini.varadhan@oracle.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ktkhai@virtuozzo.com \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rds-devel@oss.oracle.com \
--cc=santosh.shilimkar@oracle.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 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.