]> www.infradead.org Git - users/dwmw2/linux.git/commit
octeontx2-pf: mcs: Fix shared counters logic
authorSubbaraya Sundeep <sbhatta@marvell.com>
Wed, 26 Apr 2023 06:25:27 +0000 (11:55 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:53:32 +0000 (11:53 +0200)
commitfd59ec145595c899a4e8480f7bd0d95dbe4fea5c
treed511f2d597e7afa20a5e9582f61807b2258ad36b
parenta8ddb974f014bc6e0ea56230eebc4b6e42f468f2
octeontx2-pf: mcs: Fix shared counters logic

[ Upstream commit 9bdfe61054fb2b989eb58df20bf99c0cf67e3038 ]

Macsec stats like InPktsLate and InPktsDelayed share
same counter in hardware. If SecY replay_protect is true
then counter represents InPktsLate otherwise InPktsDelayed.
This mode change was tracked based on protect_frames
instead of replay_protect mistakenly. Similarly InPktsUnchecked
and InPktsOk share same counter and mode change was tracked
based on validate_check instead of validate_disabled.
This patch fixes those problems.

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h