diff options
author | Guy Levi <guyle@mellanox.com> | 2017-07-04 16:24:27 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-07-24 10:45:53 -0400 |
commit | 6afff1c7152f6f0787d7ad5de2e124f8643f0a45 (patch) | |
tree | bda44d6216fe8b8c9d3ac8e3f01b218e79a03aef | |
parent | 3078f5f1bd8b6c8aef77b8ef4d49671fa6eb058e (diff) | |
download | linux-6afff1c7152f6f0787d7ad5de2e124f8643f0a45.tar.gz linux-6afff1c7152f6f0787d7ad5de2e124f8643f0a45.tar.bz2 linux-6afff1c7152f6f0787d7ad5de2e124f8643f0a45.zip |
IB/mlx4: Expose RSS capabilities
As a final step to support RSS feature, expose the RSS capabilities in
query device verb.
It includes:
- Max rwq indirection tables.
- Max rwq indirection table size.
- Supported qp types.
Signed-off-by: Guy Levi <guyle@mellanox.com>
Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r-- | drivers/infiniband/hw/mlx4/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index b42234571a8c..1dee0a51ef67 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c @@ -556,8 +556,13 @@ static int mlx4_ib_query_device(struct ib_device *ibdev, if ((dev->dev->caps.flags2 & MLX4_DEV_CAP_FLAG2_RSS) && (mlx4_ib_port_link_layer(ibdev, 1) == IB_LINK_LAYER_ETHERNET || - mlx4_ib_port_link_layer(ibdev, 2) == IB_LINK_LAYER_ETHERNET)) + mlx4_ib_port_link_layer(ibdev, 2) == IB_LINK_LAYER_ETHERNET)) { + props->rss_caps.max_rwq_indirection_tables = props->max_qp; + props->rss_caps.max_rwq_indirection_table_size = + dev->dev->caps.max_rss_tbl_sz; + props->rss_caps.supported_qpts = 1 << IB_QPT_RAW_PACKET; props->max_wq_type_rq = props->max_qp; + } if (!mlx4_is_slave(dev->dev)) err = mlx4_get_internal_clock_params(dev->dev, &clock_params); |