From 34d062630609eb0d64a7d8b786336804c7fa2904 Mon Sep 17 00:00:00 2001 From: Adrien Mazarguil Date: Mon, 23 Nov 2015 15:44:45 +0100 Subject: [PATCH] mlx5: fix scattered Tx with too many segments Buffers with too many segments are linearized to overcome MLX5_PMD_SGE_WR_N, unfortunately the last segment is never sent. Fixes: 3ee8444608a9 ("mlx5: support scattered Rx and Tx") Signed-off-by: Jesper Wramberg Signed-off-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5_rxtx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index 4c6ed328a0..80d0c97b4c 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -325,6 +325,8 @@ tx_burst_sg(struct txq *txq, unsigned int segs, struct txq_elt *elt, sge->length = size; sge->lkey = txq->mr_linear->lkey; sent_size += size; + /* Include last segment. */ + segs++; } return (struct tx_burst_sg_ret){ .length = sent_size, -- 2.20.1