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 1AF51A0C41; Thu, 30 Sep 2021 11:10:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 15E434111F; Thu, 30 Sep 2021 11:09:29 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 3952841150 for ; Thu, 30 Sep 2021 11:09:24 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18U1KYVa001409 for ; Thu, 30 Sep 2021 02:09:23 -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-transfer-encoding : content-type; s=pfpt0220; bh=BRN9ddndfiJ1nE+QRZzjCzvFTVlAs43wIfI3ONTIcZg=; b=VNPuskkyBmEMm6HIkAE6Fl7hhsQygk4/465S1+iyVQFFCIUbLtw31swOBcfjlXmF7AU4 cdWxNUd6BfIxQ9u/h8TlPZ7XFO1yKhVEp4t8dGZBwCUxr4xDLW3FCbtYxhHLJX8GsMml QqiGoG75KVY5iY0SYmlay/tHq3Ul77Fcagdamtn8kUyH1U4a4cUc06tmqlIFApFSzeja ARAzXMScfSqyDVirQ+wdN5OtShS+G5Cx/ZFFj6ZPJ3fbBLiqF3xEIeU+CQ+tRQB/kot2 mdydIL3gZ4/hg0Pz0BnI8YyXQCw0o9RcRRso1/WwmBnuWR2mHVLp/Ds6KHn1BJCAIm2q 0Q== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com with ESMTP id 3bd3g39ke3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Thu, 30 Sep 2021 02:09:23 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 30 Sep 2021 02:09:21 -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; Thu, 30 Sep 2021 02:09:21 -0700 Received: from localhost.localdomain (unknown [10.28.34.25]) by maili.marvell.com (Postfix) with ESMTP id 83C063F7067; Thu, 30 Sep 2021 02:09:19 -0700 (PDT) From: To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: Date: Thu, 30 Sep 2021 14:38:31 +0530 Message-ID: <20210930090844.1059326-14-skori@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210930090844.1059326-1-skori@marvell.com> References: <20210927082223.757436-1-skori@marvell.com> <20210930090844.1059326-1-skori@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: 9WhS6gZ6zW7t11_j83h65as5JzEmh03y X-Proofpoint-ORIG-GUID: 9WhS6gZ6zW7t11_j83h65as5JzEmh03y X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-30_02,2021-09-29_01,2020-04-07_01 Subject: [dpdk-dev] [PATCH v3 14/27] common/cnxk: support meter in action list 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: Sunil Kumar Kori Meter action is added in supported action list. Signed-off-by: Sunil Kumar Kori --- v3: - Rebase support on latest DPDK - Handled multilevel chaining for tree hierarchy - Fix naming convention v2: - Rebase support on latest DPDK - Handled multilevel chaining for linear hierarchy - Review comments incorporated drivers/common/cnxk/roc_npc.c | 3 +++ drivers/common/cnxk/roc_npc.h | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c index 52a54b3990..8f88e254b3 100644 --- a/drivers/common/cnxk/roc_npc.c +++ b/drivers/common/cnxk/roc_npc.c @@ -447,6 +447,9 @@ npc_parse_actions(struct npc *npc, const struct roc_npc_attr *attr, case ROC_NPC_ACTION_TYPE_VLAN_PCP_INSERT: req_act |= ROC_NPC_ACTION_TYPE_VLAN_PCP_INSERT; break; + case ROC_NPC_ACTION_TYPE_METER: + req_act |= ROC_NPC_ACTION_TYPE_METER; + break; default: errcode = NPC_ERR_ACTION_NOTSUP; goto err_exit; diff --git a/drivers/common/cnxk/roc_npc.h b/drivers/common/cnxk/roc_npc.h index 4d6f8f8cd9..86365df754 100644 --- a/drivers/common/cnxk/roc_npc.h +++ b/drivers/common/cnxk/roc_npc.h @@ -58,7 +58,7 @@ struct roc_npc_flow_item_raw { const uint8_t *pattern; /**< Byte string to look for. */ }; -#define ROC_NPC_MAX_ACTION_COUNT 12 +#define ROC_NPC_MAX_ACTION_COUNT 17 enum roc_npc_action_type { ROC_NPC_ACTION_TYPE_END = (1 << 0), @@ -77,6 +77,7 @@ enum roc_npc_action_type { ROC_NPC_ACTION_TYPE_VLAN_INSERT = (1 << 13), ROC_NPC_ACTION_TYPE_VLAN_ETHTYPE_INSERT = (1 << 14), ROC_NPC_ACTION_TYPE_VLAN_PCP_INSERT = (1 << 15), + ROC_NPC_ACTION_TYPE_METER = (1 << 16), }; struct roc_npc_action { @@ -110,6 +111,10 @@ struct roc_npc_action_of_set_vlan_pcp { uint8_t vlan_pcp; /**< VLAN priority. */ }; +struct roc_npc_action_meter { + uint32_t mtr_id; /**< Meter id to be applied. > */ +}; + struct roc_npc_attr { uint32_t priority; /**< Rule priority level within group. */ uint32_t ingress : 1; /**< Rule applies to ingress traffic. */ -- 2.25.1