net/mlx5: change calculating inline room for Tx
authorYongseok Koh <yskoh@mellanox.com>
Thu, 13 Apr 2017 17:46:51 +0000 (10:46 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 19 Apr 2017 13:37:37 +0000 (15:37 +0200)
commitab76eab38aae98bc0cfae5d89ed8ee756f31382a
tree1c3b41a29a7e509a1d07523ef3c8ebe5b7e5f443
parent6b7ce3c7322040491389c51c3a6089ffdf7adcc1
net/mlx5: change calculating inline room for Tx

Current implementation is error-prone if the max inline size
(txq->max_inilne) is decoupled from txq->inline_en and becomes zero. If it
becomes zero, HW can crash due to WQ overflow.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
drivers/net/mlx5/mlx5_rxtx.c