Skip to content

core: log the device type when it can be ambiguous

Beniamino Galvani requested to merge bg/log-device-type into main

When logging, messages include the interface name to specify what device they refer to. In most case the interface name is unique.

There are some devices that don't have a kernel link associated, and their interface name is not guaranteed to be unique. This is currently the case for OVS bridges and OVS ports. When reading a log with duplicate interface names, it is difficult to understand what is happening. And this is made worse by the fact that it is common practice to assign the same name to all devices in a OVS hierarchy (bridge, port, interface).

To make logs unambiguous, we want to print the device type together with the name; however we don't want to always print the type because in most cases it's not useful and it would consume valuable real estate on the screen. Adopt a simple heuristic of showing the type only for OVS devices.

Merge request reports