[v6,21/47] net/bnxt: tf_ulp: add action read and clear support

Message ID 20241021082607.232829-22-sriharsha.basavapatna@broadcom.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ajit Khaparde
Headers
Series TruFlow update for Thor2 |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Sriharsha Basavapatna Oct. 21, 2024, 8:25 a.m. UTC
From: Jay Ding <jay.ding@broadcom.com>

Implement action read and clear support. Change flow
query count to reset the count after read in ULP.
Update cli cmds accordingly.

Fixed bnxt_mpc_xmit() to pad the mpc message to be
multiple of 16 bytes.

Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c | 4 ++++
 1 file changed, 4 insertions(+)
  

Patch

diff --git a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c
index f1bbce797d..2be37b59c2 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr_tfc.c
@@ -83,6 +83,10 @@  ulp_fc_tfc_flow_stat_get(struct bnxt_ulp_context *ctxt,
 	cmm_info.rsubtype = CFA_RSUBTYPE_CMM_ACT;
 	cmm_info.act_handle = handle;
 	cmm_info.dir = (enum cfa_dir)direction;
+	cmm_clr.clr = true;
+	cmm_clr.offset_in_byte = 0;
+	cmm_clr.sz_in_byte = sizeof(data64[ULP_FC_TFC_PKT_CNT_OFFS]) +
+			     sizeof(data64[ULP_FC_TFC_BYTE_CNT_OFFS]);
 	rc = tfc_act_get(tfcp, NULL, &cmm_info, &cmm_clr, data, &word_size);
 	if (rc) {
 		BNXT_DRV_DBG(ERR,