1/* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright(c) 2010-2014 Intel Corporation 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 */ 17struct 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 31extern struct client *clients; 32 33/* the shared port information: port numbers, rx and tx stats etc. */ 34extern struct port_info *ports; 35 36extern struct rte_mempool *pktmbuf_pool; 37extern uint8_t num_clients; 38extern unsigned num_sockets; 39extern struct port_info *ports; 40 41int init(int argc, char *argv[]); 42 43#endif /* ifndef _INIT_H_ */ 44