HomeFreeBSD

ena-com: restructure the ENA logging system

Description

ena-com: restructure the ENA logging system

Introduce a new logging system, which replaces the old logging method.

All logs are now displayed in device_printf format, requiring
adapter->pdev to be passed down to ena_log. Whenever that's
impossible, a printf wrapped ena_log_raw is provided.

For netmap logs, ena_log_nm is available, prepending "[nm] " to
an ena_log formatted message.

Tx/Rx data path logs are now printed via ena_log_io. This allows them
to be conditionally compiled out, depending on the presence of
ENA_LOG_IO_ENABLE compilation flag. By default this flag is disabled.

All ena_trc_* ena_com level messages are now also wrapped around
ena_log and require ena_dev->dmadev to be present.

There are four log levels:

  • 0 - ENA_ERR - enable driver error messages and ena_com error logs,
  • 1 - ENA_WARN - enable logs for non-critical errors,
  • 2 - ENA_INFO - make the driver more verbose about its actions,
  • 3 - ENA_DBG - enable debug logs

Please see ena_fbsd_log.h for implementation details.

Submitted by: Artur Rojek <ar@semihalf.com>
Obtained from: Semihalf
MFC after: 2 weeks
Sponsored by: Amazon, Inc.

Details

Provenance
mwAuthored on Jun 24 2021, 1:48 PM
Parents
rGe0f5dd7cdd3d: ena-com: update sources to the latest version
Branches
Unknown
Tags
Unknown
References
tag: vendor/ena-com/2.4.0