net/mlx5: log LRO minimal size
authorDekel Peled <dekelp@nvidia.com>
Thu, 15 Oct 2020 13:37:09 +0000 (16:37 +0300)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 21:29:25 +0000 (22:29 +0100)
Add debug printout showing HCA capability lro_min_mss_size - the
minimal size of TCP segment required for coalescing.
MLX5 PMD documentation is updated to note this condition.

Signed-off-by: Dekel Peled <dekelp@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
doc/guides/nics/mlx5.rst
drivers/common/mlx5/mlx5_devx_cmds.c
drivers/common/mlx5/mlx5_devx_cmds.h
drivers/net/mlx5/linux/mlx5_os.c

index 125b987..69bb4fc 100644 (file)
@@ -298,6 +298,9 @@ Limitations
         eth (with or without vlan) / ipv4 or ipv6 / tcp / payload
 
     Other TCP packets (e.g. with MPLS label) received on Rx queue with LRO enabled, will be received with bad checksum.
+  - LRO packet aggregation is performed by HW only for packet size larger than
+    ``lro_min_mss_size``. This value is reported on device start, when debug
+    mode is enabled.
 
 - CRC:
 
index fd4e3f2..d3e90b5 100644 (file)
@@ -819,6 +819,8 @@ mlx5_devx_cmd_query_hca_attr(void *ctx,
                        MLX5_GET(per_protocol_networking_offload_caps, hcattr,
                                 lro_timer_supported_periods[i]);
        }
+       attr->lro_min_mss_size = MLX5_GET(per_protocol_networking_offload_caps,
+                                         hcattr, lro_min_mss_size);
        attr->tunnel_stateless_geneve_rx =
                            MLX5_GET(per_protocol_networking_offload_caps,
                                     hcattr, tunnel_stateless_geneve_rx);
index cfa7a7b..c2d089c 100644 (file)
@@ -85,6 +85,7 @@ struct mlx5_hca_attr {
        uint32_t tunnel_lro_vxlan:1;
        uint32_t lro_max_msg_sz_mode:2;
        uint32_t lro_timer_supported_periods[MLX5_LRO_NUM_SUPP_PERIODS];
+       uint16_t lro_min_mss_size;
        uint32_t flex_parser_protocols;
        uint32_t hairpin:1;
        uint32_t log_max_hairpin_queues:5;
index 7abb75b..d95082f 100644 (file)
@@ -1057,6 +1057,9 @@ err_secondary:
                                config->hca_attr.lro_timer_supported_periods[0];
                        DRV_LOG(DEBUG, "LRO session timeout set to %d usec",
                                config->lro.timeout);
+                       DRV_LOG(DEBUG, "LRO minimal size of TCP segment "
+                               "required for coalescing is %d bytes",
+                               config->hca_attr.lro_min_mss_size);
                }
 #if defined(HAVE_MLX5DV_DR) && defined(HAVE_MLX5_DR_CREATE_ACTION_FLOW_METER)
                if (config->hca_attr.qos.sup &&