net/bnxt: fix lock init and destroy
authorSomnath Kotur <somnath.kotur@broadcom.com>
Thu, 24 Dec 2020 09:37:32 +0000 (15:07 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 13 Jan 2021 18:24:30 +0000 (19:24 +0100)
commitc9ffd6f88653163d51c497bb56c62ec3276caf3d
treed43be7a5b9a55b6f4a4e16ec0f5ba31e96a291ab
parent899f06130724d07f0f4b56695f2c31f8ef569607
net/bnxt: fix lock init and destroy

Invoking init/uninit locks in init_resources and uninit_resources
would end up initializing and destroying locks on every port start
stop which is not desired.
Move the 2 routines to dev_init and dev_close respectively as
locks need to be initialized and destroyed only once during the
lifetime of the driver.

Fixes: 1cb3d39a48f7 ("net/bnxt: synchronize between flow related functions")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt_ethdev.c