octeontx2-pf: mcs: Clear stats before freeing resource
authorSubbaraya Sundeep <sbhatta@marvell.com>
Wed, 26 Apr 2023 06:25:26 +0000 (11:55 +0530)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 27 Apr 2023 10:38:11 +0000 (12:38 +0200)
commit815debbbf7b52026462c37eea3be70d6377a7a9a
treec8bc8a3775eac915109cc3344a31f94fe8e02211
parent57d00d4364f314485092667d2a48718985515deb
octeontx2-pf: mcs: Clear stats before freeing resource

When freeing MCS hardware resources like SecY, SC and
SA the corresponding stats needs to be cleared. Otherwise
previous stats are shown in newly created macsec interfaces.

Fixes: c54ffc73601c ("octeontx2-pf: mcs: Introduce MACSEC hardware offloading")
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: Geetha sowjanya <gakula@marvell.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c