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 C3976A0C46; Fri, 18 Jun 2021 12:39:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 66A9C41104; Fri, 18 Jun 2021 12:39:36 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 1833B410FA for ; Fri, 18 Jun 2021 12:39:33 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15IAYfuV029381 for ; Fri, 18 Jun 2021 03:39:33 -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=Y5m/VE8jGi0BwxtqxXaaLZcR99BLxN1gpue/TCKloKtyAJVUrAI5cLKgIQj7MHB74HtR lMpkd0MD5ru9tgQFcJoiIR/XMQHUtQpi5FAWCuhKVFkc9wC/ITWlEXAtIP4ll4XeWenP gtJExIdIOCNjj4BCPF0RGsYegaKb9J41ZIVqFjqZZxUH9ihJp8HCez7SGoOtRJDGws0I ICQdCxgeNnJWwnbIJQ7dScnWqQtkeRQxGu3mpF28W8uTM+kQAiIQE/Zry45gHpazTfSu X4CUJ2CHdiaYXKN1ID0QFdOlc+DSumZmnBtRQNHkw9T+iyjp+502zRS2aqgSUXr3enD9 WA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 398r750cy2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Fri, 18 Jun 2021 03:39:33 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Fri, 18 Jun 2021 03:39:31 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Fri, 18 Jun 2021 03:39:31 -0700 Received: from hyd1588t430.marvell.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id CCAB15B6B0F; Fri, 18 Jun 2021 03:38:40 -0700 (PDT) From: Nithin Dabilpuram To: CC: , , , , , , , Date: Fri, 18 Jun 2021 16:06:43 +0530 Message-ID: <20210618103741.26526-5-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20210618103741.26526-1-ndabilpuram@marvell.com> References: <20210306153404.10781-1-ndabilpuram@marvell.com> <20210618103741.26526-1-ndabilpuram@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-ORIG-GUID: ReH35nZfoexT0vMPHNM6qYC5x9mfZF6u X-Proofpoint-GUID: ReH35nZfoexT0vMPHNM6qYC5x9mfZF6u X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-06-18_04:2021-06-18, 2021-06-18 signatures=0 Subject: [dpdk-dev] [PATCH v3 04/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