net/mlx5: fix inline packet size for ConnectX-4 Lx
authorViacheslav Ovsiienko <viacheslavo@mellanox.com>
Thu, 20 Feb 2020 21:18:33 +0000 (21:18 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 21 Feb 2020 10:41:21 +0000 (11:41 +0100)
This patch does extra inline packet size check to tune
the ConnectX-4 Lx performance in the legacy Multi-Packet Write
mode.

Fixes: 7593cf1d3500 ("net/mlx5: fix legacy multi-packet write session")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Matan Azrad <matan@mellanox.com>
drivers/net/mlx5/mlx5_rxtx.c

index 9de6a50..2b4fc2a 100644 (file)
@@ -4286,6 +4286,8 @@ mlx5_tx_burst_empw_inline(struct mlx5_txq_data *restrict txq,
                            loc->mbuf->ol_flags & PKT_TX_DYNF_NOINLINE)
                                goto pointer_empw;
                        if (MLX5_TXOFF_CONFIG(MPW)) {
+                               if (dlen > txq->inlen_send)
+                                       goto pointer_empw;
                                tlen = dlen;
                                if (part == room) {
                                        /* Open new inline MPW session. */