From 2921677f15bf68dc7bd5d6fec2eb1f5d94bc32cf Mon Sep 17 00:00:00 2001 From: Adrien Mazarguil Date: Mon, 23 Nov 2015 15:44:38 +0100 Subject: [PATCH] mlx4: fix scattered Tx with too many segments Buffers with too many segments are linearized to overcome MLX4_PMD_SGE_WR_N, unfortunately the last segment is never sent. Fixes: be11b35817e0 ("mlx4: move scattered Tx processing to helper function") Signed-off-by: Jesper Wramberg Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index f46a09e59b..75543bb835 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -1195,6 +1195,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