From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6F38FA053B; Fri, 17 Jul 2020 16:20:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7B5921BFEF; Fri, 17 Jul 2020 16:20:13 +0200 (CEST) Received: from relay.smtp.broadcom.com (relay.smtp.broadcom.com [192.19.211.62]) by dpdk.org (Postfix) with ESMTP id 9846A2C38 for ; Fri, 17 Jul 2020 16:20:07 +0200 (CEST) Received: from dhcp-10-123-153-55.dhcp.broadcom.net (dhcp-10-123-153-55.dhcp.broadcom.net [10.123.153.55]) by relay.smtp.broadcom.com (Postfix) with ESMTP id BBDF9299AC7; Fri, 17 Jul 2020 07:20:06 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com BBDF9299AC7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1594995606; bh=F1/M5t7hT+JCoNlfFLaEixXAhZ+0pZjD+uJ9HneGfzA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IpUCKquOpKKD+CsZmsa6rOw3geQ6X3te56sSNXSVYYTx0PohJOI7h1Jhk05O/UreN 5yESb1P3DnuIOjRa6aj7agfvpLaRRwJOk9P5iJyFOFgPiJupOz2v8qsqVMv2geItUp davz1M14rrJA4mEJaeBP/Wkf5I+gaPE8117fcnQA= From: Somnath Kotur To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Fri, 17 Jul 2020 19:44:41 +0530 Message-Id: <20200717141451.11705-5-somnath.kotur@broadcom.com> X-Mailer: git-send-email 2.10.1.613.g2cc2e70 In-Reply-To: <20200717141451.11705-1-somnath.kotur@broadcom.com> References: <20200717094935.9337-1-somnath.kotur@broadcom.com> <20200717141451.11705-1-somnath.kotur@broadcom.com> Subject: [dpdk-dev] [PATCH 04/14] net/bnxt: fix to avoid accumulation of flow counters X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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") Reviewed-by: Venkat Duvvuru Reviewed-by: Ajit Kumar Khaparde Signed-off-by: Somnath Kotur --- 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 34a6ec3..febda94 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.7.4