net/mlx5: fix Memory Region registration
authorYongseok Koh <yskoh@mellanox.com>
Fri, 15 Dec 2017 01:59:17 +0000 (17:59 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jan 2018 17:47:49 +0000 (18:47 +0100)
commit3a6f2eb8c5c597d6675a8fbb9563010c0c546521
tree357bec1b441940707e13bb43b819acafc18853f3
parent3a76da0ac85ff90280ec612dd444a553a4782f7b
net/mlx5: fix Memory Region registration

Although granularity of chunks in a mempool is a cacheline, addresses are
extended to align to page boundary for performance reason in device when
registering a MR (Memory Region). This could make some regions overlap,
then can cause Tx completion error due to incorrect LKEY search. If the
error occurs, the Tx queue will get stuck. To avoid it, end address of a
packet segment is used in LKEY search.

Fixes: b0b093845793 ("net/mlx5: use buffer address for LKEY search")
Cc: stable@dpdk.org
Reported-by: Hanoch Haim <hhaim@cisco.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
drivers/net/mlx5/mlx5_rxtx.h