net/ena: fix Rx descriptors allocation
authorMichal Krawczyk <mk@semihalf.com>
Mon, 10 Apr 2017 14:28:08 +0000 (16:28 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 19 Apr 2017 13:37:37 +0000 (15:37 +0200)
commita467e8f37a3eec98210c0c3ec04bf6e9506ddd81
tree47886cc8c331e5396c8a056abe3fe9a6e65cf4bc
parent9ff8fe95dc53c2af878270288b0f28eb9d3c278f
net/ena: fix Rx descriptors allocation

When application tried to allocate 1024 descriptors, device was not
initializing properly.

This patch solves it by avoiding allocation of all descriptors in the
ring in one attempt. At least one descriptor must remain unused in the
HW ring.

Fixes: 1173fca25af9 ("ena: add polling-mode driver")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Jakub Palider <jpalider@gmail.com>
Acked-by: Jan Medala <jan.medala@outlook.com>
drivers/net/ena/ena_ethdev.c