net/softnic: add traffic manager object
[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 /** Firmware. */
15 #ifndef SOFTNIC_FIRMWARE
16 #define SOFTNIC_FIRMWARE                                   "firmware.cli"
17 #endif
18
19 /** NUMA node ID. */
20 #ifndef SOFTNIC_CPU_ID
21 #define SOFTNIC_CPU_ID                                     0
22 #endif
23
24 /** Traffic Manager: Number of scheduler queues. */
25 #ifndef SOFTNIC_TM_N_QUEUES
26 #define SOFTNIC_TM_N_QUEUES                                (64 * 1024)
27 #endif
28
29 /** Traffic Manager: Scheduler queue size (per traffic class). */
30 #ifndef SOFTNIC_TM_QUEUE_SIZE
31 #define SOFTNIC_TM_QUEUE_SIZE                              64
32 #endif
33
34 /**
35  * Soft NIC run.
36  *
37  * @param port_id
38  *    Port ID of the Soft NIC device.
39  * @return
40  *    Zero on success, error code otherwise.
41  */
42 int
43 rte_pmd_softnic_run(uint16_t port_id);
44
45 #ifdef __cplusplus
46 }
47 #endif
48
49 #endif /* __INCLUDE_RTE_ETH_SOFTNIC_H__ */