DPDK patches and discussions
 help / color / mirror / Atom feed
From: <lironh@marvell.com>
To: <jerinj@marvell.com>
Cc: <dev@dpdk.org>, Liron Himi <lironh@marvell.com>
Subject: [PATCH v4 2/4] common/cnxk: add REE mbox definitions
Date: Tue, 7 Dec 2021 20:31:41 +0200
Message-ID: <20211207183143.27145-3-lironh@marvell.com> (raw)
In-Reply-To: <20211207183143.27145-1-lironh@marvell.com>

From: Liron Himi <lironh@marvell.com>

add REE mbox definitions

Signed-off-by: Liron Himi <lironh@marvell.com>
---
 drivers/common/cnxk/roc_mbox.h | 100 +++++++++++++++++++++++++++++++++
 1 file changed, 100 insertions(+)

diff --git a/drivers/common/cnxk/roc_mbox.h b/drivers/common/cnxk/roc_mbox.h
index b63fe108c9..e97d93e261 100644
--- a/drivers/common/cnxk/roc_mbox.h
+++ b/drivers/common/cnxk/roc_mbox.h
@@ -151,6 +151,16 @@ struct mbox_msghdr {
 	M(CPT_GET_CAPS, 0xBFD, cpt_caps_get, msg_req, cpt_caps_rsp_msg)        \
 	M(CPT_GET_ENG_GRP, 0xBFF, cpt_eng_grp_get, cpt_eng_grp_req,            \
 	  cpt_eng_grp_rsp)                                                     \
+	/* REE mbox IDs (range 0xE00 - 0xFFF) */                               \
+	M(REE_CONFIG_LF, 0xE01, ree_config_lf, ree_lf_req_msg, msg_rsp)        \
+	M(REE_RD_WR_REGISTER, 0xE02, ree_rd_wr_register, ree_rd_wr_reg_msg,    \
+	  ree_rd_wr_reg_msg)                                                   \
+	M(REE_RULE_DB_PROG, 0xE03, ree_rule_db_prog, ree_rule_db_prog_req_msg, \
+	  msg_rsp)                                                             \
+	M(REE_RULE_DB_LEN_GET, 0xE04, ree_rule_db_len_get, ree_req_msg,        \
+	  ree_rule_db_len_rsp_msg)                                             \
+	M(REE_RULE_DB_GET, 0xE05, ree_rule_db_get, ree_rule_db_get_req_msg,    \
+	  ree_rule_db_get_rsp_msg)                                             \
 	/* SDP mbox IDs (range 0x1000 - 0x11FF) */                             \
 	M(SET_SDP_CHAN_INFO, 0x1000, set_sdp_chan_info, sdp_chan_info_msg,     \
 	  msg_rsp)                                                             \
@@ -1452,6 +1462,96 @@ struct cpt_eng_grp_rsp {
 	uint8_t __io eng_grp_num;
 };
 
+/* REE mailbox error codes
+ * Range 1001 - 1100.
+ */
+enum ree_af_status {
+	REE_AF_ERR_RULE_UNKNOWN_VALUE = -1001,
+	REE_AF_ERR_LF_NO_MORE_RESOURCES = -1002,
+	REE_AF_ERR_LF_INVALID = -1003,
+	REE_AF_ERR_ACCESS_DENIED = -1004,
+	REE_AF_ERR_RULE_DB_PARTIAL = -1005,
+	REE_AF_ERR_RULE_DB_EQ_BAD_VALUE = -1006,
+	REE_AF_ERR_RULE_DB_BLOCK_ALLOC_FAILED = -1007,
+	REE_AF_ERR_BLOCK_NOT_IMPLEMENTED = -1008,
+	REE_AF_ERR_RULE_DB_INC_OFFSET_TOO_BIG = -1009,
+	REE_AF_ERR_RULE_DB_OFFSET_TOO_BIG = -1010,
+	REE_AF_ERR_Q_IS_GRACEFUL_DIS = -1011,
+	REE_AF_ERR_Q_NOT_GRACEFUL_DIS = -1012,
+	REE_AF_ERR_RULE_DB_ALLOC_FAILED = -1013,
+	REE_AF_ERR_RULE_DB_TOO_BIG = -1014,
+	REE_AF_ERR_RULE_DB_GEQ_BAD_VALUE = -1015,
+	REE_AF_ERR_RULE_DB_LEQ_BAD_VALUE = -1016,
+	REE_AF_ERR_RULE_DB_WRONG_LENGTH = -1017,
+	REE_AF_ERR_RULE_DB_WRONG_OFFSET = -1018,
+	REE_AF_ERR_RULE_DB_BLOCK_TOO_BIG = -1019,
+	REE_AF_ERR_RULE_DB_SHOULD_FILL_REQUEST = -1020,
+	REE_AF_ERR_RULE_DBI_ALLOC_FAILED = -1021,
+	REE_AF_ERR_LF_WRONG_PRIORITY = -1022,
+	REE_AF_ERR_LF_SIZE_TOO_BIG = -1023,
+};
+
+/* REE mbox message formats */
+
+struct ree_req_msg {
+	struct mbox_msghdr hdr;
+	uint32_t __io blkaddr;
+};
+
+struct ree_lf_req_msg {
+	struct mbox_msghdr hdr;
+	uint32_t __io blkaddr;
+	uint32_t __io size;
+	uint8_t __io lf;
+	uint8_t __io pri;
+};
+
+struct ree_rule_db_prog_req_msg {
+	struct mbox_msghdr hdr;
+#define REE_RULE_DB_REQ_BLOCK_SIZE ((64ULL * 1024ULL) >> 1)
+	uint8_t __io rule_db[REE_RULE_DB_REQ_BLOCK_SIZE];
+	uint32_t __io blkaddr;	     /* REE0 or REE1 */
+	uint32_t __io total_len;     /* total len of rule db */
+	uint32_t __io offset;	     /* offset of current rule db block */
+	uint16_t __io len;	     /* length of rule db block */
+	uint8_t __io is_last;	     /* is this the last block */
+	uint8_t __io is_incremental; /* is incremental flow */
+	uint8_t __io is_dbi;	     /* is rule db incremental */
+};
+
+struct ree_rule_db_get_req_msg {
+	struct mbox_msghdr hdr;
+	uint32_t __io blkaddr;
+	uint32_t __io offset; /* retrieve db from this offset */
+	uint8_t __io is_dbi;  /* is request for rule db incremental */
+};
+
+struct ree_rd_wr_reg_msg {
+	struct mbox_msghdr hdr;
+	uint64_t __io reg_offset;
+	uint64_t __io *ret_val;
+	uint64_t __io val;
+	uint32_t __io blkaddr;
+	uint8_t __io is_write;
+};
+
+struct ree_rule_db_len_rsp_msg {
+	struct mbox_msghdr hdr;
+	uint32_t __io blkaddr;
+	uint32_t __io len;
+	uint32_t __io inc_len;
+};
+
+struct ree_rule_db_get_rsp_msg {
+	struct mbox_msghdr hdr;
+#define REE_RULE_DB_RSP_BLOCK_SIZE (15ULL * 1024ULL)
+	uint8_t __io rule_db[REE_RULE_DB_RSP_BLOCK_SIZE];
+	uint32_t __io total_len; /* total len of rule db */
+	uint32_t __io offset;	 /* offset of current rule db block */
+	uint16_t __io len;	 /* length of rule db block */
+	uint8_t __io is_last;	 /* is this the last block */
+};
+
 /* NPC mbox message structs */
 
 #define NPC_MCAM_ENTRY_INVALID 0xFFFF
-- 
2.28.0


  parent reply	other threads:[~2021-12-07 18:32 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-03  6:23 [dpdk-dev] [PATCH] common/cnxk: add REE support lironh
2021-10-28  9:30 ` Jerin Jacob
2021-11-23 19:13 ` [PATCH v2 0/5] regex/cn9k: use cnxk infrastructure lironh
2021-11-23 19:13   ` [PATCH v2 1/5] common/cnxk: add REE HW definitions lironh
2021-11-23 19:13   ` [PATCH v2 2/5] common/cnxk: add REE mbox definitions lironh
2021-11-23 19:13   ` [PATCH v2 3/5] common/cnxk: add REE support lironh
2021-11-23 19:13   ` [PATCH v2 4/5] common/cnxk: link REE support to ROC files lironh
2021-11-23 19:13   ` [PATCH v2 5/5] regex/cn9k: use cnxk infrastructure lironh
     [not found]     ` <20211123193835.20601-1-robot@bytheb.org>
2021-11-28 20:17       ` [EXT] |FAILURE| pw104631 " Liron Himi
2021-11-28 20:37         ` Thomas Monjalon
2021-11-29  9:55           ` Liron Himi
2021-11-29 10:10             ` Thomas Monjalon
2021-11-29 19:47   ` [PATCH v2 0/5] " lironh
2021-11-29 19:47     ` [PATCH v3 " lironh
2021-11-29 19:47     ` [PATCH v3 1/5] common/cnxk: add REE HW definitions lironh
2021-12-07 18:31       ` [PATCH v4 0/4] regex/cn9k: use cnxk infrastructure lironh
2021-12-07 18:31         ` [PATCH v4 1/4] common/cnxk: add REE HW definitions lironh
2021-12-07 18:31         ` lironh [this message]
2021-12-07 18:31         ` [PATCH v4 3/4] common/cnxk: add REE support lironh
2021-12-07 18:31         ` [PATCH v4 4/4] regex/cn9k: use cnxk infrastructure lironh
2021-12-08  9:14         ` [PATCH v4 0/4] " Jerin Jacob
2021-12-11  9:04         ` [dpdk-dev] [PATCH v5 0/5] remove octeontx2 drivers jerinj
2021-12-11  9:04           ` [dpdk-dev] [PATCH v5 1/5] common/cnxk: add REE HW definitions jerinj
2021-12-11  9:04           ` [dpdk-dev] [PATCH v5 2/5] common/cnxk: add REE mbox definitions jerinj
2021-12-11  9:04           ` [dpdk-dev] [PATCH v5 3/5] common/cnxk: add REE support jerinj
2021-12-11  9:04           ` [dpdk-dev] [PATCH v5 4/5] regex/cn9k: use cnxk infrastructure jerinj
2021-12-11  9:04           ` [dpdk-dev] [PATCH v5 5/5] drivers: remove octeontx2 drivers jerinj
2021-12-14  8:57             ` Ruifeng Wang
2022-01-12 14:37           ` [dpdk-dev] [PATCH v5 0/5] " Thomas Monjalon
2021-11-29 19:47     ` [PATCH v3 2/5] common/cnxk: add REE mbox definitions lironh
2021-11-29 19:47     ` [PATCH v3 3/5] common/cnxk: add REE support lironh
2021-11-29 19:47     ` [PATCH v3 4/5] common/cnxk: link REE support to ROC files lironh
2021-11-29 19:47     ` [PATCH v3 5/5] regex/cn9k: use cnxk infrastructure lironh
2021-11-29 19:49   ` [PATCH v3 0/5] " lironh
2021-11-29 19:49     ` [PATCH v3 1/5] common/cnxk: add REE HW definitions lironh
2021-11-29 19:49     ` [PATCH v3 2/5] common/cnxk: add REE mbox definitions lironh
2021-11-29 19:49     ` [PATCH v3 3/5] common/cnxk: add REE support lironh
2021-11-29 19:49     ` [PATCH v3 4/5] common/cnxk: link REE support to ROC files lironh
2021-11-29 19:49     ` [PATCH v3 5/5] regex/cn9k: use cnxk infrastructure lironh
2021-11-29 19:59   ` [PATCH v3 0/5] " lironh
2021-11-29 19:59     ` [PATCH v3 1/5] common/cnxk: add REE HW definitions lironh
2021-11-29 19:59     ` [PATCH v3 2/5] common/cnxk: add REE mbox definitions lironh
2021-11-29 19:59     ` [PATCH v3 3/5] common/cnxk: add REE support lironh
2021-11-29 19:59     ` [PATCH v3 4/5] common/cnxk: link REE support to ROC files lironh
2021-12-06  5:07       ` Jerin Jacob
2021-12-06  6:54         ` [EXT] " Liron Himi
2021-12-06  8:08           ` Jerin Jacob
2021-11-29 19:59     ` [PATCH v3 5/5] regex/cn9k: use cnxk infrastructure lironh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211207183143.27145-3-lironh@marvell.com \
    --to=lironh@marvell.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git