aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx5/main.c
diff options
context:
space:
mode:
authorBodong Wang <bodong@mellanox.com>2015-12-18 13:53:20 +0200
committerDoug Ledford <dledford@redhat.com>2015-12-24 00:17:32 -0500
commit88115fe7a0e45a200a6ae9d07e424c62fb13621a (patch)
tree4249f512487fdfa068bd6cf59c50624a5bf689fe /drivers/infiniband/hw/mlx5/main.c
parentIB/mlx4: Convert kmalloc to kmalloc_array for checkpatch (diff)
downloadlinux-dev-88115fe7a0e45a200a6ae9d07e424c62fb13621a.tar.xz
linux-dev-88115fe7a0e45a200a6ae9d07e424c62fb13621a.zip
IB/mlx5: report tx/rx checksum cap in query results
This patch will report the tx/rx checksum cap for raw qp via the query device results. Signed-off-by: Bodong Wang <bodong@mellanox.com> 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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 03ce0f9fdd86..5e3d3aea35bc 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -496,6 +496,10 @@ static int mlx5_ib_query_device(struct ib_device *ibdev,
if (MLX5_CAP_GEN(mdev, block_lb_mc))
props->device_cap_flags |= IB_DEVICE_BLOCK_MULTICAST_LOOPBACK;
+ if (MLX5_CAP_GEN(dev->mdev, eth_net_offloads) &&
+ (MLX5_CAP_ETH(dev->mdev, csum_cap)))
+ props->device_cap_flags |= IB_DEVICE_RAW_IP_CSUM;
+
props->vendor_part_id = mdev->pdev->device;
props->hw_ver = mdev->pdev->revision;