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 E1ECDA053D; Fri, 17 Jul 2020 11:55:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 42C021BFE7; Fri, 17 Jul 2020 11:55:02 +0200 (CEST) Received: from relay.smtp.broadcom.com (relay.smtp.broadcom.com [192.19.232.149]) by dpdk.org (Postfix) with ESMTP id 507271BFB6 for ; Fri, 17 Jul 2020 11:54:57 +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 D7B031BBF15; Fri, 17 Jul 2020 02:54:56 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com D7B031BBF15 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1594979697; bh=1q6Wubh0xbjV9xIJehH5Eejy9Fur7k0o7K3/nhceG1o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FWB7bWrTCLEC8JiN9+YTRS0jjmLEx/DZ8dlN47JN8GxPU8kBdYD+9LBfPNBnwMjk9 m7+knVanUbNcTChouv1Y4KjHTkAPrFG16CNYdCqRmhzSuKEBTdGhLRnHbu+C8gzhei UW6R9H5zsmiL/JvSRFawuzURD4ftkMcDb3SOoyJE= From: Somnath Kotur To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Fri, 17 Jul 2020 15:19:25 +0530 Message-Id: <20200717094935.9337-5-somnath.kotur@broadcom.com> X-Mailer: git-send-email 2.10.1.613.g2cc2e70 In-Reply-To: <20200717094935.9337-1-somnath.kotur@broadcom.com> References: <20200717094935.9337-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 atleast 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