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 8E903A034C; Tue, 22 Feb 2022 20:36:30 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6F7384118F; Tue, 22 Feb 2022 20:35:55 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 4D74E410F0 for ; Tue, 22 Feb 2022 20:35:53 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 21MInr2F019941; Tue, 22 Feb 2022 11:35:50 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=6zrjSlEE0MJVVGrCfKf/Uj1RZgYfppjPHEUzq/t9q/I=; b=NyM5DDASw3cq42O/enmH39ar6saWEOxHcVYfrj1e7V53IpKKTm8AsT2tkOCzkZ6gnjDG zeYZUJAfQ9Wgf7Puz/YZ0gakBeBVsItCQRlAONOGEMlPgT+wGmqIdnQXI7aEMe2v/aXb bZ80Ccx7YXFmOtsaB0ZVc5SheGLr9p4apAgG4vf0qVNAVz750OfKsuPnq4STXDaEiEbU azj3vp1IHueLOEtWmQ6hwA4DtFs7thpNIdE4mstSB+/A9Motj/qC9pNxWV7DmRxi7v94 Tigk/j30QrftKkBSAKq26w8WEFBPZlF93GHyJS4J2Cxjb/dLAqOtiF7YuA8J92b0HwIc Rg== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3ecwaxar36-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 22 Feb 2022 11:35:49 -0800 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; Tue, 22 Feb 2022 11:35:48 -0800 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; Tue, 22 Feb 2022 11:35:48 -0800 Received: from hyd1588t430.marvell.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id E89E63F7089; Tue, 22 Feb 2022 11:35:45 -0800 (PST) From: Nithin Dabilpuram To: , Nithin Dabilpuram , "Kiran Kumar K" , Sunil Kumar Kori , Satha Rao , Ray Kinsella CC: Subject: [PATCH v2 11/21] common/cnxk: remove tracking of mark actions Date: Wed, 23 Feb 2022 01:05:02 +0530 Message-ID: <20220222193512.19292-11-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20220222193512.19292-1-ndabilpuram@marvell.com> References: <20220207072932.22409-1-ndabilpuram@marvell.com> <20220222193512.19292-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-GUID: PEGO9kh5sD49AZ--4xlqLfAJSo07GiAi X-Proofpoint-ORIG-GUID: PEGO9kh5sD49AZ--4xlqLfAJSo07GiAi X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2022-02-22_06,2022-02-21_02,2021-12-02_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Satha Rao Removed roc NPC APIs which tracks addition and deletion of mark actions. It was earlier needed to track number of mark actions added as part of flow rules. If mark actions count is > 0, then the function pointer for Rx would get updated to even read mark value from CQE/WQE and populate in mbuf. Now the same switch is done based on new Rx meta data negotiate ethdev API. Signed-off-by: Satha Rao --- drivers/common/cnxk/roc_npc.c | 21 --------------------- drivers/common/cnxk/roc_npc.h | 3 --- drivers/common/cnxk/roc_npc_priv.h | 1 - drivers/common/cnxk/version.map | 2 -- 4 files changed, 27 deletions(-) diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c index 34c393f..fc88fd5 100644 --- a/drivers/common/cnxk/roc_npc.c +++ b/drivers/common/cnxk/roc_npc.c @@ -174,8 +174,6 @@ roc_npc_init(struct roc_npc *roc_npc) roc_npc->kex_capability = npc_get_kex_capability(npc); roc_npc->rx_parse_nibble = npc->keyx_supp_nmask[NPC_MCAM_RX]; - npc->mark_actions = 0; - npc->mcam_entries = npc_mcam_tot_entries() >> npc->keyw[NPC_MCAM_RX]; /* Free, free_rev, live and live_rev entries */ @@ -331,13 +329,11 @@ npc_parse_actions(struct roc_npc *roc_npc, const struct roc_npc_attr *attr, } mark = act_mark->id + 1; req_act |= ROC_NPC_ACTION_TYPE_MARK; - npc->mark_actions += 1; break; case ROC_NPC_ACTION_TYPE_FLAG: mark = NPC_FLOW_FLAG_VAL; req_act |= ROC_NPC_ACTION_TYPE_FLAG; - npc->mark_actions += 1; break; case ROC_NPC_ACTION_TYPE_COUNT: @@ -820,23 +816,6 @@ npc_rss_action_program(struct roc_npc *roc_npc, return 0; } -int -roc_npc_mark_actions_get(struct roc_npc *roc_npc) -{ - struct npc *npc = roc_npc_to_npc_priv(roc_npc); - - return npc->mark_actions; -} - -int -roc_npc_mark_actions_sub_return(struct roc_npc *roc_npc, uint32_t count) -{ - struct npc *npc = roc_npc_to_npc_priv(roc_npc); - - npc->mark_actions -= count; - return npc->mark_actions; -} - static int npc_vtag_cfg_delete(struct roc_npc *roc_npc, struct roc_npc_flow *flow) { diff --git a/drivers/common/cnxk/roc_npc.h b/drivers/common/cnxk/roc_npc.h index f9e5028..6204139 100644 --- a/drivers/common/cnxk/roc_npc.h +++ b/drivers/common/cnxk/roc_npc.h @@ -339,9 +339,6 @@ int __roc_api roc_npc_mcam_free_all_resources(struct roc_npc *roc_npc); void __roc_api roc_npc_flow_dump(FILE *file, struct roc_npc *roc_npc); void __roc_api roc_npc_flow_mcam_dump(FILE *file, struct roc_npc *roc_npc, struct roc_npc_flow *mcam); -int __roc_api roc_npc_mark_actions_get(struct roc_npc *roc_npc); -int __roc_api roc_npc_mark_actions_sub_return(struct roc_npc *roc_npc, - uint32_t count); int __roc_api roc_npc_vtag_actions_get(struct roc_npc *roc_npc); int __roc_api roc_npc_vtag_actions_sub_return(struct roc_npc *roc_npc, uint32_t count); diff --git a/drivers/common/cnxk/roc_npc_priv.h b/drivers/common/cnxk/roc_npc_priv.h index 23e8675..e78d96e 100644 --- a/drivers/common/cnxk/roc_npc_priv.h +++ b/drivers/common/cnxk/roc_npc_priv.h @@ -380,7 +380,6 @@ struct npc { uint16_t flow_prealloc_size; /* Pre allocated mcam size */ uint16_t flow_max_priority; /* Max priority for flow */ uint16_t switch_header_type; /* Supported switch header type */ - uint32_t mark_actions; /* Number of mark actions */ uint32_t vtag_strip_actions; /* vtag insert/strip actions */ uint16_t pf_func; /* pf_func of device */ npc_dxcfg_t prx_dxcfg; /* intf, lid, lt, extract */ diff --git a/drivers/common/cnxk/version.map b/drivers/common/cnxk/version.map index 94c35af..704dea7 100644 --- a/drivers/common/cnxk/version.map +++ b/drivers/common/cnxk/version.map @@ -306,8 +306,6 @@ INTERNAL { roc_npc_flow_parse; roc_npc_get_low_priority_mcam; roc_npc_init; - roc_npc_mark_actions_get; - roc_npc_mark_actions_sub_return; roc_npc_vtag_actions_get; roc_npc_vtag_actions_sub_return; roc_npc_mcam_alloc_entries; -- 2.8.4