0c3627c1218eb3cd2d8126533236d2aec7635e08
[dpdk.git] / drivers / net / octeontx2 / otx2_rx.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(C) 2019 Marvell International Ltd.
3  */
4
5 #ifndef __OTX2_RX_H__
6 #define __OTX2_RX_H__
7
8 #define PTYPE_WIDTH 12
9 #define PTYPE_NON_TUNNEL_ARRAY_SZ       BIT(PTYPE_WIDTH)
10 #define PTYPE_TUNNEL_ARRAY_SZ           BIT(PTYPE_WIDTH)
11 #define PTYPE_ARRAY_SZ                  ((PTYPE_NON_TUNNEL_ARRAY_SZ +\
12                                          PTYPE_TUNNEL_ARRAY_SZ) *\
13                                          sizeof(uint16_t))
14
15 #define NIX_RX_OFFLOAD_PTYPE_F         BIT(1)
16 #define NIX_RX_OFFLOAD_TSTAMP_F        BIT(5)
17
18 #define NIX_TIMESYNC_RX_OFFSET          8
19
20 struct otx2_timesync_info {
21         uint64_t        rx_tstamp;
22         rte_iova_t      tx_tstamp_iova;
23         uint64_t        *tx_tstamp;
24         uint8_t         tx_ready;
25         uint8_t         rx_ready;
26 } __rte_cache_aligned;
27
28 #endif /* __OTX2_RX_H__ */