@@ -442,6 +442,12 @@ static int mlx4_ib_query_device(struct ib_device *ibdev,
props->device_cap_flags |= IB_DEVICE_MANAGED_FLOW_STEERING;
}
+ if ((dev->dev->caps.rx_checksum_flags_port[1] > 0) ||
+ (dev->dev->caps.rx_checksum_flags_port[2] > 0))
+ props->csum_caps |= IB_CSUM_RX_TCP_UDP | IB_CSUM_RX_IP_HDR;
+
+ props->csum_caps |= IB_CSUM_TX_TCP_UDP | IB_CSUM_TX_IP_HDR;
+
props->vendor_id = be32_to_cpup((__be32 *) (out_mad->data + 36)) &
0xffffff;
props->vendor_part_id = dev->dev->persist->pdev->device;
Use the new capability flags for RX/TX checksum offload. Signed-off-by: Amir Vadai <amirv@mellanox.com> --- drivers/infiniband/hw/mlx4/main.c | 6 ++++++ 1 file changed, 6 insertions(+)