Commit Graph

168 Commits

Author SHA1 Message Date
Or Gerlitz
f57856fab2 devlink: Add e-switch support
Implement kernel devlink e-switch interface. Currently we allow
to get and set the device e-switch mode.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roi Dayan <roid@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
2016-08-29 11:15:54 -07:00
Jiri Pirko
e3d0f0c0e3 devlink: add option to generate JSON output
For parsing by another app it is convenient to produce output in JSON
format.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2016-08-01 16:31:08 -07:00
Jiri Pirko
7a9466dbcb devlink: write usage help messages to stderr
In order to not confuse reader, write help messages into stderr.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2016-08-01 16:31:08 -07:00
Jiri Pirko
25ec49be2c devlink: implement shared buffer occupancy control
Use kernel shared buffer occupancy control commands to make snapshot and
clear occupancy watermarks. Also, allow to show occupancy values in a
nice way.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2016-05-16 11:22:04 -07:00
Jiri Pirko
e6d7367d79 devlink: implement shared buffer support
Implement kernel devlink shared buffer interface. Introduce new object
"sb" and allow to browse the shared buffer parameters and also change
configuration.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2016-05-16 11:22:04 -07:00
Stephen Hemminger
c13363e4cd devlink: remove more unused code 2016-05-13 14:48:32 -07:00
Stephen Hemminger
719c443bb8 devlink: remove unused code
Unused code causes warnings, removed.
2016-05-13 14:42:06 -07:00
Stephen Hemminger
7aca60c0eb Revert "devlink: implement shared buffer support"
This reverts commit b56700bf8a.
2016-05-13 14:38:47 -07:00
Stephen Hemminger
c3d25ec392 Revert "devlink: implement shared buffer occupancy control"
This reverts commit a60ebcb6f3.
2016-05-13 14:38:38 -07:00
Jiri Pirko
a60ebcb6f3 devlink: implement shared buffer occupancy control
Use kernel shared buffer occupancy control commands to make snapshot and
clear occupancy watermarks. Also, allow to show occupancy values in a
nice way.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2016-04-19 08:01:05 -07:00
Jiri Pirko
b56700bf8a devlink: implement shared buffer support
Implement kernel devlink shared buffer interface. Introduce new object
"sb" and allow to browse the shared buffer parameters and also change
configuration.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2016-04-19 08:01:05 -07:00
Jiri Pirko
2f85a9c535 devlink: allow to parse both devlink and port handle in the same time
For filtering purposes, it makes sense for used to either specify
devlink handle of port handle.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2016-04-19 08:01:05 -07:00
Jiri Pirko
707a91c549 devlink: introduce dump filtering function
This function is to be used from dump callbacks to decide if the output
currect output should be filtered off or not. Filtering is based on
previously parsed and stored command line options.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2016-04-19 08:01:05 -07:00
Jiri Pirko
6563a6eb53 devlink: split dl_argv_parse_put to parse and put parts
It is handy to have parsed cmdline data stored so they can be used for
dumps filtering. So split original dl_argv_parse_put into parse and put
parts.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2016-04-19 08:01:05 -07:00
Jiri Pirko
43f35be4eb devlink: introduce helper to print out nice names (ifnames)
By default, ifnames will be printed out. User can turn that off using
"-n" option on the command line.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2016-04-19 08:01:05 -07:00
Jiri Pirko
68cab0ba76 devlink: introduce pr_out_port_handle helper
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2016-04-19 08:01:05 -07:00
Jiri Pirko
ec7513faa9 devlink: fix "devlink port" help message
"dl" -> "devlink"

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2016-04-19 08:01:04 -07:00
Jiri Pirko
a3c4b484a1 add devlink tool
Add new tool called devlink which is userspace counterpart of devlink
Netlink socket.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2016-03-27 10:57:15 -07:00