ethdev: fix invalid configuration after failure
authorWenzhuo Lu <wenzhuo.lu@intel.com>
Tue, 13 Nov 2018 11:12:36 +0000 (11:12 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 13 Nov 2018 23:35:53 +0000 (00:35 +0100)
commitaa28ec5d27b0ead28877081b30ccf0b74a16bbcd
tree057677b21cfc3716b8f1da242c2ceb11572246f8
parent49d3978d5723a3a71c348e1623cd10d489c0d4c0
ethdev: fix invalid configuration after failure

The new configuration is stored during the rte_eth_dev_configure() API
but the API may fail. After failure stored configuration will be
invalid since it is not fully applied to the device.

We better roll the configuration back after failure.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
lib/librte_ethdev/rte_ethdev.c