IB/mlx5: report tx/rx checksum cap in query results
authorBodong Wang <bodong@mellanox.com>
Fri, 18 Dec 2015 11:53:20 +0000 (13:53 +0200)
committerDoug Ledford <dledford@redhat.com>
Thu, 24 Dec 2015 05:17:32 +0000 (00:17 -0500)
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>
drivers/infiniband/hw/mlx5/main.c

index 03ce0f9fdd86cdbb5179535ec150918d4c7ac852..5e3d3aea35bc75c8ddb1985d2cd4856f4ac2ee41 100644 (file)
@@ -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;