diff mbox

IB/mlx5: report tx/rx checksum cap when query device

Message ID 1450439601-49989-1-git-send-email-bodong@mellanox.com (mailing list archive)
State Accepted
Headers show

Commit Message

Bodong Wang Dec. 18, 2015, 11:53 a.m. UTC
From: Bodong Wang <bodong@mellanox.com>

This patch will report the tx/rx checksum cap for raw qp

Signed-off-by: Bodong Wang <bodong@mellanox.com>
---
 drivers/infiniband/hw/mlx5/main.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 38aa490..101c17a 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -499,6 +499,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;