From: longli@linuxonhyperv.com
To: Jason Gunthorpe <jgg@ziepe.ca>, Leon Romanovsky <leon@kernel.org>,
Ajay Sharma <sharmaajay@microsoft.com>,
Konstantin Taranov <kotaranov@microsoft.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: linux-rdma@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org,
Long Li <longli@microsoft.com>
Subject: [Patch v2 1/3] IB/core: Do not use netdev IP if it is a bonded slave
Date: Fri, 7 Feb 2025 13:36:16 -0800 [thread overview]
Message-ID: <1738964178-18836-2-git-send-email-longli@linuxonhyperv.com> (raw)
In-Reply-To: <1738964178-18836-1-git-send-email-longli@linuxonhyperv.com>
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
next prev parent reply other threads:[~2025-02-07 21:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-07 21:36 [Patch v2 0/3] IB/core: Fix GID cache for bonded net devices longli
2025-02-07 21:36 ` longli [this message]
2025-02-07 21:36 ` [Patch v2 2/3] IB/core: Use upper_device_filter to add upper ips longli
2025-02-07 21:36 ` [Patch v2 3/3] IB/core: Add default IP when a slave is unlinked longli
2025-02-09 9:45 ` [Patch v2 0/3] IB/core: Fix GID cache for bonded net devices Leon Romanovsky
2025-02-13 2:20 ` [EXTERNAL] " Long Li
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=1738964178-18836-2-git-send-email-longli@linuxonhyperv.com \
--to=longli@linuxonhyperv.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jgg@ziepe.ca \
--cc=kotaranov@microsoft.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sharmaajay@microsoft.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;
as well as URLs for NNTP newsgroup(s).