]> git.proxmox.com Git - ceph.git/blame - ceph/src/spdk/dpdk/drivers/net/softnic/rte_eth_softnic.h
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / spdk / dpdk / drivers / net / softnic / rte_eth_softnic.h
CommitLineData
11fdf7f2
TL
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
11extern "C" {
12#endif
13
14/** Firmware. */
15#ifndef SOFTNIC_FIRMWARE
16#define SOFTNIC_FIRMWARE "firmware.cli"
17#endif
18
19/** TCP connection port (0 = no connectivity). */
20#ifndef SOFTNIC_CONN_PORT
21#define SOFTNIC_CONN_PORT 0
22#endif
23
24/** NUMA node ID. */
25#ifndef SOFTNIC_CPU_ID
26#define SOFTNIC_CPU_ID 0
27#endif
28
9f95a23c
TL
29/**
30 * Service cores:
31 *
32 * 0 = The current device is run explicitly by the application. The firmware
33 * creates one or several pipelines for the current device and maps them to
34 * CPU cores that should not be service cores. The application is required
35 * to call rte_pmd_softnic_run() for the current device on each of these CPU
36 * cores in order to make the current device work.
37 *
38 * 1 = The current device is run on the service cores transparently to the
39 * application. The firmware creates one or several pipelines for the
40 * current device and maps them to CPU cores that should be service cores.
41 * Each of these service cores is calling rte_pmd_softnic_run() for the
42 * current device in order to make the current device work. The application
43 * is not allowed to call rte_pmd_softnic_run() for the current device.
44 */
45#ifndef SOFTNIC_SC
46#define SOFTNIC_SC 1
47#endif
48
11fdf7f2
TL
49/** Traffic Manager: Number of scheduler queues. */
50#ifndef SOFTNIC_TM_N_QUEUES
51#define SOFTNIC_TM_N_QUEUES (64 * 1024)
52#endif
53
54/** Traffic Manager: Scheduler queue size (per traffic class). */
55#ifndef SOFTNIC_TM_QUEUE_SIZE
56#define SOFTNIC_TM_QUEUE_SIZE 64
57#endif
58
59/**
60 * Soft NIC run.
61 *
62 * @param port_id
63 * Port ID of the Soft NIC device.
64 * @return
65 * Zero on success, error code otherwise.
66 */
67int
68rte_pmd_softnic_run(uint16_t port_id);
69
70/**
71 * Soft NIC manage.
72 *
73 * @param port_id
74 * Port ID of the Soft NIC device.
75 * @return
76 * Zero on success, error code otherwise.
77 */
f67539c2
TL
78__rte_experimental
79int
11fdf7f2
TL
80rte_pmd_softnic_manage(uint16_t port_id);
81
82#ifdef __cplusplus
83}
84#endif
85
86#endif /* __INCLUDE_RTE_ETH_SOFTNIC_H__ */