1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2016 Ethan Zhuang <[email protected]>. 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 #include <rte_kni.h> 25 26 #include "rte_port.h" 27 28 /** kni_reader port parameters */ 29 struct rte_port_kni_reader_params { 30 /** KNI interface reference */ 31 struct rte_kni *kni; 32 }; 33 34 /** kni_reader port operations */ 35 extern struct rte_port_in_ops rte_port_kni_reader_ops; 36 37 38 /** kni_writer port parameters */ 39 struct rte_port_kni_writer_params { 40 /** KNI interface reference */ 41 struct rte_kni *kni; 42 /** Burst size to KNI interface. */ 43 uint32_t tx_burst_sz; 44 }; 45 46 /** kni_writer port operations */ 47 extern struct rte_port_out_ops rte_port_kni_writer_ops; 48 49 /** kni_writer_nodrop port parameters */ 50 struct rte_port_kni_writer_nodrop_params { 51 /** KNI interface reference */ 52 struct rte_kni *kni; 53 /** Burst size to KNI interface. */ 54 uint32_t tx_burst_sz; 55 /** Maximum number of retries, 0 for no limit */ 56 uint32_t n_retries; 57 }; 58 59 /** kni_writer_nodrop port operations */ 60 extern struct rte_port_out_ops rte_port_kni_writer_nodrop_ops; 61 62 #ifdef __cplusplus 63 } 64 #endif 65 66 #endif 67