diff options
author | Eugene Crosser <evgenii.cherkashin@profitbricks.com> | 2019-12-19 16:48:47 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2020-01-03 23:37:58 +0300 |
commit | 3593f69c55c53de6e2de8799e4892b8c795f3713 (patch) | |
tree | d91113c5183ebbeadd68b7b7594c1f0be7289596 /include/linux/mlx4 | |
parent | 4d6e8a033f7c6665c7ca5c5cdcf66019baa4b7a2 (diff) | |
download | linux-3593f69c55c53de6e2de8799e4892b8c795f3713.tar.xz |
RDMA/mlx4: Redo TX checksum offload in line with docs
Ingress checksum offload was not working for IPv6 frames because the
conditional expression that checks validation status passed from the
hardware was not matching the algorithm described in the documentation.
This patch defines L4_CSUM flag (which falls inside the badfcs_enc field
in the existing definition of the CQE layout) and replaces the conditional
expression with the one defined in the "ConnectX(r) Family Programmer's
Manual" document.
Link: https://lore.kernel.org/r/20191219134847.413582-1-leon@kernel.org
Signed-off-by: Eugene Crosser <evgenii.cherkashin@profitbricks.com>
Reviewed-by: Jack Wang <jinpu.wang@profitbricks.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'include/linux/mlx4')
-rw-r--r-- | include/linux/mlx4/cq.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/mlx4/cq.h b/include/linux/mlx4/cq.h index 508e8cc5ee86..653d2a0aa44c 100644 --- a/include/linux/mlx4/cq.h +++ b/include/linux/mlx4/cq.h @@ -130,6 +130,11 @@ enum { MLX4_CQE_STATUS_IPOK = 1 << 12, }; +/* L4_CSUM is logically part of status, but has to checked against badfcs_enc */ +enum { + MLX4_CQE_STATUS_L4_CSUM = 1 << 2, +}; + enum { MLX4_CQE_LLC = 1, MLX4_CQE_SNAP = 1 << 1, |