]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
RDMA/mana_ib: indicate CM support
authorKonstantin Taranov <kotaranov@microsoft.com>
Mon, 20 Jan 2025 17:27:19 +0000 (09:27 -0800)
committerLeon Romanovsky <leon@kernel.org>
Tue, 4 Feb 2025 13:27:03 +0000 (08:27 -0500)
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>
drivers/infiniband/hw/mana/main.c

index 114e3910951176881c8736fe4d8acbfa6feae52d..ae1fb6983f66647e620926a69799bddd1e73c9f6 100644 (file)
@@ -561,8 +561,10 @@ int mana_ib_get_port_immutable(struct ib_device *ibdev, u32 port_num,
        immutable->pkey_tbl_len = attr.pkey_tbl_len;
        immutable->gid_tbl_len = attr.gid_tbl_len;
        immutable->core_cap_flags = RDMA_CORE_PORT_RAW_PACKET;
-       if (port_num == 1)
+       if (port_num == 1) {
                immutable->core_cap_flags |= RDMA_CORE_PORT_IBA_ROCE_UDP_ENCAP;
+               immutable->max_mad_size = IB_MGMT_MAD_SIZE;
+       }
 
        return 0;
 }
@@ -621,8 +623,11 @@ int mana_ib_query_port(struct ib_device *ibdev, u32 port,
        props->active_width = IB_WIDTH_4X;
        props->active_speed = IB_SPEED_EDR;
        props->pkey_tbl_len = 1;
-       if (port == 1)
+       if (port == 1) {
                props->gid_tbl_len = 16;
+               props->port_cap_flags = IB_PORT_CM_SUP;
+               props->ip_gids = true;
+       }
 
        return 0;
 }