This patch implements use of the API for LRO aggregated packet max size. Rx queue create is updated to use the relevant configuration. Documentation is updated accordingly.
Signed-off-by: Dekel Peled <dek...@mellanox.com> Acked-by: Viacheslav Ovsiienko <viachesl...@mellanox.com> Acked-by: Matan Azrad <ma...@mellanox.com> --- doc/guides/nics/mlx5.rst | 2 ++ drivers/net/mlx5/mlx5_rxq.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst index 3651e82..adfaac2 100644 --- a/doc/guides/nics/mlx5.rst +++ b/doc/guides/nics/mlx5.rst @@ -207,6 +207,8 @@ Limitations - KEEP_CRC offload cannot be supported with LRO. - The first mbuf length, without head-room, must be big enough to include the TCP header (122B). + - Rx queue with LRO offload enabled, receiving a non-LRO packet, can forward + it with size limited to max LRO size, not to max RX packet length. Statistics ---------- diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index 9423e7b..c725e14 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -1772,7 +1772,9 @@ struct mlx5_rxq_ctrl * dev->data->dev_conf.rxmode.offloads; unsigned int lro_on_queue = !!(offloads & DEV_RX_OFFLOAD_TCP_LRO); const int mprq_en = mlx5_check_mprq_support(dev) > 0; - unsigned int max_rx_pkt_len = dev->data->dev_conf.rxmode.max_rx_pkt_len; + unsigned int max_rx_pkt_len = lro_on_queue ? + dev->data->dev_conf.rxmode.max_lro_pkt_size : + dev->data->dev_conf.rxmode.max_rx_pkt_len; unsigned int non_scatter_min_mbuf_size = max_rx_pkt_len + RTE_PKTMBUF_HEADROOM; unsigned int max_lro_size = 0; -- 1.8.3.1