@@ -7,7 +7,8 @@
#include <rte_crypto.h>
#include <rte_security.h>
-#include "roc_api.h"
+#include "roc_ie_on.h"
+#include "roc_ie_ot.h"
/* Response length calculation data */
struct cnxk_ipsec_outb_rlens {
@@ -5,6 +5,8 @@
#ifndef __CPT_HW_H__
#define __CPT_HW_H__
+#include "roc_platform.h"
+
/* Register offsets */
#define CPT_COMP_NOT_DONE (0x0ull)
@@ -47,8 +49,36 @@
#define CPT_AF_LFX_CTL(a) (0x27000ull | (uint64_t)(a) << 3)
#define CPT_AF_LFX_CTL2(a) (0x29000ull | (uint64_t)(a) << 3)
+enum cpt_eng_type {
+ CPT_ENG_TYPE_AE = 1,
+ CPT_ENG_TYPE_SE = 2,
+ CPT_ENG_TYPE_IE = 3,
+ CPT_MAX_ENG_TYPES,
+};
+
/* Structures definitions */
+/* CPT HW capabilities */
+union cpt_eng_caps {
+ uint64_t __io u;
+ struct {
+ uint64_t __io reserved_0_4 : 5;
+ uint64_t __io mul : 1;
+ uint64_t __io sha1_sha2 : 1;
+ uint64_t __io chacha20 : 1;
+ uint64_t __io zuc_snow3g : 1;
+ uint64_t __io sha3 : 1;
+ uint64_t __io aes : 1;
+ uint64_t __io kasumi : 1;
+ uint64_t __io des : 1;
+ uint64_t __io crc : 1;
+ uint64_t __io mmul : 1;
+ uint64_t __io reserved_15_33 : 19;
+ uint64_t __io pdcp_chain : 1;
+ uint64_t __io reserved_35_63 : 29;
+ };
+};
+
union cpt_lf_ctl {
uint64_t u;
struct cpt_lf_ctl_s {
@@ -5,7 +5,7 @@
#ifndef _ROC_AE_FPM_TABLES_H_
#define _ROC_AE_FPM_TABLES_H_
-#include "roc_api.h"
+#include "roc_platform.h"
int __roc_api roc_ae_fpm_get(uint64_t *tbl);
void __roc_api roc_ae_fpm_put(void);
@@ -5,7 +5,11 @@
#ifndef _ROC_CPT_H_
#define _ROC_CPT_H_
-#include "roc_api.h"
+#include "hw/cpt.h"
+
+#include "roc_platform.h"
+
+struct nix_inline_ipsec_cfg;
#define ROC_AE_CPT_BLOCK_TYPE1 0
#define ROC_AE_CPT_BLOCK_TYPE2 1
@@ -5,6 +5,8 @@
#ifndef __ROC_IE_OT_H__
#define __ROC_IE_OT_H__
+#include "roc_platform.h"
+
/* CN10K IPSEC opcodes */
#define ROC_IE_OT_MAJOR_OP_PROCESS_OUTBOUND_IPSEC 0x28UL
#define ROC_IE_OT_MAJOR_OP_PROCESS_INBOUND_IPSEC 0x29UL
@@ -5,6 +5,8 @@
#ifndef _ROC_IO_GENERIC_H_
#define _ROC_IO_GENERIC_H_
+#include "roc_platform.h"
+
#define ROC_LMT_BASE_ID_GET(lmt_addr, lmt_id) (lmt_id = 0)
#define ROC_LMT_CPT_BASE_ID_GET(lmt_addr, lmt_id) (lmt_id = 0)
@@ -9,10 +9,9 @@
#include <stdbool.h>
#include <stdint.h>
-/* Device memory does not support unaligned access, instruct compiler to
- * not optimize the memory access when working with mailbox memory.
- */
-#define __io volatile
+#include "hw/cpt.h"
+
+#include "roc_platform.h"
/* Header which precedes all mbox messages */
struct mbox_hdr {
@@ -1510,34 +1509,6 @@ struct cpt_rx_inline_lf_cfg_msg {
uint32_t __io reserved;
};
-enum cpt_eng_type {
- CPT_ENG_TYPE_AE = 1,
- CPT_ENG_TYPE_SE = 2,
- CPT_ENG_TYPE_IE = 3,
- CPT_MAX_ENG_TYPES,
-};
-
-/* CPT HW capabilities */
-union cpt_eng_caps {
- uint64_t __io u;
- struct {
- uint64_t __io reserved_0_4 : 5;
- uint64_t __io mul : 1;
- uint64_t __io sha1_sha2 : 1;
- uint64_t __io chacha20 : 1;
- uint64_t __io zuc_snow3g : 1;
- uint64_t __io sha3 : 1;
- uint64_t __io aes : 1;
- uint64_t __io kasumi : 1;
- uint64_t __io des : 1;
- uint64_t __io crc : 1;
- uint64_t __io mmul : 1;
- uint64_t __io reserved_15_33 : 19;
- uint64_t __io pdcp_chain : 1;
- uint64_t __io reserved_35_63 : 29;
- };
-};
-
struct cpt_caps_rsp_msg {
struct mbox_msghdr hdr;
uint16_t __io cpt_pf_drv_version;
@@ -7,6 +7,8 @@
#include <stdbool.h>
+#include "roc_bits.h"
+
extern struct roc_model *roc_model;
struct roc_model {
@@ -875,8 +875,8 @@ npa_dev_fini(struct npa_lf *lf)
int
npa_lf_init(struct dev *dev, struct plt_pci_device *pci_dev)
{
+ uint16_t npa_msixoff = 0;
struct idev_cfg *idev;
- uint16_t npa_msixoff;
struct npa_lf *lf;
int rc;
@@ -5,6 +5,19 @@
#ifndef _ROC_NPA_H_
#define _ROC_NPA_H_
+#include <stdint.h>
+
+#include "hw/npa.h"
+
+#include "roc_bits.h"
+#include "roc_constants.h"
+#if defined(__aarch64__)
+#include "roc_io.h"
+#else
+#include "roc_io_generic.h"
+#endif
+#include "roc_npa_dp.h"
+
#define ROC_AURA_OP_LIMIT_MASK (BIT_ULL(36) - 1)
#define ROC_NPA_MAX_BLOCK_SZ (128 * 1024)
@@ -293,6 +293,13 @@ extern int cnxk_logtype_ree;
}
#endif
+/* Device memory does not support unaligned access, instruct compiler to
+ * not optimize the memory access when working with mailbox memory.
+ */
+#ifndef __io
+#define __io volatile
+#endif
+
__rte_internal
int roc_plt_init(void);
@@ -5,6 +5,8 @@
#ifndef _ROC_SSO_H_
#define _ROC_SSO_H_
+#include "hw/ssow.h"
+
struct roc_sso_hwgrp_qos {
uint16_t hwgrp;
uint8_t xaq_prcnt;
@@ -5,6 +5,8 @@
#ifndef _ROC_TIM_H_
#define _ROC_TIM_H_
+#include "roc_platform.h"
+
enum roc_tim_clk_src {
ROC_TIM_CLK_SRC_10NS = 0,
ROC_TIM_CLK_SRC_GPIO,
@@ -7,6 +7,15 @@
#include <rte_event_crypto_adapter.h>
#include <rte_ip.h>
+#include "roc_cpt.h"
+#if defined(__aarch64__)
+#include "roc_io.h"
+#else
+#include "roc_io_generic.h"
+#endif
+#include "roc_sso.h"
+#include "roc_sso_dp.h"
+
#include "cn10k_cryptodev.h"
#include "cn10k_cryptodev_ops.h"
#include "cn10k_ipsec.h"
@@ -17,8 +26,6 @@
#include "cnxk_eventdev.h"
#include "cnxk_se.h"
-#include "roc_api.h"
-
#define PKTS_PER_LOOP 32
#define PKTS_PER_STEORL 16
@@ -8,7 +8,8 @@
#include <rte_security.h>
#include <rte_security_driver.h>
-#include "roc_api.h"
+#include "roc_constants.h"
+#include "roc_ie_ot.h"
#include "cnxk_ipsec.h"
@@ -8,6 +8,15 @@
#include <rte_ip.h>
#include <rte_vect.h>
+#include "roc_cpt.h"
+#if defined(__aarch64__)
+#include "roc_io.h"
+#else
+#include "roc_io_generic.h"
+#endif
+#include "roc_sso.h"
+#include "roc_sso_dp.h"
+
#include "cn9k_cryptodev.h"
#include "cn9k_cryptodev_ops.h"
#include "cn9k_ipsec.h"
@@ -9,6 +9,8 @@
#include <rte_esp.h>
#include <rte_security.h>
+#include "roc_ie.h"
+
#include "cn9k_ipsec.h"
#include "cnxk_cryptodev_ops.h"
#include "cnxk_security_ar.h"
@@ -9,7 +9,8 @@
#include <rte_crypto_asym.h>
#include <rte_malloc.h>
-#include "roc_api.h"
+#include "roc_ae.h"
+
#include "cnxk_cryptodev_ops.h"
struct cnxk_ae_sess {
@@ -5,6 +5,7 @@
#include <rte_cryptodev.h>
#include "roc_cpt.h"
+#include "roc_model.h"
#include "cnxk_cryptodev.h"
@@ -6,7 +6,9 @@
#include <cryptodev_pmd.h>
#include <rte_errno.h>
+#include "roc_ae_fpm_tables.h"
#include "roc_cpt.h"
+#include "roc_ie_on.h"
#include "cnxk_ae.h"
#include "cnxk_cryptodev.h"
@@ -8,7 +8,12 @@
#include <cryptodev_pmd.h>
#include <rte_event_crypto_adapter.h>
-#include "roc_api.h"
+#include "hw/cpt.h"
+
+#include "roc_constants.h"
+#include "roc_cpt.h"
+#include "roc_cpt_sg.h"
+#include "roc_se.h"
#define CNXK_CPT_MIN_HEADROOM_REQ 32
#define CNXK_CPT_MIN_TAILROOM_REQ 102
@@ -7,7 +7,9 @@
#include <rte_security.h>
#include <rte_security_driver.h>
-#include "roc_api.h"
+#include "roc_cpt.h"
+#include "roc_ie_on.h"
+#include "roc_ie_ot.h"
extern struct rte_security_ops cnxk_sec_ops;
@@ -5,6 +5,8 @@
#ifndef _CNXK_SG_H_
#define _CNXK_SG_H_
+#include "roc_cpt_sg.h"
+
static __rte_always_inline uint32_t
fill_sg_comp(struct roc_sglist_comp *list, uint32_t i, phys_addr_t dma_addr, uint32_t size)
{
@@ -2,6 +2,8 @@
* Copyright(C) 2021 Marvell.
*/
+#include "roc_npa.h"
+
#include "cnxk_eventdev.h"
void
@@ -19,7 +19,10 @@
#include <eventdev_pmd_pci.h>
-#include "roc_api.h"
+#include "hw/sso.h"
+
+#include "roc_platform.h"
+#include "roc_sso.h"
#include "cnxk_tim_evdev.h"
@@ -4,6 +4,8 @@
#include <math.h>
+#include "roc_npa.h"
+
#include "cnxk_eventdev.h"
#include "cnxk_tim_evdev.h"
@@ -16,7 +16,10 @@
#include <rte_memzone.h>
#include <rte_reciprocal.h>
-#include "roc_api.h"
+#include "hw/tim.h"
+
+#include "roc_model.h"
+#include "roc_tim.h"
#define NSECPERSEC 1E9
#define USECPERSEC 1E6
@@ -5,6 +5,12 @@
#ifndef __CNXK_WORKER_H__
#define __CNXK_WORKER_H__
+#if defined(__aarch64__)
+#include "roc_io.h"
+#else
+#include "roc_io_generic.h"
+#endif
+
#include "cnxk_eventdev.h"
/* SSO Operations */
@@ -2,6 +2,8 @@
# Copyright(C) 2021 Marvell.
#
+deps += ['common_cnxk']
+
sources = files(
'otx_ep_ethdev.c',
'otx_ep_rxtx.c',