Devlink device currently has legacy and switchdev mode.
Add an API to set devlink device mode for discovered devlink device.
Signed-off-by: Parav Pandit <parav@mellanox.com>
Add a command to get information about a specific devlink device
referenced by device name (bus, device).
Remove unused setupDevlinkKModule().
Signed-off-by: Parav Pandit <parav@mellanox.com>
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>