]> git.proxmox.com Git - ceph.git/blob - ceph/src/spdk/dpdk/examples/quota_watermark/qw/main.h
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / spdk / dpdk / examples / quota_watermark / qw / main.h
1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
3 */
4
5 #ifndef _MAIN_H_
6 #define _MAIN_H_
7
8 #include "../include/conf.h"
9
10 enum ring_state {
11 RING_READY,
12 RING_OVERLOADED,
13 };
14
15 extern int *quota;
16 extern unsigned int *low_watermark;
17 extern unsigned int *high_watermark;
18
19 extern uint16_t port_pairs[RTE_MAX_ETHPORTS];
20
21 extern struct rte_ring *rings[RTE_MAX_LCORE][RTE_MAX_ETHPORTS];
22 extern struct rte_mempool *mbuf_pool;
23
24
25 static inline int
26 is_bit_set(int i, unsigned int mask)
27 {
28 return (1 << i) & mask;
29 }
30
31 #endif /* _MAIN_H_ */