Thread (18 messages) 18 messages, 6 authors, 2025-02-07

Re: [PATCH rdma-next 1/1] RDMA/mana_ib: Set correct device into ib

From: Leon Romanovsky <leon@kernel.org>
Date: 2024-06-26 15:33:59
Also in: linux-rdma

On Wed, Jun 26, 2024 at 08:27:31AM -0700, Stephen Hemminger wrote:
On Wed, 26 Jun 2024 15:11:18 +0300
Leon Romanovsky [off-list ref] wrote:
quoted
On Wed, Jun 26, 2024 at 09:05:05AM +0000, Konstantin Taranov wrote:
quoted
quoted
quoted
When mc->ports[0] is not slave, use it in the set_netdev.
When mana is used in netvsc, the stored net devices in mana are slaves
and GIDs should be taken from their master devices.
In the baremetal case, the mc->ports devices will not be slaves.  
I wonder, why do you have "... | IFF_SLAVE" in __netvsc_vf_setup() in a first
place? Isn't IFF_SLAVE is supposed to be set by bond driver?
  
I guess it is just a valid use of the IFF_SLAVE bit. In the bond case it is also set
as a BOND netdev. The IFF_SLAVE helps to show users that another master
netdev should be used for networking. But I am not an expert in netvsc.  
The thing is that netvsc is virtual device like many others, but it is
the only one who uses IFF_SLAVE bit. The comment around that bit says
"slave of a load balancer.", which is not the case according to the
Hyper-V documentation.
https://learn.microsoft.com/en-us/windows-hardware/drivers/network/overview-of-hyper-v

You will need to get Ack from netdev maintainers to rely on IFF_SLAVE
bit in the way you are relying on it now.
This is used to tell userspace tools to not interact directly with the device.
For example, it is used when VF is connected to netvsc device.
It prevents things like IPv6 local address, and Network Manager won't modify device.
You described how hyper-v uses it, but I'm interested to get acknowledgment
that it is a valid use case for IFF_SLAVE, despite sentence written in the comment.

Thanks
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help