Clone this repo:

Branches

  1. 0a7c840 clang-format: re-format for clang-19 by Patrick Williams · 12 days ago master
  2. ed0a15e clang-format: re-format for clang-18 by Patrick Williams · 5 months ago
  3. efbdace README.md: Fix MD041 warnings by George Liu · 5 months ago
  4. 472df7e meson_options.txt: Support for reading options from meson.options by George Liu · 1 year, 5 months ago
  5. f123ac4 clang-format: copy latest and re-format by Patrick Williams · 1 year, 2 months ago

Ethernet Statistics Command (0x30)

There is the need to read a specific ethernet-level statistic value from the BMC. This is driven primarily to detect link errors that require hardware swaps during manufacturing.

This command will be well structured such that there is a request and response which mirror to some extent.

The request will specify the ethernet interface by name, as a length-prepended string, and the field they're requesting by identifier (an unsigned byte).

If the command is not supported, the IPMI OEM handler will respond accordingly, however, if the field is not supported or not recognized, the command will return 0xcc (invalid field).

The current ethernet statistics available (all future additions must append):

IdentifierHuman Readable Name
0rx_bytes
1rx_compressed
2rx_crc_errors
3rx_dropped
4rx_errors
5rx_fifo_errors
6rx_frame_errors
7rx_length_errors
8rx_missed_errors
9rx_nohandler
10rx_over_errors
11rx_packets
12tx_aborted_errors
13tx_bytes
14tx_carrier_errors
15tx_compressed
16tx_dropped
17tx_errors
18tx_fifo_errors
19tx_heartbeat_errors
20tx_packets
21tx_window_errors

Request

Byte(s)ValueData
0x00Statistic IDThe identifier of the desired statistic.
0x01LengthLength of string (not including null termination).
0x02..The nameThe string, not null-terminated.

Response

Byte(s)ValueData
0x00Stat IDThe identifier of the desired statistic.
0x01....Uint64The value. Because these are counters we don't anticipate negative values, and we don't expect overflow.