net/ena: trigger reset on Tx prepare failure
authorMichal Krawczyk <mk@semihalf.com>
Fri, 23 Jul 2021 10:24:51 +0000 (12:24 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 23 Jul 2021 15:43:08 +0000 (17:43 +0200)
commitb57e1053813b369d20bb2a177081a4c8ca63cede
treead57cfb52e48bd5369198edfe9e6c4f28e6a4391
parent0a001d69bca086c5a6e62b10552192380efee1f0
net/ena: trigger reset on Tx prepare failure

If the prepare function failed, then it means the descriptors are in the
invalid state.

This condition now triggers the reset, which should be further handled
by the application.

To notify the application about prepare function failure, the error log
was added. In general, it should never fail in normal conditions, as the
Tx function checks for the available space in the Tx ring before the
preparation even starts.

Fixes: 2081d5e2e92d ("net/ena: add reset routine")
Cc: stable@dpdk.org
Signed-off-by: Michal Krawczyk <mk@semihalf.com>
Reviewed-by: Shai Brandes <shaibran@amazon.com>
Reviewed-by: Shay Agroskin <shayagr@amazon.com>
drivers/net/ena/ena_ethdev.c