Commit Graph

5 Commits

Author SHA1 Message Date
Parav Pandit
e440572571 Add devlink command to get port by index
Add a command to get information about a specific devlink port
referenced by device name and port index(bus, device, port index).

Signed-off-by: Parav Pandit <parav@mellanox.com>
2020-11-21 23:31:39 -08:00
Parav Pandit
ff8f17bc19 Add devlink command to query devlink port list
Add devlink command to get list of devlink ports and their common
attributes.

Signed-off-by: Parav Pandit <parav@mellanox.com>
2020-11-21 23:31:39 -08:00
Parav Pandit
fd97bf4e47 Add command to set devlink device switchdev mode
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>
2019-05-01 11:37:24 -07:00
Parav Pandit
bcb80b237c Add devlink command by to get specific device name
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>
2019-05-01 11:37:24 -07:00
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