Switchtec Userspace
PROJECT_NUMBER = PROJECT_NUMBER=PROJECT_NUMBER = 2.2
|
Switchtec core library functions for performance monitoring. More...
#include "switchtec/pmon.h"
#include "switchtec_priv.h"
#include "switchtec/switchtec.h"
#include "switchtec/endian.h"
#include <stddef.h>
#include <errno.h>
Go to the source code of this file.
Functions | |
int | switchtec_evcntr_type_count (void) |
Get the number of event counter types. More... | |
const char * | switchtec_evcntr_type_str (int *type_mask) |
Get a string for the event indicated by lowest bit set in the type_mask. More... | |
int | switchtec_evcntr_setup (struct switchtec_dev *dev, unsigned stack_id, unsigned cntr_id, struct switchtec_evcntr_setup *setup) |
Setup an event counter performance monitor. More... | |
int | switchtec_evcntr_get_setup (struct switchtec_dev *dev, unsigned stack_id, unsigned cntr_id, unsigned nr_cntrs, struct switchtec_evcntr_setup *res) |
Retrieve the setup information for one or more event counters. More... | |
int | switchtec_evcntr_get (struct switchtec_dev *dev, unsigned stack_id, unsigned cntr_id, unsigned nr_cntrs, unsigned *res, int clear) |
Retrieve the current counts for one or more event counters. More... | |
int | switchtec_evcntr_get_both (struct switchtec_dev *dev, unsigned stack_id, unsigned cntr_id, unsigned nr_cntrs, struct switchtec_evcntr_setup *setup, unsigned *counts, int clear) |
Retrieve the current counts and setup information for one or more event counters. More... | |
int | switchtec_evcntr_wait (struct switchtec_dev *dev, int timeout_ms) |
Block until any event counter has reached its threshold. More... | |
void | switchtec_bwcntr_sub (struct switchtec_bwcntr_res *new_cntr, struct switchtec_bwcntr_res *old_cntr) |
Subtract all the values between two bwcntr result structures. More... | |
int | switchtec_bwcntr_set_many (struct switchtec_dev *dev, int nr_ports, int *phys_port_ids, enum switchtec_bw_type bw_type) |
Set bandwidth type for a number of ports. More... | |
int | switchtec_bwcntr_set_all (struct switchtec_dev *dev, enum switchtec_bw_type bw_type) |
Set bandwidth type for all the ports in the system. More... | |
int | switchtec_bwcntr_many (struct switchtec_dev *dev, int nr_ports, int *phys_port_ids, int clear, struct switchtec_bwcntr_res *res) |
Retrieve the bandwidth counter results for a number of ports. More... | |
int | switchtec_bwcntr_all (struct switchtec_dev *dev, int clear, struct switchtec_port_id **ports, struct switchtec_bwcntr_res **res) |
Retrieve the bandwidth counter results for all the ports in the system. More... | |
uint64_t | switchtec_bwcntr_tot (struct switchtec_bwcntr_dir *d) |
Get the total. More... | |
int | switchtec_lat_setup_many (struct switchtec_dev *dev, int nr_ports, int *egress_port_ids, int *ingress_port_ids) |
Setup a number of latency counters. More... | |
int | switchtec_lat_setup (struct switchtec_dev *dev, int egress_port_id, int ingress_port_id, int clear) |
Setup a latency counter. More... | |
int | switchtec_lat_get_many (struct switchtec_dev *dev, int nr_ports, int clear, int *egress_port_ids, int *cur_ns, int *max_ns) |
Get a number of latency counter results. More... | |
int | switchtec_lat_get (struct switchtec_dev *dev, int clear, int egress_port_ids, int *cur_ns, int *max_ns) |
Get a single latency counter result. More... | |
Switchtec core library functions for performance monitoring.
Definition in file pmon.c.