diff options
author | Yishai Hadas <yishaih@mellanox.com> | 2017-06-08 15:15:11 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-07-24 16:41:01 +0200 |
commit | 1d54f89094e2d2067948550ec52aab93e15b4b0c (patch) | |
tree | 5100d171f3266f53701bc9b15192b7504cf85632 /drivers/infiniband/hw/mlx5/main.c | |
parent | net/mlx5: Report enhanced capabilities for IPoIB (diff) | |
download | linux-1d54f89094e2d2067948550ec52aab93e15b4b0c.tar.xz linux-1d54f89094e2d2067948550ec52aab93e15b4b0c.zip |
IB/mlx5: Report RX checksum capabilities for IPoIB
Report RX checksum capabilities when 'ipoib_enhanced_offloads'
capabilities are set and support checksum.
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/main.c')
-rw-r--r-- | drivers/infiniband/hw/mlx5/main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index bf74b2ee2f9c..2757d445b042 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -702,6 +702,10 @@ static int mlx5_ib_query_device(struct ib_device *ibdev, MLX5_CAP_GEN(dev->mdev, general_notification_event)) props->raw_packet_caps |= IB_RAW_PACKET_CAP_DELAY_DROP; + if (MLX5_CAP_GEN(mdev, ipoib_enhanced_offloads) && + MLX5_CAP_IPOIB_ENHANCED(mdev, csum_cap)) + props->device_cap_flags |= IB_DEVICE_UD_IP_CSUM; + if (MLX5_CAP_GEN(dev->mdev, eth_net_offloads) && MLX5_CAP_ETH(dev->mdev, scatter_fcs)) { /* Legacy bit to support old userspace libraries */ |