xref: /f-stack/dpdk/drivers/net/ark/ark_rqp.h (revision d30ea906)
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright (c) 2015-2018 Atomic Rules LLC
3  */
4 
5 #ifndef _ARK_RQP_H_
6 #define _ARK_RQP_H_
7 
8 #include <stdint.h>
9 
10 #include <rte_memory.h>
11 
12 /* The RQP or ReQuest Pacer is an internal Arkville hardware module
13  * which limits the PCIE data flow to insure correct operation for the
14  * particular hardware PCIE endpoint.
15  * This module is *not* intended for end-user manipulation, hence
16  * there is minimal documentation.
17  */
18 
19 /*
20  * RQ Pacing core hardware structure
21  * This is an overlay structures to a memory mapped FPGA device.  These
22  * structs will never be instantiated in ram memory
23  */
24 struct ark_rqpace_t {
25 	volatile uint32_t ctrl;
26 	volatile uint32_t stats_clear;
27 	volatile uint32_t cplh_max;
28 	volatile uint32_t cpld_max;
29 	volatile uint32_t err_cnt;
30 	volatile uint32_t stall_ps;
31 	volatile uint32_t stall_ps_min;
32 	volatile uint32_t stall_ps_max;
33 	volatile uint32_t req_ps;
34 	volatile uint32_t req_ps_min;
35 	volatile uint32_t req_ps_max;
36 	volatile uint32_t req_dw_ps;
37 	volatile uint32_t req_dw_ps_min;
38 	volatile uint32_t req_dw_ps_max;
39 	volatile uint32_t cpl_ps;
40 	volatile uint32_t cpl_ps_min;
41 	volatile uint32_t cpl_ps_max;
42 	volatile uint32_t cpl_dw_ps;
43 	volatile uint32_t cpl_dw_ps_min;
44 	volatile uint32_t cpl_dw_ps_max;
45 	volatile uint32_t cplh_pending;
46 	volatile uint32_t cpld_pending;
47 	volatile uint32_t cplh_pending_max;
48 	volatile uint32_t cpld_pending_max;
49 	volatile uint32_t err_count_other;
50 	char eval[4];
51 	volatile int lasped;
52 };
53 
54 void ark_rqp_dump(struct ark_rqpace_t *rqp);
55 void ark_rqp_stats_reset(struct ark_rqpace_t *rqp);
56 int ark_rqp_lasped(struct ark_rqpace_t *rqp);
57 #endif
58