Use the new capability flags for RX/TX checksum offload.

Signed-off-by: Amir Vadai <[email protected]>
---
 drivers/infiniband/hw/mlx4/main.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/infiniband/hw/mlx4/main.c 
b/drivers/infiniband/hw/mlx4/main.c
index 1437ed5..2af7554 100644
--- a/drivers/infiniband/hw/mlx4/main.c
+++ b/drivers/infiniband/hw/mlx4/main.c
@@ -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;
-- 
2.4.3.413.ga5fe668

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to