Re: [PATCH 0/3] RDMA net namespace

yanjun.zhu
2022-10-27T06:01:43Z

October 27, 2022 11:48 AM, "Parav Pandit" <parav@nvidia.com> wrote:

>> From: yanjun.zhu@linux.dev <yanjun.zhu@linux.dev>
>> Sent: Wednesday, October 26, 2022 11:39 PM
>>
>> October 27, 2022 11:21 AM, "Parav Pandit" <parav@nvidia.com> wrote:
>>
>> From: yanjun.zhu@linux.dev <yanjun.zhu@linux.dev>
>> Sent: Wednesday, October 26, 2022 11:17 PM
>>
>> October 27, 2022 11:10 AM, "Parav Pandit" <parav@nvidia.com> wrote:
>>
>> From: yanjun.zhu@linux.dev <yanjun.zhu@linux.dev>
>> Sent: Wednesday, October 26, 2022 11:08 PM
>>
>> October 27, 2022 11:01 AM, "Parav Pandit" <parav@nvidia.com> wrote:
>>
>> From: Dust Li <dust.li@linux.alibaba.com>
>> Sent: Wednesday, October 26, 2022 10:31 PM
>>
>> 2. else we are in
>> exclusive mode. When the corresponding netdevice of the RoCE or iWarp
>> device is moved from one net namespace to another, we move the RDMA
>> device into that net namespace
>>
>> What do you think ?
>>
>> No. one device is not supposed to move other devices.
>> Every device is independent that should be moved by explicit command.
>>
>> Can you show us where we can find this rule "Every device is
>> independent that should be moved by explicit command."?
>>
>> Also changes like above breaks the existing orchestration, it no-go.
>>
>> In a RoCE device, ib device is related with the net device. When a
>> net device is moved to a new net namespace, if the ib device is not
>> in the same net device, how to make ib device work?
>>
>> RDMA device should also be moved to the same net namespace as that of
>> netdev.
>>
>> sure. I know the following commands.
>>
>> In my commits, the process of moving IB devices to the same net
>> namespace with net devices is automatically finished.
>>
>> Is it OK?
>>
>> No.
>> Change like this breaks the user space who expect to move the rdma
>> device to the net namespace explicitly.
>>
>> Which specification makes this kind of rule? Where can we find it?
>
> Existing ABI defines this which exists for many years now.

About ABI, I read through this link https://en.wikipedia.org/wiki/Application_binary_interface

Details covered by an ABI include the following:

Processor instruction set, with details like register file structure, stack organization, memory access types, etc.

Sizes, layouts, and alignments of basic data types that the processor can directly access

Calling convention, which controls how the arguments of functions are passed, and return values retrieved; for example, it controls the following:
Whether all parameters are passed on the stack, or some are passed in registers
Which registers are used for which function parameters
Whether the first function parameter passed on the stack is pushed first or last

How an application should make system calls to the operating system, and if the ABI specifies direct system calls rather than procedure calls to system call stubs, the system call numbers

In the case of a complete operating system ABI, the binary format of object files, program libraries, etc.

And I do not find the rule that you mentioned.

> There is no Linux kernel subsystem or module to my knowledge that attempt to move multiple devices
> using single command.
> When user executes command , user explicitly give device name "foo", only "foo" should move.
> Other loosely coupled device whose name is not specified in the ip command which has a different
> life cycle should not move along with "foo".
>
> You are trying to define the new rule that breaks the existing ABI and the iproute2 (ip and rdma)
> command semantics.
> It is implicit that when command is issued on device A, operate on device A. This is part of
> iproute2 functioning.

About iproute2, I read this link https://wiki.linuxfoundation.org/networking/iproute2#documentation

There is no rules that you mentioned.

This rule is defined explicitly or implicitly?

Zhu Yanjun
>
>> It wont find the device which got moved as part of some other device
>> movement.
>> Currently define scheme covers at least 3 different types of RDMA devices.
>> 1. IB and IPoIB
>> 2. RoCE
>> 3. iWarp
>>
>> Each has somewhat different relation to their net device.
>>
>> IPoIB, RoCE and iWarp are somewhat different relation to their net device.
>> To RoCE and iWarp devices, ib devices should be the same net namespace
>> with the related net devices.
>> Or else we can not make ib devices work. This is why I send out these
>> commits.
>
> So please move the rdma device also to the desired net namespace and it will work.