Skip to content

Commit 8aaa848

Browse files
jgyu25rleon
authored andcommitted
RDMA/core: Fix logic error in ib_get_gids_from_rdma_hdr()
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. Fixes: 1c15b4f ("RDMA/core: Modify enum ib_gid_type and enum rdma_network_type") Signed-off-by: Jang Ingyu <ingyujang25@korea.ac.kr> Link: https://patch.msgid.link/20251219041508.1725947-1-ingyujang25@korea.ac.kr Signed-off-by: Leon Romanovsky <leon@kernel.org>
1 parent 85463eb commit 8aaa848

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/infiniband/core/verbs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ int ib_get_gids_from_rdma_hdr(const union rdma_network_hdr *hdr,
738738
(struct in6_addr *)dgid);
739739
return 0;
740740
} else if (net_type == RDMA_NETWORK_IPV6 ||
741-
net_type == RDMA_NETWORK_IB || RDMA_NETWORK_ROCE_V1) {
741+
net_type == RDMA_NETWORK_IB || net_type == RDMA_NETWORK_ROCE_V1) {
742742
*dgid = hdr->ibgrh.dgid;
743743
*sgid = hdr->ibgrh.sgid;
744744
return 0;

0 commit comments

Comments
 (0)