common/cnxk: update MACsec pkt ok count

Message ID 20240105091516.2508910-1-gakhil@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Jerin Jacob
Headers
Series common/cnxk: update MACsec pkt ok count |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/github-robot: build success github build: passed
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-sample-apps-testing success Testing PASS

Commit Message

Akhil Goyal Jan. 5, 2024, 9:15 a.m. UTC
  In case of 103xx platform, the packet unchecked count
is same as packet ok count when validate frames is set in
secy configuration. And when validate frames is not set,
then also unchecked count can be treated as ok count.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
---
 drivers/common/cnxk/roc_mcs_stats.c | 5 +++++
 1 file changed, 5 insertions(+)
  

Comments

Jerin Jacob Jan. 10, 2024, 5:07 p.m. UTC | #1
On Sat, Jan 6, 2024 at 1:04 PM Akhil Goyal <gakhil@marvell.com> wrote:
>
> In case of 103xx platform, the packet unchecked count
> is same as packet ok count when validate frames is set in
> secy configuration. And when validate frames is not set,
> then also unchecked count can be treated as ok count.
>
> Signed-off-by: Akhil Goyal <gakhil@marvell.com>

Applied to dpdk-next-net-mrvl/for-main. Thanks
  

Patch

diff --git a/drivers/common/cnxk/roc_mcs_stats.c b/drivers/common/cnxk/roc_mcs_stats.c
index cac611959d..9e5d62c9e2 100644
--- a/drivers/common/cnxk/roc_mcs_stats.c
+++ b/drivers/common/cnxk/roc_mcs_stats.c
@@ -120,6 +120,11 @@  roc_mcs_sc_stats_get(struct roc_mcs *mcs, struct roc_mcs_stats_req *mcs_req,
 		if (roc_model_is_cn10kb_a0()) {
 			stats->octet_decrypt_cnt = rsp->octet_decrypt_cnt;
 			stats->octet_validate_cnt = rsp->octet_validate_cnt;
+			/*
+			 * If validate frame is enabled in secy configuration,
+			 * pkt unchecked count is same as pkt ok count.
+			 */
+			stats->pkt_ok_cnt = rsp->pkt_unchecked_cnt;
 		} else {
 			stats->pkt_delay_cnt = rsp->pkt_delay_cnt;
 			stats->pkt_ok_cnt = rsp->pkt_ok_cnt;