net/mlx4: align Tx descriptors number
authorMatan Azrad <matan@mellanox.com>
Wed, 6 Dec 2017 17:57:55 +0000 (17:57 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jan 2018 17:47:49 +0000 (18:47 +0100)
commit50163aec51eb39e683a4b3a34aafef94ea54b772
tree2f1b7d6bad12f08c70965d2742743524d108d474
parent533871524a87bcf36e4a3d722ba2f87cc14769c7
net/mlx4: align Tx descriptors number

Using power of 2 descriptors number makes the ring management easier
and allows to use mask operation instead of wraparound conditions.

Adjust Tx descriptor number to be power of 2 and change calculation to
use mask accordingly.

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
drivers/net/mlx4/mlx4_rxtx.c
drivers/net/mlx4/mlx4_txq.c