IB/cm: Use the source GID index type
[platform/kernel/linux-starfive.git] / drivers / infiniband / core / cma.c
index 2637ebf..446323a 100644 (file)
@@ -228,6 +228,7 @@ struct rdma_id_private {
        u8                      tos;
        u8                      reuseaddr;
        u8                      afonly;
+       enum ib_gid_type        gid_type;
 };
 
 struct cma_multicast {
@@ -2314,6 +2315,7 @@ static int cma_resolve_iboe_route(struct rdma_id_private *id_priv)
                ndev = dev_get_by_index(&init_net, addr->dev_addr.bound_dev_if);
                route->path_rec->net = &init_net;
                route->path_rec->ifindex = addr->dev_addr.bound_dev_if;
+               route->path_rec->gid_type = id_priv->gid_type;
        }
        if (!ndev) {
                ret = -ENODEV;