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 } __plt_cache_aligned;
26 struct cn10k_eth_rxq {
27 uint64_t mbuf_initializer;
41 struct cnxk_timesync_info *tstamp;
42 } __plt_cache_aligned;
44 /* Private data in sw rsvd area of struct roc_ot_ipsec_inb_sa */
45 struct cn10k_inb_priv_data {
47 struct cnxk_eth_sec_sess *eth_sec;
50 /* Private data in sw rsvd area of struct roc_ot_ipsec_outb_sa */
51 struct cn10k_outb_priv_data {
53 /* Rlen computation data */
54 struct cnxk_ipsec_outb_rlens rlens;
55 /* Back pointer to eth sec session */
56 struct cnxk_eth_sec_sess *eth_sec;
61 struct cn10k_sec_sess_priv {
66 uint8_t outer_ip_ver : 1;
68 uint8_t roundup_byte : 5;
77 /* Rx and Tx routines */
78 void cn10k_eth_set_rx_function(struct rte_eth_dev *eth_dev);
79 void cn10k_eth_set_tx_function(struct rte_eth_dev *eth_dev);
81 /* Security context setup */
82 void cn10k_eth_sec_ops_override(void);
84 #define LMT_OFF(lmt_addr, lmt_num, offset) \
85 (void *)((uintptr_t)(lmt_addr) + \
86 ((uint64_t)(lmt_num) << ROC_LMT_LINE_SIZE_LOG2) + (offset))
88 #endif /* __CN10K_ETHDEV_H__ */