net/bnxt: fix null dereference in session cleanup
[dpdk.git] / lib / port / rte_port_kni.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2016 Ethan Zhuang <zhuangwj@gmail.com>.
3  * Copyright(c) 2016 Intel Corporation.
4  */
5
6 #ifndef __INCLUDE_RTE_PORT_KNI_H__
7 #define __INCLUDE_RTE_PORT_KNI_H__
8
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12
13 /**
14  * @file
15  * RTE Port KNI Interface
16  *
17  * kni_reader: input port built on top of pre-initialized KNI interface
18  * kni_writer: output port built on top of pre-initialized KNI interface
19  *
20  ***/
21
22 #include <stdint.h>
23
24
25 #include "rte_port.h"
26
27 /** kni_reader port parameters */
28 struct rte_port_kni_reader_params {
29         /** KNI interface reference */
30         struct rte_kni *kni;
31 };
32
33 /** kni_reader port operations */
34 extern struct rte_port_in_ops rte_port_kni_reader_ops;
35
36
37 /** kni_writer port parameters */
38 struct rte_port_kni_writer_params {
39         /** KNI interface reference */
40         struct rte_kni *kni;
41         /** Burst size to KNI interface. */
42         uint32_t tx_burst_sz;
43 };
44
45 /** kni_writer port operations */
46 extern struct rte_port_out_ops rte_port_kni_writer_ops;
47
48 /** kni_writer_nodrop port parameters */
49 struct rte_port_kni_writer_nodrop_params {
50         /** KNI interface reference */
51         struct rte_kni *kni;
52         /** Burst size to KNI interface. */
53         uint32_t tx_burst_sz;
54         /** Maximum number of retries, 0 for no limit */
55         uint32_t n_retries;
56 };
57
58 /** kni_writer_nodrop port operations */
59 extern struct rte_port_out_ops rte_port_kni_writer_nodrop_ops;
60
61 #ifdef __cplusplus
62 }
63 #endif
64
65 #endif