[1/2] common/mlx5: add scatter FCS with decap capability query
Checks
Commit Message
As scatter FCS might be not supported for decapsulated tunnel
packets in some NIC HW, an new capability bit which indicates
if scatter FCS works with decap is added.
Signed-off-by: Suanming Mou <suanmingm@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
---
doc/guides/nics/mlx5.rst | 5 +++++
drivers/common/mlx5/mlx5_devx_cmds.c | 2 ++
drivers/common/mlx5/mlx5_devx_cmds.h | 1 +
drivers/common/mlx5/mlx5_prm.h | 4 +++-
4 files changed, 11 insertions(+), 1 deletion(-)
@@ -279,6 +279,11 @@ Limitations
Other TCP packets (e.g. with MPLS label) received on Rx queue with LRO enabled, will be received with bad checksum.
+- KEEP_CRC:
+
+ - KEEP_CRC offload cannot be supported with decapsulation for some NICs(such as ConnectX-6DX and BlueField2).
+ The new capability bit scatter_fcs_w_decap_disable shows the supporting for the NICs.
+
Statistics
----------
@@ -467,6 +467,8 @@ struct mlx5_devx_obj *
attr->vdpa.queue_counters_valid = !!(MLX5_GET64(cmd_hca_cap, hcattr,
general_obj_types) &
MLX5_GENERAL_OBJ_TYPES_CAP_VIRTIO_Q_COUNTERS);
+ attr->scatter_fcs_w_decap_disable =
+ MLX5_GET(cmd_hca_cap, hcattr, scatter_fcs_w_decap_disable);
if (attr->qos.sup) {
MLX5_SET(query_hca_cap_in, in, op_mod,
MLX5_GET_HCA_CAP_OP_MOD_QOS_CAP |
@@ -90,6 +90,7 @@ struct mlx5_hca_attr {
uint32_t vhca_id:16;
uint32_t relaxed_ordering_write:1;
uint32_t relaxed_ordering_read:1;
+ uint32_t scatter_fcs_w_decap_disable:1;
struct mlx5_hca_qos_attr qos;
struct mlx5_hca_vdpa_attr vdpa;
};
@@ -996,7 +996,9 @@ struct mlx5_ifc_cmd_hca_cap_bits {
u8 log_max_qp[0x5];
u8 reserved_at_a0[0xb];
u8 log_max_srq[0x5];
- u8 reserved_at_b0[0x10];
+ u8 reserved_at_b0[0xb];
+ u8 scatter_fcs_w_decap_disable[0x1];
+ u8 reserved_at_bc[0x4];
u8 reserved_at_c0[0x8];
u8 log_max_cq_sz[0x8];
u8 reserved_at_d0[0xb];