net/octeontx2: support flow destroy ops
[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 /* Default mark value used when none is provided. */
9 #define OTX2_FLOW_ACTION_FLAG_DEFAULT   0xffff
10
11 #define PTYPE_WIDTH 12
12 #define PTYPE_NON_TUNNEL_ARRAY_SZ       BIT(PTYPE_WIDTH)
13 #define PTYPE_TUNNEL_ARRAY_SZ           BIT(PTYPE_WIDTH)
14 #define PTYPE_ARRAY_SZ                  ((PTYPE_NON_TUNNEL_ARRAY_SZ +\
15                                          PTYPE_TUNNEL_ARRAY_SZ) *\
16                                          sizeof(uint16_t))
17
18 #define NIX_RX_OFFLOAD_PTYPE_F         BIT(1)
19 #define NIX_RX_OFFLOAD_MARK_UPDATE_F   BIT(4)
20 #define NIX_RX_OFFLOAD_TSTAMP_F        BIT(5)
21
22 #define NIX_TIMESYNC_RX_OFFSET          8
23
24 struct otx2_timesync_info {
25         uint64_t        rx_tstamp;
26         rte_iova_t      tx_tstamp_iova;
27         uint64_t        *tx_tstamp;
28         uint8_t         tx_ready;
29         uint8_t         rx_ready;
30 } __rte_cache_aligned;
31
32 #endif /* __OTX2_RX_H__ */