Skip to content

Commit 6c53bf9

Browse files
Konstantin Taranovrleon
authored andcommitted
RDMA/mana_ib: indicate CM support
Set max_mad_size and IB_PORT_CM_SUP capability to enable connection manager. Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com> Link: https://patch.msgid.link/1737394039-28772-14-git-send-email-kotaranov@linux.microsoft.com Reviewed-by: Shiraz Saleem <shirazsaleem@microsoft.com> Reviewed-by: Long Li <longli@microsoft.com> Signed-off-by: Leon Romanovsky <leon@kernel.org>
1 parent cfef452 commit 6c53bf9

File tree

1 file changed

+7
-2
lines changed
  • drivers/infiniband/hw/mana

1 file changed

+7
-2
lines changed

drivers/infiniband/hw/mana/main.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,8 +561,10 @@ int mana_ib_get_port_immutable(struct ib_device *ibdev, u32 port_num,
561561
immutable->pkey_tbl_len = attr.pkey_tbl_len;
562562
immutable->gid_tbl_len = attr.gid_tbl_len;
563563
immutable->core_cap_flags = RDMA_CORE_PORT_RAW_PACKET;
564-
if (port_num == 1)
564+
if (port_num == 1) {
565565
immutable->core_cap_flags |= RDMA_CORE_PORT_IBA_ROCE_UDP_ENCAP;
566+
immutable->max_mad_size = IB_MGMT_MAD_SIZE;
567+
}
566568

567569
return 0;
568570
}
@@ -621,8 +623,11 @@ int mana_ib_query_port(struct ib_device *ibdev, u32 port,
621623
props->active_width = IB_WIDTH_4X;
622624
props->active_speed = IB_SPEED_EDR;
623625
props->pkey_tbl_len = 1;
624-
if (port == 1)
626+
if (port == 1) {
625627
props->gid_tbl_len = 16;
628+
props->port_cap_flags = IB_PORT_CM_SUP;
629+
props->ip_gids = true;
630+
}
626631

627632
return 0;
628633
}

0 commit comments

Comments
 (0)