net/failsafe: avoid crash on malformed ethdev
authorGaetan Rivet <grive@u256.net>
Tue, 5 May 2020 19:10:29 +0000 (21:10 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 11 May 2020 20:27:39 +0000 (22:27 +0200)
commit94a6f2def20486d80df2e289ae327eb2a7932209
tree14c8f3eadbc70d45de977bdb6371df77119a2a98
parentb9663f60359296bcb6f0be8a3d6a2a838c77ee30
net/failsafe: avoid crash on malformed ethdev

Some PMD do not respect the eth_dev API when allocating their
rte_eth_dev. As a result, on device add event resulting from
rte_eth_dev_probing_finish() call, the eth_dev processed is incomplete.

The segfault is a good way to focus the developer on the issue, but does
not inspire confidence. Instead, warn the user of the error repeatedly.

The failsafe PMD can warn of the issue and continue. It will repeatedly
attempt to initialize the failed port and complain about it, which
should result in the same developer focus but with less crashing.

Signed-off-by: Gaetan Rivet <grive@u256.net>
drivers/net/failsafe/failsafe_ether.c