netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] RDMA/core: Do not use netdev if it is a bonded slave
@ 2024-11-27 19:43 longli
  2024-11-27 19:43 ` [PATCH] RDMA/mana_ib: Use the correct net device for IB longli
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: longli @ 2024-11-27 19:43 UTC (permalink / raw)
  To: Jason Gunthorpe, Leon Romanovsky, Ajay Sharma, Konstantin Taranov,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: linux-rdma, netdev, linux-kernel, linux-hyperv, Long Li

From: Long Li <longli@microsoft.com>

Filter function is_eth_port_of_netdev_filter() is used to determine if
a netdev should be used for assigning its IP to GID cache. This function
should filter out bonded slave netdevs. For bonded slaves, their master
netdevs should be used to cache GIDs.

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/infiniband/core/roce_gid_mgmt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/core/roce_gid_mgmt.c b/drivers/infiniband/core/roce_gid_mgmt.c
index a9f2c6b1b29e..27a3ffed11b9 100644
--- a/drivers/infiniband/core/roce_gid_mgmt.c
+++ b/drivers/infiniband/core/roce_gid_mgmt.c
@@ -161,7 +161,7 @@ is_eth_port_of_netdev_filter(struct ib_device *ib_dev, u32 port,
 	res = ((rdma_is_upper_dev_rcu(rdma_ndev, cookie) &&
 	       (is_eth_active_slave_of_bonding_rcu(rdma_ndev, real_dev) &
 		REQUIRED_BOND_STATES)) ||
-	       real_dev == rdma_ndev);
+	       (real_dev == rdma_ndev && !netif_is_bond_slave(rdma_ndev)));
 
 	rcu_read_unlock();
 	return res;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-11-27 19:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-27 19:43 [PATCH 1/3] RDMA/core: Do not use netdev if it is a bonded slave longli
2024-11-27 19:43 ` [PATCH] RDMA/mana_ib: Use the correct net device for IB longli
2024-11-27 19:43 ` [PATCH 2/3] RDMA/core: Use upper_device_filter() to add upper IPs longli
2024-11-27 19:43 ` [PATCH 3/3] RDMA/core: Add default IP when a bonded slave is unlinked longli

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).