net/octeontx2: fix driver reconfiguration
authorKrzysztof Kanas <kkanas@marvell.com>
Mon, 22 Jul 2019 14:58:51 +0000 (16:58 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 23 Jul 2019 12:31:36 +0000 (14:31 +0200)
commitd34db5ccbf302709b99bafe6d477dfcf0537e7de
tree3c1d91a48811de0bbf6413db4a8a3b2786716471
parentc5ddc9b98d171aa9483a50ce846ec391c8f2f885
net/octeontx2: fix driver reconfiguration

When configure returns error, e.g. in case not supported offloads
(outer ip and sctp) driver released Rx,Tx queues. Then in case of
correct configuration the driver could not start due to queues already
released but the driver thought it was configured correctly.

Secondly if driver returns error from configuration librte_ethdev will
release, rx queues and tx queues, without chaining driver configured
state.

Fix that by 'releasing' configuration and changing driver state when
error is returned from otx2_nix_configure.

Fixes: 548b5839a32b ("net/octeontx2: add device configure operation")

Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Reviewed-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
drivers/net/octeontx2/otx2_ethdev.c