New upstream version 18.02
[deb_dpdk.git] / drivers / net / softnic / rte_eth_softnic.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2017 Intel Corporation
3  */
4
5 #ifndef __INCLUDE_RTE_ETH_SOFTNIC_H__
6 #define __INCLUDE_RTE_ETH_SOFTNIC_H__
7
8 #include <stdint.h>
9
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13
14 #ifndef SOFTNIC_SOFT_TM_NB_QUEUES
15 #define SOFTNIC_SOFT_TM_NB_QUEUES                       65536
16 #endif
17
18 #ifndef SOFTNIC_SOFT_TM_QUEUE_SIZE
19 #define SOFTNIC_SOFT_TM_QUEUE_SIZE                      64
20 #endif
21
22 #ifndef SOFTNIC_SOFT_TM_ENQ_BSZ
23 #define SOFTNIC_SOFT_TM_ENQ_BSZ                         32
24 #endif
25
26 #ifndef SOFTNIC_SOFT_TM_DEQ_BSZ
27 #define SOFTNIC_SOFT_TM_DEQ_BSZ                         24
28 #endif
29
30 #ifndef SOFTNIC_HARD_TX_QUEUE_ID
31 #define SOFTNIC_HARD_TX_QUEUE_ID                        0
32 #endif
33
34 /**
35  * Run the traffic management function on the softnic device
36  *
37  * This function read the packets from the softnic input queues, insert into
38  * QoS scheduler queues based on mbuf sched field value and transmit the
39  * scheduled packets out through the hard device interface.
40  *
41  * @param portid
42  *    port id of the soft device.
43  * @return
44  *    zero.
45  */
46
47 int
48 rte_pmd_softnic_run(uint16_t port_id);
49
50 #ifdef __cplusplus
51 }
52 #endif
53
54 #endif /* __INCLUDE_RTE_ETH_SOFTNIC_H__ */