summaryrefslogtreecommitdiffstats
path: root/lib/libssl/ssl_lib.c
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2020-07-07 02:38:56 +0000
committerdlg <dlg@openbsd.org>2020-07-07 02:38:56 +0000
commit2ee1fcb37df9a931d73bf73dacc3c7d9df9193ec (patch)
treec037d2f61673675e6dc377d2f8d3b5ddade1f55e /lib/libssl/ssl_lib.c
parentGet rid of some rasops callbacks in efifb that only call rasops (diff)
downloadwireguard-openbsd-2ee1fcb37df9a931d73bf73dacc3c7d9df9193ec.tar.xz
wireguard-openbsd-2ee1fcb37df9a931d73bf73dacc3c7d9df9193ec.zip
add kstat support for reading hardware counters.
this chip is annoyingly complicated, which is reflected in how complicated it is to read counters off the chip. while we just use ixl as a normal network interface, the chip is capable of being a switch with physical ports, virtual ports and all sorts of other functionality, and there are counters in different places for all these different pieces. in our simple setup the driver interface is mapped to a single physical port which we talk to via a single virtual switch interface. this diff adds counters on each interface for the physical port and for the virtual switch interface (vsi). the port counters show what the hardware is doing, while the vsi counters show how the driver is interacting with the chip. for things like packet counters, these numbers tend to correlate strongly, but there are some differences. if the chip drops packets cos there's no descriptors on the rx ring, that's shown in the vsi counters. problems talking to the physical network (eg, packet corruption off the wire) are reported on the port counters. on top of the chip just being complicated, reading the counters is a complicated activity on its own. because the counters can be read by multiple consumers in a virtualised environment, the counters never really get reset. they are also stored in annoyingly small fields. this means you basically have to poll the chip periodically and calculate differences between the polls to avoid losing numbers if they overflow too quickly.
Diffstat (limited to 'lib/libssl/ssl_lib.c')
0 files changed, 0 insertions, 0 deletions