Re: [PATCH net-next] net: mctp: Expose transport binding identifier via IFLA attribute

From: Khang D Nguyen
Date: Fri Nov 08 2024 - 00:48:08 EST


On 08/11/2024 11:41, Jakub Kicinski wrote:
On Tue, 5 Nov 2024 14:19:15 +0700 Khang Nguyen wrote:
However, we currently have no means to get this information from MCTP
links.

I'm not opposed to the netlink attribute, but to be clear this info
is indirectly available in sysfs, right? We link the netdev to
the parent device so the type of /sys/class/net/$your_ifc/device
should reveal what the transport is?

Good point, I did not think about using the parent device, that would be a good workaround for the currently supported interfaces.

For the long term, we should still need the attribute. For example, vendor-defined transports need their 0xFF code, which cannot be derived anywhere. Or binding implementations that have parent SoC platform devices from the device tree, which do not always have a clear type shown in the sysfs...

(The MCTP-over-serial binding also does not have a parent device currently, but I believe we can fix that if necessary)