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 8ABBAA034F; Mon, 7 Jun 2021 20:03:44 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 022B34111D; Mon, 7 Jun 2021 20:03:17 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 9C447410FF for ; Mon, 7 Jun 2021 20:03:14 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 157I1cMM017545 for ; Mon, 7 Jun 2021 11:03:14 -0700 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=NY7pJjCPHGjlyhezxkeBfoPNbxI+T9EabUboDwHmY60=; b=kH9/neMApcVi1w9h/eewMuLIM12aJuHTqyBrYqGEyzBZw7I12Pbj1VLluG5+oIb6aGBr MsFrHTTVhAAcmmW+RiBEM2+0rFr3Z4da+fLTPu4Gmn4EGG2CxnollCeAdWsEVJiKjlsX sj9vym3Hv93cGhx8n+TjVhYTbjCzVEdFz6Qlj6PxV+MZdOagyw62JhmbvOIxcIECQ9YW gRu/Hrq3rIhJN801LhjtX20+AcBpzYtbZ0Hj/yfOM7Kpd6kM5bQJ6b2DV92b7Yispd9g BIG0MrkK6AFK4vTv/ZB23TUCM1e6GvM6qsiiGO83KlnPmVDcgu0HmqdQhJxfgI57PPod Dw== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com with ESMTP id 391ecv2e8r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 07 Jun 2021 11:03:13 -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.2; Mon, 7 Jun 2021 11:03:11 -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.2 via Frontend Transport; Mon, 7 Jun 2021 11:03:11 -0700 Received: from hyd1588t430.marvell.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 635093F705E; Mon, 7 Jun 2021 11:03:09 -0700 (PDT) From: Nithin Dabilpuram To: CC: , , , , , , Date: Mon, 7 Jun 2021 23:28:46 +0530 Message-ID: <20210607175943.31690-6-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20210607175943.31690-1-ndabilpuram@marvell.com> References: <20210306153404.10781-1-ndabilpuram@marvell.com> <20210607175943.31690-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-GUID: zAwI75gkRtKt0Iy3vhkvS2HTqhcy1FAv X-Proofpoint-ORIG-GUID: zAwI75gkRtKt0Iy3vhkvS2HTqhcy1FAv X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-06-07_14:2021-06-04, 2021-06-07 signatures=0 Subject: [dpdk-dev] [PATCH v2 05/62] common/cnxk: support for mark and flag flow actions 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 Sender: "dev" From: Satheesh Paul Add roc API to get mark action. Signed-off-by: Satheesh Paul --- drivers/common/cnxk/roc_npc.c | 17 +++++++++++++++++ drivers/common/cnxk/roc_npc.h | 3 +++ drivers/common/cnxk/version.map | 2 ++ 3 files changed, 22 insertions(+) diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c index 81c7fd9..e6a5036 100644 --- a/drivers/common/cnxk/roc_npc.c +++ b/drivers/common/cnxk/roc_npc.c @@ -757,6 +757,23 @@ 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; +} + struct roc_npc_flow * roc_npc_flow_create(struct roc_npc *roc_npc, const struct roc_npc_attr *attr, const struct roc_npc_item_info pattern[], diff --git a/drivers/common/cnxk/roc_npc.h b/drivers/common/cnxk/roc_npc.h index 115bcd5..cf6f732 100644 --- a/drivers/common/cnxk/roc_npc.h +++ b/drivers/common/cnxk/roc_npc.h @@ -196,4 +196,7 @@ 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); #endif /* _ROC_NPC_H_ */ diff --git a/drivers/common/cnxk/version.map b/drivers/common/cnxk/version.map index a11ba4d..554459b 100644 --- a/drivers/common/cnxk/version.map +++ b/drivers/common/cnxk/version.map @@ -165,6 +165,8 @@ 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_mcam_alloc_entries; roc_npc_mcam_alloc_entry; roc_npc_mcam_clear_counter; -- 2.8.4