From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 14A12A00C3 for ; Tue, 13 Sep 2022 07:10:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 05915427F1; Tue, 13 Sep 2022 07:10:31 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id CA3C24003F; Tue, 13 Sep 2022 07:10:28 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28D0bBk5019433; Mon, 12 Sep 2022 22:10:27 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=lXQ6XCisMgHgmGbjqC7XLdduLSz32JyK7T9ePve93To=; b=UVFEVq8u+SN76Rnakms8+TWTIxBkQQj52T75nuLfQhpySjskTHLDocH0eTCrQndkjsHj MOHX9Z6ua6DcMnqLjwp1lzD2gvZIsKaT7q+NDsrvniIA2KDXf40/JdPrp1QfqBNpJFRL kUAUa1vZj5RDp8b/5PlRRwm3RV6+GIDIaTzlpk1rDS6fNCz59bfO+vYTUJa7Z5jkE/j8 bMWZCzKykB7C6G51lyIR6IOE5ioU4fOkFALL2QnSVpL3MfH38mB5aC1sagZCiKJdyMGX w06neZQpPnLpaTxfY4ThFBlZvwp72G7xGLyxvmjUywcE03Kgb8k0lTt53PoyBBzq/Vao iw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3jgqxqabcv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 12 Sep 2022 22:10:27 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Mon, 12 Sep 2022 22:10:25 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Mon, 12 Sep 2022 22:10:25 -0700 Received: from satheeshpaullabpc.. (unknown [10.28.34.33]) by maili.marvell.com (Postfix) with ESMTP id ED2BB3F7066; Mon, 12 Sep 2022 22:10:22 -0700 (PDT) From: To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , Satheesh Paul , Subject: [dpdk-dev] [PATCH] common/cnxk: fix missing RTE Flow counter reset Date: Tue, 13 Sep 2022 10:40:19 +0530 Message-ID: <20220913051019.331807-1-psatheesh@marvell.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: mAqqTgAOg0N7B1UxuWkGszul4_5h5b-J X-Proofpoint-GUID: mAqqTgAOg0N7B1UxuWkGszul4_5h5b-J X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-13_02,2022-09-12_02,2022-06-22_01 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org From: Satheesh Paul Added code to clear counters upon flow deletion. Fixes: f9af9080746 ("common/cnxk: add mcam utility API") Cc: stable@dpdk.org Signed-off-by: Satheesh Paul Reviewed-by: Kiran Kumar Kokkilagadda --- drivers/common/cnxk/roc_npc_mcam.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/common/cnxk/roc_npc_mcam.c b/drivers/common/cnxk/roc_npc_mcam.c index 82a9756189..4bea6719c5 100644 --- a/drivers/common/cnxk/roc_npc_mcam.c +++ b/drivers/common/cnxk/roc_npc_mcam.c @@ -850,8 +850,10 @@ npc_flow_free_all_resources(struct npc *npc) for (idx = 0; idx < npc->flow_max_priority; idx++) { while ((flow = TAILQ_FIRST(&npc->flow_list[idx])) != NULL) { npc_rss_group_free(npc, flow); - if (flow->ctr_id != NPC_COUNTER_NONE) + if (flow->ctr_id != NPC_COUNTER_NONE) { + rc |= npc_mcam_clear_counter(npc, flow->ctr_id); rc |= npc_mcam_free_counter(npc, flow->ctr_id); + } npc_delete_prio_list_entry(npc, flow); -- 2.35.3