Lines Matching +full:mbox +full:- +full:tx
1 /* SPDX-License-Identifier: GPL-2.0 */
34 #define INTR_MASK(pfvfs) ((pfvfs < 64) ? (BIT_ULL(pfvfs) - 1) : (~0ull))
36 #define MBOX_RSP_TIMEOUT 6000 /* Time(ms) to wait for mbox response */
38 #define MBOX_MSG_ALIGN 16 /* Align mbox msg start to 16bytes */
51 void *mbase; /* This dev's mbox region */
62 void *hwbase; /* Mbox region advertised by HW */
64 u64 trigger; /* Trigger mbox notification */
65 u16 tr_shift; /* Mbox trigger shift */
66 u64 rx_start; /* Offset of Rx region in mbox memory */
67 u64 tx_start; /* Offset of Tx region in mbox memory */
69 u16 tx_size; /* Size of Tx region */
74 /* Header which precedes all mbox messages */
83 u16 id; /* Mbox message ID */
93 void otx2_mbox_reset(struct otx2_mbox *mbox, int devid);
94 void __otx2_mbox_reset(struct otx2_mbox *mbox, int devid);
95 void otx2_mbox_destroy(struct otx2_mbox *mbox);
96 int otx2_mbox_init(struct otx2_mbox *mbox, void __force *hwbase,
99 int otx2_mbox_regions_init(struct otx2_mbox *mbox, void __force **hwbase,
102 void otx2_mbox_msg_send(struct otx2_mbox *mbox, int devid);
103 int otx2_mbox_wait_for_rsp(struct otx2_mbox *mbox, int devid);
104 int otx2_mbox_busy_poll_for_rsp(struct otx2_mbox *mbox, int devid);
105 struct mbox_msghdr *otx2_mbox_alloc_msg_rsp(struct otx2_mbox *mbox, int devid,
107 struct mbox_msghdr *otx2_mbox_get_rsp(struct otx2_mbox *mbox, int devid,
109 int otx2_mbox_check_rsp_msgs(struct otx2_mbox *mbox, int devid);
110 int otx2_reply_invalid_msg(struct otx2_mbox *mbox, int devid,
112 bool otx2_mbox_nonempty(struct otx2_mbox *mbox, int devid);
114 static inline struct mbox_msghdr *otx2_mbox_alloc_msg(struct otx2_mbox *mbox, in otx2_mbox_alloc_msg() argument
117 return otx2_mbox_alloc_msg_rsp(mbox, devid, size, 0); in otx2_mbox_alloc_msg()
126 /* Generic mbox IDs (range 0x000 - 0x1FF) */ \
138 /* CGX mbox IDs (range 0x200 - 0x3FF) */ \
178 /* NPA mbox IDs (range 0x400 - 0x5FF) */ \
184 /* SSO/SSOW mbox IDs (range 0x600 - 0x7FF) */ \
185 /* TIM mbox IDs (range 0x800 - 0x9FF) */ \
186 /* CPT mbox IDs (range 0xA00 - 0xBFF) */ \
198 /* SDP mbox IDs (range 0x1000 - 0x11FF) */ \
201 /* NPC mbox IDs (range 0x6000 - 0x7FFF) */ \
248 /* NIX mbox IDs (range 0x8000 - 0xFFFF) */ \
297 /* MCS mbox IDs (range 0xA000 - 0xBFFF) */ \
348 /* Messages initiated by AF (range 0xC00 - 0xEFF) */
371 /* Generic request msg used for those mbox messages which
378 /* Generic response msg used an ack or response for those mbox
386 * Range 256 - 300.
389 RVU_INVALID_VF_ID = -256,
407 * attach->cptlfs = 3; <3 LFs from CPT0>
410 * attach->modify = 1;
411 * attach->cpt_blkaddr = BLKADDR_CPT1;
412 * attach->cptlfs = 2; <2 LFs from CPT1>
492 /* CGX mbox message formats */
697 /* NPA mbox message formats */
715 /* NPA mbox message formats */
718 * Range 301 - 400.
721 NPA_AF_ERR_PARAM = -301,
722 NPA_AF_ERR_AQ_FULL = -302,
723 NPA_AF_ERR_AQ_ENQUEUE = -303,
724 NPA_AF_ERR_AF_LF_INVALID = -304,
725 NPA_AF_ERR_AF_LF_ALLOC = -305,
726 NPA_AF_ERR_LF_RESET = -306,
786 /* NIX mbox message formats */
789 * Range 401 - 500.
792 NIX_AF_ERR_PARAM = -401,
793 NIX_AF_ERR_AQ_FULL = -402,
794 NIX_AF_ERR_AQ_ENQUEUE = -403,
795 NIX_AF_ERR_AF_LF_INVALID = -404,
796 NIX_AF_ERR_AF_LF_ALLOC = -405,
797 NIX_AF_ERR_TLX_ALLOC_FAIL = -406,
798 NIX_AF_ERR_TLX_INVALID = -407,
799 NIX_AF_ERR_RSS_SIZE_INVALID = -408,
800 NIX_AF_ERR_RSS_GRPS_INVALID = -409,
801 NIX_AF_ERR_FRS_INVALID = -410,
802 NIX_AF_ERR_RX_LINK_INVALID = -411,
803 NIX_AF_INVAL_TXSCHQ_CFG = -412,
804 NIX_AF_SMQ_FLUSH_FAILED = -413,
805 NIX_AF_ERR_LF_RESET = -414,
806 NIX_AF_ERR_RSS_NOSPC_FIELD = -415,
807 NIX_AF_ERR_RSS_NOSPC_ALGO = -416,
808 NIX_AF_ERR_MARK_CFG_FAIL = -417,
809 NIX_AF_ERR_LSO_CFG_FAIL = -418,
810 NIX_AF_INVAL_NPA_PF_FUNC = -419,
811 NIX_AF_INVAL_SSO_PF_FUNC = -420,
812 NIX_AF_ERR_TX_VTAG_NOSPC = -421,
813 NIX_AF_ERR_RX_VTAG_INUSE = -422,
814 NIX_AF_ERR_PTP_CONFIG_FAIL = -423,
815 NIX_AF_ERR_NPC_KEY_NOT_SUPP = -424,
816 NIX_AF_ERR_INVALID_NIXBLK = -425,
817 NIX_AF_ERR_INVALID_BANDPROF = -426,
818 NIX_AF_ERR_IPOLICER_NOTSUPP = -427,
819 NIX_AF_ERR_BANDPROF_INVAL_REQ = -428,
820 NIX_AF_ERR_CQ_CTX_WRITE_ERR = -429,
821 NIX_AF_ERR_AQ_CTX_RETRY_WRITE = -430,
822 NIX_AF_ERR_LINK_CREDITS = -431,
862 u8 tx_chan_cnt; /* total number of TX channels */
955 /* Tx scheduler/shaper mailbox messages */
963 u16 schq[NIX_TXSCH_LVL_CNT]; /* No of non-contiguous queues */
994 #define TXSCHQ_IDX_MASK (BIT_ULL(10) - 1)
1008 /* cfg_type is '0' for tx vlan cfg
1049 } tx; member
1068 * tx vtag0 & vtag1 headers, these indices are valid
1069 * when nix_vtag_config mbox requested for vtag0 and/
1265 /* NPC mbox message structs */
1271 * Range 701 - 800.
1274 NPC_MCAM_INVALID_REQ = -701,
1275 NPC_MCAM_ALLOC_DENIED = -702,
1276 NPC_MCAM_ALLOC_FAILED = -703,
1277 NPC_MCAM_PERM_DENIED = -704,
1278 NPC_FLOW_INTF_INVALID = -707,
1279 NPC_FLOW_CHAN_INVALID = -708,
1280 NPC_FLOW_NO_NIXLF = -709,
1281 NPC_FLOW_NOT_SUPPORTED = -710,
1282 NPC_FLOW_VF_PERM_DENIED = -711,
1283 NPC_FLOW_VF_NOT_INIT = -712,
1284 NPC_FLOW_VF_OVERLAP = -713,
1302 * Invalid incase of non-contiguous.
1328 u8 intf; /* Rx or Tx interface */
1362 * Invalid incase of non-contiguous.
1390 u8 intf; /* Rx or Tx interface */
1465 /* vtag tx action */
1565 * Range 901 - 1000.
1568 CPT_AF_ERR_PARAM = -901,
1569 CPT_AF_ERR_GRP_INVALID = -902,
1570 CPT_AF_ERR_LF_INVALID = -903,
1571 CPT_AF_ERR_ACCESS_DENIED = -904,
1572 CPT_AF_ERR_SSO_PF_FUNC_INVALID = -905,
1573 CPT_AF_ERR_NIX_PF_FUNC_INVALID = -906,
1574 CPT_AF_ERR_INLINE_IPSEC_INB_ENA = -907,
1575 CPT_AF_ERR_INLINE_IPSEC_OUT_ENA = -908
1578 /* CPT mbox message formats */
1699 * Range 1101 - 1200.
1702 LMAC_AF_ERR_INVALID_PARAM = -1101,
1703 LMAC_AF_ERR_PF_NOT_MAPPED = -1102,
1704 LMAC_AF_ERR_PERM_DENIED = -1103,
1705 LMAC_AF_ERR_PFC_ENADIS_PERM_DENIED = -1104,
1706 LMAC_AF_ERR_8023PAUSE_ENADIS_PERM_DENIED = -1105,
1707 LMAC_AF_ERR_CMD_TIMEOUT = -1106,
1708 LMAC_AF_ERR_FIRMWARE_DATA_NOT_MAPPED = -1107,
1709 LMAC_AF_ERR_EXACT_MATCH_TBL_ADD_FAILED = -1108,
1710 LMAC_AF_ERR_EXACT_MATCH_TBL_DEL_FAILED = -1109,
1711 LMAC_AF_ERR_EXACT_MATCH_TBL_LOOK_UP_FAILED = -1110,
1764 u64 sci; /* CNF10K-B for tx_secy_mem_map */
1823 u8 an; /* value range 0-3, sc_id + an used as index SA_MEM_MAP */
1849 u8 tcam_entries; /* RX/TX Tcam entries per mcs block */
1850 u8 secy_entries; /* RX/TX SECY entries per mcs block */
1851 u8 sc_entries; /* RX/TX SC CAM entries per mcs block */
1927 * Range 1201 - 1300.
1930 MCS_AF_ERR_INVALID_MCSID = -1201,
1931 MCS_AF_ERR_NOT_MAPPED = -1202,
2023 u64 pkt_ctl_cnt; /* CN10K-B */
2024 u64 pkt_notag_cnt; /* CNF10K-B */
2025 /* Valid only for TX */
2038 u64 preempt_err_cnt; /* CNF10K-B */
2043 /* Only for CN10K-B */
2052 /* TX */
2066 u64 pkt_delay_cnt; /* CNF10K-B */
2067 u64 pkt_ok_cnt; /* CNF10K-B */
2068 u64 octet_decrypt_cnt; /* CN10K-B */
2069 u64 octet_validate_cnt; /* CN10K-B */
2070 /* TX */
2073 u64 octet_encrypt_cnt; /* CN10K-B */
2074 u64 octet_protected_cnt; /* CN10K-B */