[dpdk-dev] [PATCH v3 04/14] net/bnxt: fix to avoid accumulation of flow counters
Ajit Khaparde
ajit.khaparde at broadcom.com
Sat Jul 18 09:25:05 CEST 2020
From: Somnath Kotur <somnath.kotur at broadcom.com>
OVS-DPDK is accumulating the flow counters that are returned as part
of the flow_query API and it is being issued at least 3 times every second.
So there is no need to accumulate the counts internally in the driver.
Fixes: 306c2d28e247 ("net/bnxt: add support for flow query with action_type COUNT")
Signed-off-by: Somnath Kotur <somnath.kotur at broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru at broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
index 34a6ec357..febda9421 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_fc_mgr.c
@@ -315,8 +315,8 @@ static int ulp_get_single_flow_stat(struct tf *tfp,
/* TBD - Get PKT/BYTE COUNT SHIFT/MASK from Template */
sw_cntr_indx = hw_cntr_id - fc_info->shadow_hw_tbl[dir].start_idx;
sw_acc_tbl_entry = &fc_info->sw_acc_tbl[dir][sw_cntr_indx];
- sw_acc_tbl_entry->pkt_count += FLOW_CNTR_PKTS(stats, dparms);
- sw_acc_tbl_entry->byte_count += FLOW_CNTR_BYTES(stats, dparms);
+ sw_acc_tbl_entry->pkt_count = FLOW_CNTR_PKTS(stats, dparms);
+ sw_acc_tbl_entry->byte_count = FLOW_CNTR_BYTES(stats, dparms);
return rc;
}
--
2.21.1 (Apple Git-122.3)
More information about the dev
mailing list