]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
IB/mlx5: Report packet based credit mode device capability
authorDanit Goldberg <danitg@mellanox.com>
Fri, 30 Nov 2018 11:22:06 +0000 (13:22 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Fri, 7 Dec 2018 20:22:09 +0000 (13:22 -0700)
Report packet based credit mode capability via the mlx5 DV interface.

Signed-off-by: Danit Goldberg <danitg@mellanox.com>
Reviewed-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/main.c
include/uapi/rdma/mlx5-abi.h

index 96515a8c9d2cb0f7b4b67311ddec34aa106182e0..f985d0d9b883743ddd47d34d26a1fd1130aad019 100644 (file)
@@ -1018,6 +1018,9 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
 
                if (MLX5_CAP_GEN(mdev, cqe_128_always))
                        resp.flags |= MLX5_IB_QUERY_DEV_RESP_FLAGS_CQE_128B_PAD;
+               if (MLX5_CAP_GEN(mdev, qp_packet_based))
+                       resp.flags |=
+                               MLX5_IB_QUERY_DEV_RESP_PACKET_BASED_CREDIT_MODE;
        }
 
        if (field_avail(typeof(resp), sw_parsing_caps,
index 4af581170f6220794287f754de45ade22ba5aaa3..87b3198f4b5d7aa02c330f59178d8cc74dba5f6c 100644 (file)
@@ -237,6 +237,7 @@ enum mlx5_ib_query_dev_resp_flags {
        /* Support 128B CQE compression */
        MLX5_IB_QUERY_DEV_RESP_FLAGS_CQE_128B_COMP = 1 << 0,
        MLX5_IB_QUERY_DEV_RESP_FLAGS_CQE_128B_PAD  = 1 << 1,
+       MLX5_IB_QUERY_DEV_RESP_PACKET_BASED_CREDIT_MODE = 1 << 2,
 };
 
 enum mlx5_ib_tunnel_offloads {