DPDK
17.08.2
Main Page
Related Pages
Data Structures
Files
Examples
File List
Globals
lib
librte_eal
common
include
rte_service.h
Go to the documentation of this file.
1
/*
2
* BSD LICENSE
3
*
4
* Copyright(c) 2017 Intel Corporation. All rights reserved.
5
*
6
* Redistribution and use in source and binary forms, with or without
7
* modification, are permitted provided that the following conditions
8
* are met:
9
*
10
* * Redistributions of source code must retain the above copyright
11
* notice, this list of conditions and the following disclaimer.
12
* * Redistributions in binary form must reproduce the above copyright
13
* notice, this list of conditions and the following disclaimer in
14
* the documentation and/or other materials provided with the
15
* distribution.
16
* * Neither the name of Intel Corporation nor the names of its
17
* contributors may be used to endorse or promote products derived
18
* from this software without specific prior written permission.
19
*
20
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
*/
32
33
#ifndef _RTE_SERVICE_H_
34
#define _RTE_SERVICE_H_
35
54
#ifdef __cplusplus
55
extern
"C"
{
56
#endif
57
58
#include<stdio.h>
59
#include <stdint.h>
60
#include <sys/queue.h>
61
62
#include <
rte_lcore.h
>
63
64
/* forward declaration only. Definition in rte_service_private.h */
65
struct
rte_service_spec
;
66
67
#define RTE_SERVICE_NAME_MAX 32
68
69
/* Capabilities of a service.
70
*
71
* Use the *rte_service_probe_capability* function to check if a service is
72
* capable of a specific capability.
73
*/
77
#define RTE_SERVICE_CAP_MT_SAFE (1 << 0)
78
90
uint32_t
rte_service_get_count
(
void
);
91
92
108
struct
rte_service_spec
*
rte_service_get_by_id
(uint32_t
id
);
109
125
struct
rte_service_spec
*
rte_service_get_by_name
(
const
char
*
name
);
126
136
const
char
*
rte_service_get_name
(
const
struct
rte_service_spec
*service);
137
149
int32_t
rte_service_probe_capability
(
const
struct
rte_service_spec
*service,
150
uint32_t capability);
151
170
int32_t
rte_service_enable_on_lcore
(
struct
rte_service_spec
*service,
171
uint32_t lcore);
172
185
int32_t
rte_service_disable_on_lcore
(
struct
rte_service_spec
*service,
186
uint32_t lcore);
187
201
int32_t
rte_service_get_enabled_on_lcore
(
struct
rte_service_spec
*service,
202
uint32_t lcore);
203
204
214
int32_t
rte_service_start
(
struct
rte_service_spec
*service);
215
226
int32_t
rte_service_stop
(
struct
rte_service_spec
*service);
227
242
int32_t
rte_service_is_running
(
const
struct
rte_service_spec
*service);
243
257
int32_t
rte_service_lcore_start
(uint32_t lcore_id);
258
276
int32_t
rte_service_lcore_stop
(uint32_t lcore_id);
277
292
int32_t
rte_service_lcore_add
(uint32_t lcore);
293
306
int32_t
rte_service_lcore_del
(uint32_t lcore);
307
323
int32_t
rte_service_lcore_count
(
void
);
324
335
int32_t
rte_service_lcore_reset_all
(
void
);
336
349
int32_t
rte_service_set_stats_enable
(
struct
rte_service_spec
*service,
350
int32_t enable);
351
371
int32_t
rte_service_lcore_list
(uint32_t array[], uint32_t n);
372
380
int32_t
rte_service_dump
(FILE *f,
struct
rte_service_spec
*service);
381
382
#ifdef __cplusplus
383
}
384
#endif
385
386
387
#endif
/* _RTE_SERVICE_H_ */
Generated by
1.8.1.2