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 D07DBA0527; Sat, 18 Jul 2020 09:26:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 35CBD1BFCA; Sat, 18 Jul 2020 09:25:38 +0200 (CEST) Received: from mail-wr1-f98.google.com (mail-wr1-f98.google.com [209.85.221.98]) by dpdk.org (Postfix) with ESMTP id CB71C1BFBA for ; Sat, 18 Jul 2020 09:25:34 +0200 (CEST) Received: by mail-wr1-f98.google.com with SMTP id f2so13257889wrp.7 for ; Sat, 18 Jul 2020 00:25:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6Yk2ayt95NiGr2eHge2e9UM2CDr0UsJLRRXmVWfuGOk=; b=WKx80hyjXSMvxdGoSMNwg+tSMDeKqHfptG/PtUyJHd+5/2RwBvdex2Sa0uFpEUzQlu ngb7u4d/sjiYoHGANgD7hOdSKIhbQSK0wcUScbg5SM+NRNCmeO7xYEPv8pQ9ufIIqGya CtkGeRe+0xdIWGZs8AcD8I3YJE3mqejI27aWs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=6Yk2ayt95NiGr2eHge2e9UM2CDr0UsJLRRXmVWfuGOk=; b=fOJAQz1n4w7VsQeCjkRjLLsRxT0NanNHT/FMDrggLUr3R2aK1r0tudIiqWrJ+LPPNj NtBOk4QfvZKQ57Clrjb6Hc/xGHuDDU2HhbdsHnf4XHTBhiZayJ2PbLFPNhr6yiAT2ia1 68keD4FfXqmgaNzWgw0hwRdmDjlXDO5MyFeo1yXZ4CPg9KhQ45yLWOTzizfdOWKDHX6w 0d+FuU0GjHtVqwZP5ejaG6pyMU8Dxp2pgNjyRFTLYXOaOP0aq3DWtyH85TFUPeF7Y8iq WYecMVoj/9RsNyJfYtbxkyDr3N+3HZ/m6zPDEi7OGm53/KkQ/JXy9L1Z1ulh9YfrCsAm AhOg== X-Gm-Message-State: AOAM533BA75csVlgW4EvQiyeVa2ADR2+iTjCQ791mnpW6ycqM1r7j+nE OJktG8qmPdlZVah38/kjSniZaBEQNwscNcatXtNVp9KykFTVXqJeb3bvhy+g9MmvGkZYeBK44Nj DLDcaY1wem6pImgvx4sK1PQs0kPOoMg8jyXOhXhoc5uvSEn4uQvOl9WYsDLK9yISk6csH/+Ro3Z WmZA== X-Google-Smtp-Source: ABdhPJx4gweq+dZoyR2UfO1wFOmZz/EEezB9ADIxgpdLOqWSFs0Bf/LjViz6XkGIFfM4IWaXS993ApOWPOQD X-Received: by 2002:adf:f14e:: with SMTP id y14mr13551167wro.151.1595057134217; Sat, 18 Jul 2020 00:25:34 -0700 (PDT) Received: from localhost.localdomain ([192.19.223.252]) by smtp-relay.gmail.com with ESMTPS id g14sm34554wrb.16.2020.07.18.00.25.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 18 Jul 2020 00:25:34 -0700 (PDT) X-Relaying-Domain: broadcom.com From: Ajit Khaparde To: dev@dpdk.org Cc: Somnath Kotur , Venkat Duvvuru Date: Sat, 18 Jul 2020 00:25:05 -0700 Message-Id: <20200718072515.62969-5-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) In-Reply-To: <20200718072515.62969-1-ajit.khaparde@broadcom.com> References: <20200717141451.11705-1-somnath.kotur@broadcom.com> <20200718072515.62969-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 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" From: Somnath Kotur 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 Reviewed-by: Venkat Duvvuru Reviewed-by: Ajit Khaparde --- 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)