public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: yanjun.zhu@linux.dev
To: "Leon Romanovsky" <leon@kernel.org>
Cc: "Zhu Yanjun" <yanjun.zhu@intel.com>,
	jgg@ziepe.ca, linux-rdma@vger.kernel.org
Subject: Re: [PATCH 0/3] RDMA net namespace
Date: Mon, 24 Oct 2022 07:20:48 +0000	[thread overview]
Message-ID: <10a79553046a0b9f1942f507fdf97b46@linux.dev> (raw)
In-Reply-To: <Y1VvxqPNy7bmZ2ZR@unreal>

October 24, 2022 12:45 AM, "Leon Romanovsky" <leon@kernel.org> wrote:

> On Sun, Oct 23, 2022 at 09:42:00PM +0800, Yanjun Zhu wrote:
> 
>> 在 2022/10/23 21:04, Leon Romanovsky 写道:
>> On Sun, Oct 23, 2022 at 06:04:47PM -0400, Zhu Yanjun wrote:
>>> From: Zhu Yanjun <yanjun.zhu@linux.dev>
>>> 
>>> There are shared and exclusive modes in RDMA net namespace. After
>>> discussion with Leon, the above modes are compatible with legacy IB
>>> device.
>>> 
>>> To the RoCE and iWARP devices, the ib devices should be in the same net
>>> namespace with the related net devices regardless of in shared or
>>> exclusive mode.
>>> 
>>> In the first commit, when the net devices are moved to a new net
>>> namespace, the related ib devices are also moved to the same net
>>> namespace.
>> I think that rdma_dev_net_ops are supposed to handle this.
>> 
>> Yes. rdma_dev_net_ops can move ib devices from one net to another net.
>> 
>> But these functions are called by a netlink command "rdma dev...".
> 
> rdma_dev_net_ops are called when you move netdevice from one netlink to
> another.

To "rdma_dev_net_ops are called when you move netdevice from one netlink to another.", 

if I get you correctly, you mean, when moving net device form one net namespace to another, rdma_dev_net_ops
will be called.

in fact, rdma_dev_net_ops will be called when running the 2 commands "ip netns add ..." and "ip netns del ...".

> 
> However you raised an interesting question if it is correct behaviour to
> move IB device after moved netdevice.

Now we come back to the original problem, how to make RoCE ib device work when the ib device and net devices are separated in the 2 different net namespaces?

If you know, please let me know.

Currently I keep ib devices and the related net devices in the same net namespace to make ib devices work. So I made these commits to keep ib devices and the related net devices in the same net namespace automatically .

Zhu Yanjun

> 
> I don't know an answer for that.
> 
> Thanks

  reply	other threads:[~2022-10-24  7:21 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-23 22:04 [PATCH 0/3] RDMA net namespace Zhu Yanjun
2022-10-23 13:04 ` Leon Romanovsky
2022-10-23 13:42   ` Yanjun Zhu
2022-10-23 16:45     ` Leon Romanovsky
2022-10-24  7:20       ` yanjun.zhu [this message]
2022-10-23 22:04 ` [PATCH 1/3] RDMA/core: Move ib device to the same net namespace with net device Zhu Yanjun
2022-10-23 22:04 ` [PATCH 2/3] RDMA/core: The legacy IB devices still work with shared/exclusive mode Zhu Yanjun
2022-10-23 22:04 ` [PATCH 3/3] RDMA/core: Get all the ib devices from net devices Zhu Yanjun
2022-10-24  1:10 ` [PATCH 0/3] RDMA net namespace Dust Li
2022-10-24  6:15   ` yanjun.zhu
2022-10-24 11:52     ` Dust Li
2022-10-24 13:12       ` Yanjun Zhu
2022-10-24 14:35         ` Dust Li
2022-10-24 16:41           ` Jason Gunthorpe
2022-10-25  2:51           ` Yanjun Zhu
2022-10-26  4:08             ` Dust Li
2022-10-26 15:01 ` Dust Li
2022-10-27  2:30   ` Dust Li
2022-10-27  2:54     ` yanjun.zhu
2022-10-27  3:01     ` Parav Pandit
2022-10-27  3:07       ` yanjun.zhu
2022-10-27  3:10         ` Parav Pandit
2022-10-27  3:17           ` yanjun.zhu
2022-10-27  3:21             ` Parav Pandit
2022-10-27  3:39               ` yanjun.zhu
2022-10-27  3:48                 ` Parav Pandit
2022-10-27  6:01                   ` yanjun.zhu
2022-10-27 14:06                     ` Parav Pandit
2022-10-28  3:21                       ` Yanjun Zhu
2022-10-28  3:31                         ` Parav Pandit
2022-10-28  3:49                           ` Yanjun Zhu
2022-10-28  3:58                             ` Parav Pandit
2022-11-11  2:38                               ` Yanjun Zhu

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=10a79553046a0b9f1942f507fdf97b46@linux.dev \
    --to=yanjun.zhu@linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=yanjun.zhu@intel.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