net/mlx5: fix queue wrap-around of multi-packet send
authorYongseok Koh <yskoh@mellanox.com>
Wed, 18 Jan 2017 00:51:55 +0000 (16:51 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 30 Jan 2017 21:18:26 +0000 (22:18 +0100)
commit16c647683019233a07d67af2f94867f52e7cf0b5
tree5db8dd8f6f9b4d8f8641472612b241b20fa97e4a
parentec1fed226a9887cef7b78069aa607292d3bf6a61
net/mlx5: fix queue wrap-around of multi-packet send

When the WQ is wrapped around, it wrongly checks the condition when
resetting the pointer. It should be compared against the end of the queue,
not the beginning of the queue. And this isn't even needed when the length
of the copying data crosses the boundary.

Fixes: fdcb0f53053b ("net/mlx5: use work queue buffer as a raw buffer")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
drivers/net/mlx5/mlx5_rxtx.c