net/mlx5: fix Rx scatter mode validation
authorMatan Azrad <matan@mellanox.com>
Mon, 29 Jul 2019 11:53:19 +0000 (11:53 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 29 Jul 2019 14:54:27 +0000 (16:54 +0200)
commit721c953018205e228ab87a5e46d053ce7a6f02f6
tree03ba3b7de0f4321392eefc64140f25c545db0e06
parent80918477eefd98dda5ed14a5f81cd1e57e7d172c
net/mlx5: fix Rx scatter mode validation

If the mbuf size of the Rx mempool supplied by the user in the Rx setup
is unable to contain the maximum Rx packet length in addition to the
mbuf head-room, the Rx scatter offload must be configured. Otherwise,
there is not enough space in single mbuf to contain a packet with size
of the maximum Rx packet length.

The PMD did not return an error in the above mentioned case.

Return an error in the above case.

Fixes: 7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support")
Fixes: edad38fcd00e ("net/mlx: enhance Rx scatter mode detection")
Cc: stable@dpdk.org
Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
drivers/net/mlx5/mlx5_rxq.c