]>
Commit | Line | Data |
---|---|---|
9f95a23c TL |
1 | /* SPDX-License-Identifier: BSD-3-Clause |
2 | * Copyright(c) 2010-2014 Intel Corporation | |
7c673cae FG |
3 | */ |
4 | ||
5 | #ifndef _INIT_H_ | |
6 | #define _INIT_H_ | |
7 | ||
8 | /* | |
9 | * #include <rte_ring.h> | |
10 | * #include "args.h" | |
11 | */ | |
12 | ||
13 | /* | |
14 | * Define a client structure with all needed info, including | |
15 | * stats from the clients. | |
16 | */ | |
17 | struct client { | |
18 | struct rte_ring *rx_q; | |
19 | unsigned client_id; | |
20 | /* these stats hold how many packets the client will actually receive, | |
21 | * and how many packets were dropped because the client's queue was full. | |
22 | * The port-info stats, in contrast, record how many packets were received | |
23 | * or transmitted on an actual NIC port. | |
24 | */ | |
25 | struct { | |
26 | volatile uint64_t rx; | |
27 | volatile uint64_t rx_drop; | |
28 | } stats; | |
29 | }; | |
30 | ||
31 | extern struct client *clients; | |
32 | ||
33 | /* the shared port information: port numbers, rx and tx stats etc. */ | |
34 | extern struct port_info *ports; | |
35 | ||
36 | extern struct rte_mempool *pktmbuf_pool; | |
37 | extern uint8_t num_clients; | |
38 | extern unsigned num_sockets; | |
39 | extern struct port_info *ports; | |
40 | ||
41 | int init(int argc, char *argv[]); | |
42 | ||
43 | #endif /* ifndef _INIT_H_ */ |