net/ice/base: init marker group table for parser
[dpdk.git] / drivers / net / dpaa2 / rte_pmd_dpaa2.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright 2018-2021 NXP
3  */
4
5 #ifndef _RTE_PMD_DPAA2_H
6 #define _RTE_PMD_DPAA2_H
7
8 /**
9  * @file rte_pmd_dpaa2.h
10  *
11  * NXP dpaa2 PMD specific functions.
12  */
13
14 #include <rte_flow.h>
15
16 /**
17  * Create a flow rule to demultiplex ethernet traffic to separate network
18  * interfaces.
19  *
20  * @param dpdmux_id
21  *    ID of the DPDMUX MC object.
22  * @param[in] pattern
23  *    Pattern specification.
24  * @param[in] actions
25  *    Associated actions.
26  *
27  * @return
28  *    A valid handle in case of success, NULL otherwise.
29  */
30 struct rte_flow *
31 rte_pmd_dpaa2_mux_flow_create(uint32_t dpdmux_id,
32                               struct rte_flow_item *pattern[],
33                               struct rte_flow_action *actions[]);
34
35 /**
36  * @warning
37  * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
38  *
39  * demultiplex interface max rx frame length configure
40  *
41  * @param dpdmux_id
42  *    ID of the DPDMUX MC object.
43  * @param max_rx_frame_len
44  *    maximum receive frame length (will be checked to be minimux of all dpnis)
45  *
46  */
47 __rte_experimental
48 int
49 rte_pmd_dpaa2_mux_rx_frame_len(uint32_t dpdmux_id, uint16_t max_rx_frame_len);
50
51 /**
52  * Create a custom hash key on basis of offset of start of packet and size.
53  * for e.g. if we need GRE packets (non-vlan and without any extra headers)
54  * to be hashed on basis of inner IP header, we will provide offset as:
55  * 14 (eth) + 20 (IP) + 4 (GRE) + 12 (Inner Src offset) = 50 and size
56  * as 8 bytes.
57  *
58  * @param port_id
59  *    The port identifier of the Ethernet device.
60  * @param offset
61  *    Offset from the start of packet which needs to be included to
62  *    calculate hash
63  * @param size
64  *    Size of the hash input key
65  *
66  * @return
67  *   - 0 if successful.
68  *   - Negative in case of failure.
69  */
70 int
71 rte_pmd_dpaa2_set_custom_hash(uint16_t port_id,
72                               uint16_t offset,
73                               uint8_t size);
74
75 /**
76  * @warning
77  * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
78  *
79  * Do thread specific initialization
80  */
81 __rte_experimental
82 void
83 rte_pmd_dpaa2_thread_init(void);
84
85 #endif /* _RTE_PMD_DPAA2_H */