1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2021 Marvell.
4 #ifndef __CN10K_ETHDEV_H__
5 #define __CN10K_ETHDEV_H__
7 #include <cnxk_ethdev.h>
8 #include <cnxk_security.h>
10 struct cn10k_eth_txq {
12 int64_t fc_cache_pkts;
16 uint16_t sqes_per_sqb_log2;
17 int16_t nb_sqb_bufs_adj;
18 rte_iova_t cpt_io_addr;
24 uint64_t mark_flag : 8;
25 uint64_t mark_fmt : 48;
26 } __plt_cache_aligned;
28 struct cn10k_eth_rxq {
29 uint64_t mbuf_initializer;
43 struct cnxk_timesync_info *tstamp;
44 } __plt_cache_aligned;
46 /* Private data in sw rsvd area of struct roc_ot_ipsec_inb_sa */
47 struct cn10k_inb_priv_data {
49 int reass_dynfield_off;
50 int reass_dynflag_bit;
51 struct cnxk_eth_sec_sess *eth_sec;
54 /* Private data in sw rsvd area of struct roc_ot_ipsec_outb_sa */
55 struct cn10k_outb_priv_data {
57 /* Rlen computation data */
58 struct cnxk_ipsec_outb_rlens rlens;
59 /* Back pointer to eth sec session */
60 struct cnxk_eth_sec_sess *eth_sec;
65 struct cn10k_sec_sess_priv {
70 uint8_t outer_ip_ver : 1;
72 uint8_t roundup_byte : 5;
74 uint16_t partial_len : 10;
83 /* Rx and Tx routines */
84 void cn10k_eth_set_rx_function(struct rte_eth_dev *eth_dev);
85 void cn10k_eth_set_tx_function(struct rte_eth_dev *eth_dev);
87 /* Security context setup */
88 void cn10k_eth_sec_ops_override(void);
90 /* SSO Work callback */
91 void cn10k_eth_sec_sso_work_cb(uint64_t *gw, void *args,
92 uint32_t soft_exp_event);
94 #define LMT_OFF(lmt_addr, lmt_num, offset) \
95 (void *)((uintptr_t)(lmt_addr) + \
96 ((uint64_t)(lmt_num) << ROC_LMT_LINE_SIZE_LOG2) + (offset))
98 #endif /* __CN10K_ETHDEV_H__ */