Commit Graph

1 Commits

Author SHA1 Message Date
Parav Pandit 332a6983d9 Add devlink commands for devlink device information
This patch adds very basic support for getting information about
devlink devices which are typically PCI devices which exposes Networking
switch or legacy devices.

This information includes bus name, device name and eswitch modes.
This is done through devlink family of commands via generic netlink
sockets provided by Linux kernel.

DevlinkDevice represents a devlink device which is identified by bus
name and device name (unlike interface index for netdevices).
It contains the DevlinkDevAttrs device attributes.
Currently only eswitch attributes are queried. In future more attributes
such as port, shared buffer, traffic class will be added.

Signed-off-by: Parav Pandit <parav@mellanox.com>
2018-12-19 14:37:14 -08:00