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;
25 uint64_t mark_flag : 8;
26 uint64_t mark_fmt : 48;
27 } __plt_cache_aligned;
29 struct cn10k_eth_rxq {
30 uint64_t mbuf_initializer;
44 struct cnxk_timesync_info *tstamp;
45 } __plt_cache_aligned;
47 /* Private data in sw rsvd area of struct roc_ot_ipsec_inb_sa */
48 struct cn10k_inb_priv_data {
50 int reass_dynfield_off;
51 int reass_dynflag_bit;
52 struct cnxk_eth_sec_sess *eth_sec;
55 /* Private data in sw rsvd area of struct roc_ot_ipsec_outb_sa */
56 struct cn10k_outb_priv_data {
58 /* Rlen computation data */
59 struct cnxk_ipsec_outb_rlens rlens;
60 /* Back pointer to eth sec session */
61 struct cnxk_eth_sec_sess *eth_sec;
66 struct cn10k_sec_sess_priv {
71 uint8_t outer_ip_ver : 1;
73 uint8_t roundup_byte : 5;
75 uint16_t partial_len : 10;
85 /* Rx and Tx routines */
86 void cn10k_eth_set_rx_function(struct rte_eth_dev *eth_dev);
87 void cn10k_eth_set_tx_function(struct rte_eth_dev *eth_dev);
89 /* Security context setup */
90 void cn10k_eth_sec_ops_override(void);
92 /* SSO Work callback */
93 void cn10k_eth_sec_sso_work_cb(uint64_t *gw, void *args,
94 uint32_t soft_exp_event);
96 #define LMT_OFF(lmt_addr, lmt_num, offset) \
97 (void *)((uintptr_t)(lmt_addr) + \
98 ((uint64_t)(lmt_num) << ROC_LMT_LINE_SIZE_LOG2) + (offset))
100 #endif /* __CN10K_ETHDEV_H__ */