PAPI  5.3.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
linux-infiniband.h
Go to the documentation of this file.
1 /****************************/
2 /* THIS IS OPEN SOURCE CODE */
3 /****************************/
4 
24 #ifndef _PAPI_INFINIBAND_H
25 #define _PAPI_INFINIBAND_H
26 
27 #define __BUILD_VERSION_TAG__ 1.2
28 
29 #include <infiniband/umad.h>
30 #include <infiniband/mad.h>
31 
32 /* describes a single counter with its properties */
33 typedef struct counter_info_struct
34 {
35  int idx;
36  char *name;
37  char *description;
38  char *unit;
39  uint64_t value;
40  struct counter_info_struct *next;
41 } counter_info;
42 
43 typedef struct
44 {
45  int count;
46  char **data;
47 } string_list;
48 
49 /* infos collected of a single IB port */
50 typedef struct ib_port_struct
51 {
52  char *name;
55  int port_rate;
58  uint64_t sum_send_val;
59  uint64_t sum_recv_val;
60  uint32_t last_send_val;
61  uint32_t last_recv_val;
62  struct ib_port_struct *next;
63 } ib_port;
64 
65 
66 static void init_ib_counter( );
67 static int read_ib_counter( );
68 static int init_ib_port( ib_port * portdata );
69 static void addIBPort( const char *ca_name, umad_port_t * port );
70 
71 
72 /************************* DEFINES SECTION *******************************
73  ***************************************************************************/
74 /* this number assumes that there will never be more events than indicated */
75 #define INFINIBAND_MAX_COUNTERS 100
76 #define INFINIBAND_MAX_COUNTER_TERMS INFINIBAND_MAX_COUNTERS
77 
81 
82 
83 typedef struct INFINIBAND_control_state
84 {
85  long long counts[INFINIBAND_MAX_COUNTERS];
86  int ncounter;
88 
89 
90 typedef struct INFINIBAND_context
91 {
94 
95 #endif /* _PAPI_INFINIBAND_H */
struct counter_info_struct * next
char * name
counter_info * send_cntr
counter_info INFINIBAND_native_event_entry_t
uint32_t last_recv_val
counter_info * recv_cntr
INFINIBAND_control_state_t state
static void init_ib_counter()
#define INFINIBAND_MAX_COUNTERS
counter_info INFINIBAND_register_t
uint32_t last_send_val
static int init_ib_port(ib_port *portdata)
static int read_ib_counter()
char * port
Definition: iozone.c:1620
struct ib_port_struct * next
uint64_t sum_send_val
static void addIBPort(const char *ca_name, umad_port_t *port)
counter_info INFINIBAND_reg_alloc_t
int is_initialized
uint64_t sum_recv_val