net/mlx5: fix DevX scattered Rx queue size
authorMatan Azrad <matan@mellanox.com>
Mon, 29 Jul 2019 11:53:23 +0000 (11:53 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 29 Jul 2019 14:54:27 +0000 (16:54 +0200)
commitb7d1e5d4d1ab318ade8e3acd1b2bb68ae6e92120
tree6b4330cfdb72f5955d502cb33d9100cc859e9e95
parentbe39124e5b708bbf6ffe9c870ea3a6a6156e15b0
net/mlx5: fix DevX scattered Rx queue size

The WQ size configuration via DevX didn't take into account the maximum
number of segments per packet what wrongly caused to configure bigger
WQE size than the size expected by the PMD in other places.

The scatter mode stride size should be the size of segment multiplied
by the number of maximum segments per packet.
The number of WQEs per WQ should be the number of descriptors divided by
the number of the maximum segments per packet.

Fix the size calculations to the above rule.

Fixes: dc9ceff73c99 ("net/mlx5: create advanced RxQ via DevX")

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
drivers/net/mlx5/mlx5_rxq.c