mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] infiniband/core: Fix logic error in ib_get_gids_from_rdma_hdr()
@ 2025-12-19  4:15 Jang Ingyu
  2025-12-21  9:24 ` Leon Romanovsky
  2025-12-21  9:31 ` Leon Romanovsky
  0 siblings, 2 replies; 5+ messages in thread
From: Jang Ingyu @ 2025-12-19  4:15 UTC (permalink / raw)
  To: jgg, leon; +Cc: linux-rdma, linux-kernel, Jang Ingyu

Fix missing comparison operator for RDMA_NETWORK_ROCE_V1 in the
conditional statement. The constant was used directly instead of
being compared with net_type, causing the condition to always
evaluate to true.

Signed-off-by: Jang Ingyu <ingyujang25@korea.ac.kr>
---
 drivers/infiniband/core/verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index 11b1a194d..ee3909285 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -738,7 +738,7 @@ int ib_get_gids_from_rdma_hdr(const union rdma_network_hdr *hdr,
 				       (struct in6_addr *)dgid);
 		return 0;
 	} else if (net_type == RDMA_NETWORK_IPV6 ||
-		   net_type == RDMA_NETWORK_IB || RDMA_NETWORK_ROCE_V1) {
+		   net_type == RDMA_NETWORK_IB || net_type == RDMA_NETWORK_ROCE_V1) {
 		*dgid = hdr->ibgrh.dgid;
 		*sgid = hdr->ibgrh.sgid;
 		return 0;
-- 
2.34.1


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

end of thread, other threads:[~2026-01-06  0:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-19  4:15 [PATCH] infiniband/core: Fix logic error in ib_get_gids_from_rdma_hdr() Jang Ingyu
2025-12-21  9:24 ` Leon Romanovsky
2025-12-21  9:30   ` Leon Romanovsky
2026-01-06  0:55     ` Jason Gunthorpe
2025-12-21  9:31 ` Leon Romanovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®