From: Anumula Murali Mohan Reddy <anumula@chelsio.com>
To: jgg@nvidia.com, leonro@nvidia.com
Cc: linux-rdma@vger.kernel.org,
Anumula Murali Mohan Reddy <anumula@chelsio.com>,
Potnuri Bharat Teja <bharat@chelsio.com>
Subject: [PATCH for-rc v2] RDMA/core: Fix ENODEV error for iWARP test over vlan
Date: Mon, 7 Oct 2024 18:39:41 +0530 [thread overview]
Message-ID: <20241007130941.62709-1-anumula@chelsio.com> (raw)
If traffic is over vlan, cma_validate_port() fails to match vlan
net_device ifindex with bound_if_index and results in ENODEV error.
It is because rdma_copy_src_l2_addr() always assigns bound_if_index with
real net_device ifindex.
This patch fixes the issue by assigning bound_if_index with vlan
net_device index if traffic is over vlan.
Fixes: f8ef1be816bf ("RDMA/cma: Avoid GID lookups on iWARP devices")
Signed-off-by: Anumula Murali Mohan Reddy <anumula@chelsio.com>
Signed-off-by: Potnuri Bharat Teja <bharat@chelsio.com>
---
Changes since v1:
Added fixes line
Addressed static checker warnings
Targeting to rc since this is a bug fix
---
drivers/infiniband/core/addr.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c
index be0743dac3ff..8962fc0fe4c4 100644
--- a/drivers/infiniband/core/addr.c
+++ b/drivers/infiniband/core/addr.c
@@ -269,6 +269,8 @@ rdma_find_ndev_for_src_ip_rcu(struct net *net, const struct sockaddr *src_in)
break;
#endif
}
+ if (dev && is_vlan_dev(dev))
+ dev = vlan_dev_real_dev(dev);
return ret ? ERR_PTR(ret) : dev;
}
--
2.39.3
next reply other threads:[~2024-10-07 13:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-07 13:09 Anumula Murali Mohan Reddy [this message]
2024-10-07 18:10 ` [PATCH for-rc v2] RDMA/core: Fix ENODEV error for iWARP test over vlan Leon Romanovsky
-- strict thread matches above, loose matches on Subject: below --
2024-12-03 14:00 Anumula Murali Mohan Reddy
2024-12-05 8:42 ` Leon Romanovsky
2024-12-10 8:59 ` Leon Romanovsky
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=20241007130941.62709-1-anumula@chelsio.com \
--to=anumula@chelsio.com \
--cc=bharat@chelsio.com \
--cc=jgg@nvidia.com \
--cc=leonro@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
/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