1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(C) 2019 Marvell International Ltd.
5 #ifndef __OTX2_ETHDEV_H__
6 #define __OTX2_ETHDEV_H__
11 #include <rte_common.h>
12 #include <rte_ethdev.h>
13 #include <rte_kvargs.h>
15 #include <rte_mempool.h>
16 #include <rte_string_fns.h>
19 #include "otx2_common.h"
21 #include "otx2_flow.h"
23 #include "otx2_mempool.h"
28 #define OTX2_ETH_DEV_PMD_VERSION "1.0"
30 /* Ethdev HWCAP and Fixup flags. Use from MSB bits to avoid conflict with dev */
32 /* Minimum CQ size should be 4K */
33 #define OTX2_FIXUP_F_MIN_4K_Q BIT_ULL(63)
34 #define otx2_ethdev_fixup_is_min_4k_q(dev) \
35 ((dev)->hwcap & OTX2_FIXUP_F_MIN_4K_Q)
36 /* Limit CQ being full */
37 #define OTX2_FIXUP_F_LIMIT_CQ_FULL BIT_ULL(62)
38 #define otx2_ethdev_fixup_is_limit_cq_full(dev) \
39 ((dev)->hwcap & OTX2_FIXUP_F_LIMIT_CQ_FULL)
41 /* Used for struct otx2_eth_dev::flags */
42 #define OTX2_LINK_CFG_IN_PROGRESS_F BIT_ULL(0)
44 /* VLAN tag inserted by NIX_TX_VTAG_ACTION.
45 * In Tx space is always reserved for this in FRS.
47 #define NIX_MAX_VTAG_INS 2
48 #define NIX_MAX_VTAG_ACT_SIZE (4 * NIX_MAX_VTAG_INS)
50 /* ETH_HLEN+ETH_FCS+2*VLAN_HLEN */
51 #define NIX_L2_OVERHEAD \
52 (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + 8)
54 /* HW config of frame size doesn't include FCS */
55 #define NIX_MAX_HW_FRS 9212
56 #define NIX_MIN_HW_FRS 60
58 /* Since HW FRS includes NPC VTAG insertion space, user has reduced FRS */
60 (NIX_MAX_HW_FRS + RTE_ETHER_CRC_LEN - NIX_MAX_VTAG_ACT_SIZE)
63 (NIX_MIN_HW_FRS + RTE_ETHER_CRC_LEN)
66 (NIX_MAX_FRS - NIX_L2_OVERHEAD)
68 #define NIX_MAX_SQB 512
69 #define NIX_DEF_SQB 16
71 #define NIX_SQB_LIST_SPACE 2
72 #define NIX_RSS_RETA_SIZE_MAX 256
73 /* Group 0 will be used for RSS, 1 -7 will be used for rte_flow RSS action*/
74 #define NIX_RSS_GRPS 8
75 #define NIX_HASH_KEY_SIZE 48 /* 352 Bits */
76 #define NIX_RSS_RETA_SIZE 64
77 #define NIX_RX_MIN_DESC 16
78 #define NIX_RX_MIN_DESC_ALIGN 16
79 #define NIX_RX_NB_SEG_MAX 6
80 #define NIX_CQ_ENTRY_SZ 128
81 #define NIX_CQ_ALIGN 512
82 #define NIX_SQB_LOWER_THRESH 90
83 #define LMT_SLOT_MASK 0x7f
84 #define NIX_RX_DEFAULT_RING_SZ 4096
86 /* If PTP is enabled additional SEND MEM DESC is required which
87 * takes 2 words, hence max 7 iova address are possible
89 #if defined(RTE_LIBRTE_IEEE1588)
90 #define NIX_TX_NB_SEG_MAX 7
92 #define NIX_TX_NB_SEG_MAX 9
95 #define NIX_TX_MSEG_SG_DWORDS \
96 ((RTE_ALIGN_MUL_CEIL(NIX_TX_NB_SEG_MAX, 3) / 3) \
99 /* Apply BP/DROP when CQ is 95% full */
100 #define NIX_CQ_THRESH_LEVEL (5 * 256 / 100)
101 #define NIX_CQ_FULL_ERRATA_SKID (1024ull * 256)
103 #define CQ_OP_STAT_OP_ERR 63
104 #define CQ_OP_STAT_CQ_ERR 46
106 #define OP_ERR BIT_ULL(CQ_OP_STAT_OP_ERR)
107 #define CQ_ERR BIT_ULL(CQ_OP_STAT_CQ_ERR)
109 #define CQ_CQE_THRESH_DEFAULT 0x1ULL /* IRQ triggered when
110 * NIX_LF_CINTX_CNT[QCOUNT]
113 #define CQ_TIMER_THRESH_DEFAULT 0xAULL /* ~1usec i.e (0xA * 100nsec) */
114 #define CQ_TIMER_THRESH_MAX 255
116 #define NIX_RSS_OFFLOAD (ETH_RSS_PORT | ETH_RSS_IP | ETH_RSS_UDP |\
117 ETH_RSS_TCP | ETH_RSS_SCTP | \
118 ETH_RSS_TUNNEL | ETH_RSS_L2_PAYLOAD)
120 #define NIX_TX_OFFLOAD_CAPA ( \
121 DEV_TX_OFFLOAD_MBUF_FAST_FREE | \
122 DEV_TX_OFFLOAD_MT_LOCKFREE | \
123 DEV_TX_OFFLOAD_VLAN_INSERT | \
124 DEV_TX_OFFLOAD_QINQ_INSERT | \
125 DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | \
126 DEV_TX_OFFLOAD_OUTER_UDP_CKSUM | \
127 DEV_TX_OFFLOAD_TCP_CKSUM | \
128 DEV_TX_OFFLOAD_UDP_CKSUM | \
129 DEV_TX_OFFLOAD_SCTP_CKSUM | \
130 DEV_TX_OFFLOAD_TCP_TSO | \
131 DEV_TX_OFFLOAD_VXLAN_TNL_TSO | \
132 DEV_TX_OFFLOAD_GENEVE_TNL_TSO | \
133 DEV_TX_OFFLOAD_GRE_TNL_TSO | \
134 DEV_TX_OFFLOAD_MULTI_SEGS | \
135 DEV_TX_OFFLOAD_IPV4_CKSUM)
137 #define NIX_RX_OFFLOAD_CAPA ( \
138 DEV_RX_OFFLOAD_CHECKSUM | \
139 DEV_RX_OFFLOAD_SCTP_CKSUM | \
140 DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | \
141 DEV_RX_OFFLOAD_SCATTER | \
142 DEV_RX_OFFLOAD_JUMBO_FRAME | \
143 DEV_RX_OFFLOAD_OUTER_UDP_CKSUM | \
144 DEV_RX_OFFLOAD_VLAN_STRIP | \
145 DEV_RX_OFFLOAD_VLAN_FILTER | \
146 DEV_RX_OFFLOAD_QINQ_STRIP | \
147 DEV_RX_OFFLOAD_TIMESTAMP)
149 #define NIX_DEFAULT_RSS_CTX_GROUP 0
150 #define NIX_DEFAULT_RSS_MCAM_IDX -1
152 #define otx2_ethdev_is_ptp_en(dev) ((dev)->ptp_en)
154 #define NIX_TIMESYNC_TX_CMD_LEN 8
155 /* Additional timesync values. */
156 #define OTX2_CYCLECOUNTER_MASK 0xffffffffffffffffULL
159 nix_q_size_16, /* 16 entries */
160 nix_q_size_64, /* 64 entries */
167 nix_q_size_1M, /* Million entries */
172 struct rte_eth_dev *eth_dev;
176 struct otx2_rss_info {
178 uint32_t flowkey_cfg;
181 uint8_t alg_idx; /* Selected algo index */
182 uint16_t ind_tbl[NIX_RSS_RETA_SIZE_MAX];
183 uint8_t key[NIX_HASH_KEY_SIZE];
186 struct otx2_eth_qconf {
188 struct rte_eth_txconf tx;
189 struct rte_eth_rxconf rx;
196 struct otx2_fc_info {
197 enum rte_eth_fc_mode mode; /**< Link flow control mode */
201 uint16_t bpid[NIX_MAX_CHAN];
204 struct vlan_mkex_info {
205 struct npc_xtract_info la_xtract;
206 struct npc_xtract_info lb_xtract;
207 uint64_t lb_lt_offset;
211 struct rte_ether_addr mcast_mac;
213 TAILQ_ENTRY(mcast_entry) next;
216 TAILQ_HEAD(otx2_nix_mc_filter_tbl, mcast_entry);
221 TAILQ_ENTRY(vlan_entry) next;
224 TAILQ_HEAD(otx2_vlan_filter_tbl, vlan_entry);
226 struct otx2_vlan_info {
227 struct otx2_vlan_filter_tbl fltr_tbl;
228 /* MKEX layer info */
229 struct mcam_entry def_tx_mcam_ent;
230 struct mcam_entry def_rx_mcam_ent;
231 struct vlan_mkex_info mkex;
232 /* Default mcam entry that matches vlan packets */
233 uint32_t def_rx_mcam_idx;
234 uint32_t def_tx_mcam_idx;
235 /* MCAM entry that matches double vlan packets */
236 uint32_t qinq_mcam_idx;
237 /* Indices of tx_vtag def registers */
238 uint32_t outer_vlan_idx;
239 uint32_t inner_vlan_idx;
240 uint16_t outer_vlan_tpid;
241 uint16_t inner_vlan_tpid;
243 /* QinQ entry allocated before default one */
244 uint8_t qinq_before_def;
245 uint8_t pvid_insert_on;
246 /* Rx vtag action type */
247 uint8_t vtag_type_idx;
254 struct otx2_eth_dev {
255 OTX2_DEV; /* Base class */
256 MARKER otx2_eth_dev_data_start;
258 uint16_t rx_chan_base;
259 uint16_t tx_chan_base;
262 uint8_t lso_tsov4_idx;
263 uint8_t lso_tsov6_idx;
264 uint8_t lso_base_idx;
265 uint8_t mac_addr[RTE_ETHER_ADDR_LEN];
266 uint8_t mkex_pfl_name[MKEX_NAME_LEN];
267 uint8_t max_mac_entries;
274 uint8_t configured_qints;
275 uint8_t configured_cints;
276 uint8_t configured_nb_rx_qs;
277 uint8_t configured_nb_tx_qs;
278 uint16_t nix_msixoff;
282 uint16_t max_sqb_count;
283 uint16_t rx_offload_flags; /* Selected Rx offload flags(NIX_RX_*_F) */
284 uint64_t rx_offloads;
285 uint16_t tx_offload_flags; /* Selected Tx offload flags(NIX_TX_*_F) */
286 uint64_t tx_offloads;
287 uint64_t rx_offload_capa;
288 uint64_t tx_offload_capa;
289 struct otx2_qint qints_mem[RTE_MAX_QUEUES_PER_PORT];
290 struct otx2_qint cints_mem[RTE_MAX_QUEUES_PER_PORT];
291 uint16_t txschq[NIX_TXSCH_LVL_CNT];
292 uint16_t txschq_contig[NIX_TXSCH_LVL_CNT];
293 uint16_t txschq_index[NIX_TXSCH_LVL_CNT];
294 uint16_t txschq_contig_index[NIX_TXSCH_LVL_CNT];
295 /* Dis-contiguous queues */
296 uint16_t txschq_list[NIX_TXSCH_LVL_CNT][MAX_TXSCHQ_PER_FUNC];
297 /* Contiguous queues */
298 uint16_t txschq_contig_list[NIX_TXSCH_LVL_CNT][MAX_TXSCHQ_PER_FUNC];
299 uint16_t otx2_tm_root_lvl;
301 uint16_t tm_leaf_cnt;
302 struct otx2_nix_tm_node_list node_list;
303 struct otx2_nix_tm_shaper_profile_list shaper_profile_list;
304 struct otx2_rss_info rss_info;
305 struct otx2_fc_info fc_info;
306 uint32_t txmap[RTE_ETHDEV_QUEUE_STAT_CNTRS];
307 uint32_t rxmap[RTE_ETHDEV_QUEUE_STAT_CNTRS];
308 struct otx2_npc_flow_info npc_flow;
309 struct otx2_vlan_info vlan_info;
310 struct otx2_eth_qconf *tx_qconf;
311 struct otx2_eth_qconf *rx_qconf;
312 struct rte_eth_dev *eth_dev;
313 eth_rx_burst_t rx_pkt_burst_no_offload;
316 struct otx2_timesync_info tstamp;
317 struct rte_timecounter systime_tc;
318 struct rte_timecounter rx_tstamp_tc;
319 struct rte_timecounter tx_tstamp_tc;
320 double clk_freq_mult;
323 struct otx2_nix_mc_filter_tbl mc_fltr_tbl;
324 } __rte_cache_aligned;
326 struct otx2_eth_txq {
328 int64_t fc_cache_pkts;
333 uint16_t sqes_per_sqb_log2;
334 int16_t nb_sqb_bufs_adj;
335 MARKER slow_path_start;
336 uint16_t nb_sqb_bufs;
339 struct otx2_eth_dev *dev;
340 struct rte_mempool *sqb_pool;
341 struct otx2_eth_qconf qconf;
342 } __rte_cache_aligned;
344 struct otx2_eth_rxq {
345 uint64_t mbuf_initializer;
356 struct otx2_timesync_info *tstamp;
357 MARKER slow_path_start;
361 struct rte_mempool *pool;
362 enum nix_q_size_e qsize;
363 struct rte_eth_dev *eth_dev;
364 struct otx2_eth_qconf qconf;
366 } __rte_cache_aligned;
368 static inline struct otx2_eth_dev *
369 otx2_eth_pmd_priv(struct rte_eth_dev *eth_dev)
371 return eth_dev->data->dev_private;
375 int otx2_nix_info_get(struct rte_eth_dev *eth_dev,
376 struct rte_eth_dev_info *dev_info);
377 int otx2_nix_dev_filter_ctrl(struct rte_eth_dev *eth_dev,
378 enum rte_filter_type filter_type,
379 enum rte_filter_op filter_op, void *arg);
380 int otx2_nix_fw_version_get(struct rte_eth_dev *eth_dev, char *fw_version,
382 int otx2_nix_get_module_info(struct rte_eth_dev *eth_dev,
383 struct rte_eth_dev_module_info *modinfo);
384 int otx2_nix_get_module_eeprom(struct rte_eth_dev *eth_dev,
385 struct rte_dev_eeprom_info *info);
386 int otx2_nix_pool_ops_supported(struct rte_eth_dev *eth_dev, const char *pool);
387 void otx2_nix_rxq_info_get(struct rte_eth_dev *eth_dev, uint16_t queue_id,
388 struct rte_eth_rxq_info *qinfo);
389 void otx2_nix_txq_info_get(struct rte_eth_dev *eth_dev, uint16_t queue_id,
390 struct rte_eth_txq_info *qinfo);
391 uint32_t otx2_nix_rx_queue_count(struct rte_eth_dev *eth_dev, uint16_t qidx);
392 int otx2_nix_tx_done_cleanup(void *txq, uint32_t free_cnt);
393 int otx2_nix_rx_descriptor_done(void *rxq, uint16_t offset);
394 int otx2_nix_rx_descriptor_status(void *rx_queue, uint16_t offset);
395 int otx2_nix_tx_descriptor_status(void *tx_queue, uint16_t offset);
397 void otx2_nix_promisc_config(struct rte_eth_dev *eth_dev, int en);
398 int otx2_nix_promisc_enable(struct rte_eth_dev *eth_dev);
399 int otx2_nix_promisc_disable(struct rte_eth_dev *eth_dev);
400 int otx2_nix_allmulticast_enable(struct rte_eth_dev *eth_dev);
401 int otx2_nix_allmulticast_disable(struct rte_eth_dev *eth_dev);
402 int otx2_nix_tx_queue_start(struct rte_eth_dev *eth_dev, uint16_t qidx);
403 int otx2_nix_tx_queue_stop(struct rte_eth_dev *eth_dev, uint16_t qidx);
404 uint64_t otx2_nix_rxq_mbuf_setup(struct otx2_eth_dev *dev, uint16_t port_id);
406 /* Multicast filter APIs */
407 void otx2_nix_mc_filter_init(struct otx2_eth_dev *dev);
408 void otx2_nix_mc_filter_fini(struct otx2_eth_dev *dev);
409 int otx2_nix_mc_addr_list_install(struct rte_eth_dev *eth_dev);
410 int otx2_nix_mc_addr_list_uninstall(struct rte_eth_dev *eth_dev);
411 int otx2_nix_set_mc_addr_list(struct rte_eth_dev *eth_dev,
412 struct rte_ether_addr *mc_addr_set,
413 uint32_t nb_mc_addr);
416 int otx2_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu);
417 int otx2_nix_recalc_mtu(struct rte_eth_dev *eth_dev);
420 void otx2_nix_toggle_flag_link_cfg(struct otx2_eth_dev *dev, bool set);
421 int otx2_nix_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete);
422 void otx2_eth_dev_link_status_update(struct otx2_dev *dev,
423 struct cgx_link_user_info *link);
424 int otx2_nix_dev_set_link_up(struct rte_eth_dev *eth_dev);
425 int otx2_nix_dev_set_link_down(struct rte_eth_dev *eth_dev);
428 int otx2_nix_register_irqs(struct rte_eth_dev *eth_dev);
429 int oxt2_nix_register_queue_irqs(struct rte_eth_dev *eth_dev);
430 int oxt2_nix_register_cq_irqs(struct rte_eth_dev *eth_dev);
431 void otx2_nix_unregister_irqs(struct rte_eth_dev *eth_dev);
432 void oxt2_nix_unregister_queue_irqs(struct rte_eth_dev *eth_dev);
433 void oxt2_nix_unregister_cq_irqs(struct rte_eth_dev *eth_dev);
435 int otx2_nix_rx_queue_intr_enable(struct rte_eth_dev *eth_dev,
436 uint16_t rx_queue_id);
437 int otx2_nix_rx_queue_intr_disable(struct rte_eth_dev *eth_dev,
438 uint16_t rx_queue_id);
441 int otx2_nix_reg_dump(struct otx2_eth_dev *dev, uint64_t *data);
442 int otx2_nix_dev_get_reg(struct rte_eth_dev *eth_dev,
443 struct rte_dev_reg_info *regs);
444 int otx2_nix_queues_ctx_dump(struct rte_eth_dev *eth_dev);
445 void otx2_nix_cqe_dump(const struct nix_cqe_hdr_s *cq);
448 int otx2_nix_dev_stats_get(struct rte_eth_dev *eth_dev,
449 struct rte_eth_stats *stats);
450 int otx2_nix_dev_stats_reset(struct rte_eth_dev *eth_dev);
452 int otx2_nix_queue_stats_mapping(struct rte_eth_dev *dev,
453 uint16_t queue_id, uint8_t stat_idx,
455 int otx2_nix_xstats_get(struct rte_eth_dev *eth_dev,
456 struct rte_eth_xstat *xstats, unsigned int n);
457 int otx2_nix_xstats_get_names(struct rte_eth_dev *eth_dev,
458 struct rte_eth_xstat_name *xstats_names,
460 int otx2_nix_xstats_reset(struct rte_eth_dev *eth_dev);
462 int otx2_nix_xstats_get_by_id(struct rte_eth_dev *eth_dev,
464 uint64_t *values, unsigned int n);
465 int otx2_nix_xstats_get_names_by_id(struct rte_eth_dev *eth_dev,
466 struct rte_eth_xstat_name *xstats_names,
467 const uint64_t *ids, unsigned int limit);
470 void otx2_nix_rss_set_key(struct otx2_eth_dev *dev,
471 uint8_t *key, uint32_t key_len);
472 uint32_t otx2_rss_ethdev_to_nix(struct otx2_eth_dev *dev,
473 uint64_t ethdev_rss, uint8_t rss_level);
474 int otx2_rss_set_hf(struct otx2_eth_dev *dev,
475 uint32_t flowkey_cfg, uint8_t *alg_idx,
476 uint8_t group, int mcam_index);
477 int otx2_nix_rss_tbl_init(struct otx2_eth_dev *dev, uint8_t group,
479 int otx2_nix_rss_config(struct rte_eth_dev *eth_dev);
481 int otx2_nix_dev_reta_update(struct rte_eth_dev *eth_dev,
482 struct rte_eth_rss_reta_entry64 *reta_conf,
484 int otx2_nix_dev_reta_query(struct rte_eth_dev *eth_dev,
485 struct rte_eth_rss_reta_entry64 *reta_conf,
487 int otx2_nix_rss_hash_update(struct rte_eth_dev *eth_dev,
488 struct rte_eth_rss_conf *rss_conf);
490 int otx2_nix_rss_hash_conf_get(struct rte_eth_dev *eth_dev,
491 struct rte_eth_rss_conf *rss_conf);
494 int otx2_cgx_rxtx_start(struct otx2_eth_dev *dev);
495 int otx2_cgx_rxtx_stop(struct otx2_eth_dev *dev);
496 int otx2_cgx_mac_addr_set(struct rte_eth_dev *eth_dev,
497 struct rte_ether_addr *addr);
500 int otx2_nix_flow_ctrl_get(struct rte_eth_dev *eth_dev,
501 struct rte_eth_fc_conf *fc_conf);
503 int otx2_nix_flow_ctrl_set(struct rte_eth_dev *eth_dev,
504 struct rte_eth_fc_conf *fc_conf);
506 int otx2_nix_rxchan_bpid_cfg(struct rte_eth_dev *eth_dev, bool enb);
508 int otx2_nix_update_flow_ctrl_mode(struct rte_eth_dev *eth_dev);
511 int otx2_nix_vlan_offload_init(struct rte_eth_dev *eth_dev);
512 int otx2_nix_vlan_fini(struct rte_eth_dev *eth_dev);
513 int otx2_nix_vlan_offload_set(struct rte_eth_dev *eth_dev, int mask);
514 void otx2_nix_vlan_update_promisc(struct rte_eth_dev *eth_dev, int enable);
515 int otx2_nix_vlan_filter_set(struct rte_eth_dev *eth_dev, uint16_t vlan_id,
517 void otx2_nix_vlan_strip_queue_set(struct rte_eth_dev *dev,
518 uint16_t queue, int on);
519 int otx2_nix_vlan_tpid_set(struct rte_eth_dev *eth_dev,
520 enum rte_vlan_type type, uint16_t tpid);
521 int otx2_nix_vlan_pvid_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on);
523 /* Lookup configuration */
524 void *otx2_nix_fastpath_lookup_mem_get(void);
527 const uint32_t *otx2_nix_supported_ptypes_get(struct rte_eth_dev *dev);
529 /* Mac address handling */
530 int otx2_nix_mac_addr_set(struct rte_eth_dev *eth_dev,
531 struct rte_ether_addr *addr);
532 int otx2_nix_mac_addr_get(struct rte_eth_dev *eth_dev, uint8_t *addr);
533 int otx2_nix_mac_addr_add(struct rte_eth_dev *eth_dev,
534 struct rte_ether_addr *addr,
535 uint32_t index, uint32_t pool);
536 void otx2_nix_mac_addr_del(struct rte_eth_dev *eth_dev, uint32_t index);
537 int otx2_cgx_mac_max_entries_get(struct otx2_eth_dev *dev);
540 int otx2_ethdev_parse_devargs(struct rte_devargs *devargs,
541 struct otx2_eth_dev *dev);
543 /* Rx and Tx routines */
544 void otx2_eth_set_rx_function(struct rte_eth_dev *eth_dev);
545 void otx2_eth_set_tx_function(struct rte_eth_dev *eth_dev);
546 void otx2_nix_form_default_desc(struct otx2_eth_txq *txq);
548 /* Timesync - PTP routines */
549 int otx2_nix_timesync_enable(struct rte_eth_dev *eth_dev);
550 int otx2_nix_timesync_disable(struct rte_eth_dev *eth_dev);
551 int otx2_nix_timesync_read_rx_timestamp(struct rte_eth_dev *eth_dev,
552 struct timespec *timestamp,
554 int otx2_nix_timesync_read_tx_timestamp(struct rte_eth_dev *eth_dev,
555 struct timespec *timestamp);
556 int otx2_nix_timesync_adjust_time(struct rte_eth_dev *eth_dev, int64_t delta);
557 int otx2_nix_timesync_write_time(struct rte_eth_dev *eth_dev,
558 const struct timespec *ts);
559 int otx2_nix_timesync_read_time(struct rte_eth_dev *eth_dev,
560 struct timespec *ts);
561 int otx2_eth_dev_ptp_info_update(struct otx2_dev *dev, bool ptp_en);
562 int otx2_nix_read_clock(struct rte_eth_dev *eth_dev, uint64_t *time);
563 int otx2_nix_raw_clock_tsc_conv(struct otx2_eth_dev *dev);
565 #endif /* __OTX2_ETHDEV_H__ */