41a1d4d1 | 11-Aug-2023 |
Jiri Pirko <jiri@nvidia.com> |
devlink: parse rate attrs in doit() callbacks
No need to give the rate any special treatment in netlink attributes parsing, as unlike for ports, there is only a couple of commands benefiting from th
devlink: parse rate attrs in doit() callbacks
No need to give the rate any special treatment in netlink attributes parsing, as unlike for ports, there is only a couple of commands benefiting from that.
Remove DEVLINK_NL_FLAG_NEED_RATE*, make pre_doit() callback simpler by moving the rate attributes parsing to rate_*_doit() ops.
Signed-off-by: Jiri Pirko <jiri@nvidia.com> Acked-by: Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/r/20230811155714.1736405-3-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
6e067d0c | 03-Aug-2023 |
Jiri Pirko <jiri@nvidia.com> |
devlink: use generated split ops and remove duplicated commands from small ops
Do the switch and use generated split ops for get and info_get commands. Remove those from small ops array.
Signed-off
devlink: use generated split ops and remove duplicated commands from small ops
Do the switch and use generated split ops for get and info_get commands. Remove those from small ops array.
Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/r/20230803111340.1074067-13-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
b2551b15 | 03-Aug-2023 |
Jiri Pirko <jiri@nvidia.com> |
devlink: include the generated netlink header
Put the newly added generated header to the include list. Remove the duplicated temporary function prototypes.
Signed-off-by: Jiri Pirko <jiri@nvidia.c
devlink: include the generated netlink header
Put the newly added generated header to the include list. Remove the duplicated temporary function prototypes.
Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/r/20230803111340.1074067-12-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
8300dce5 | 03-Aug-2023 |
Jiri Pirko <jiri@nvidia.com> |
devlink: un-static devlink_nl_pre/post_doit()
To be prepared for the follow-up generated split ops addition, make the functions devlink_nl_pre_doit() and devlink_nl_post_doit() usable outside of net
devlink: un-static devlink_nl_pre/post_doit()
To be prepared for the follow-up generated split ops addition, make the functions devlink_nl_pre_doit() and devlink_nl_post_doit() usable outside of netlink.c. Introduce temporary prototypes which are going to be removed once the generated header will be included.
Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/r/20230803111340.1074067-9-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
491a2487 | 03-Aug-2023 |
Jiri Pirko <jiri@nvidia.com> |
devlink: introduce couple of dumpit callbacks for split ops
Introduce couple of dumpit callbacks for generated split ops. Have them as a thin wrapper around iteration function and allow to pass dump
devlink: introduce couple of dumpit callbacks for split ops
Introduce couple of dumpit callbacks for generated split ops. Have them as a thin wrapper around iteration function and allow to pass dump_one() function pointer directly without need to store in devlink_cmd structs.
Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/r/20230803111340.1074067-8-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
d61aedcf | 03-Aug-2023 |
Jiri Pirko <jiri@nvidia.com> |
devlink: rename couple of doit netlink callbacks to match generated names
The generated names of the doit netlink callback are missing "cmd" in their names. Change names to be ready to switch to gen
devlink: rename couple of doit netlink callbacks to match generated names
The generated names of the doit netlink callback are missing "cmd" in their names. Change names to be ready to switch to generated split ops header.
Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/r/20230803111340.1074067-7-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
4b5ed2b5 | 26-May-2023 |
Jiri Pirko <jiri@nvidia.com> |
devlink: save devlink_port_ops into a variable in devlink_port_function_validate()
Now when the original ops variable is removed, introduce it again but this time for devlink_port_ops.
Signed-off-b
devlink: save devlink_port_ops into a variable in devlink_port_function_validate()
Now when the original ops variable is removed, introduce it again but this time for devlink_port_ops.
Signed-off-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
show more ...
|
9277649c | 23-May-2023 |
Jiri Pirko <jiri@nvidia.com> |
devlink: pass devlink_port pointer to ops->port_del() instead of index
Historically there was a reason why port_dev() along with for example port_split() did get port_index instead of the devlink_po
devlink: pass devlink_port pointer to ops->port_del() instead of index
Historically there was a reason why port_dev() along with for example port_split() did get port_index instead of the devlink_port pointer. With the locking changes that were done which ensured devlink instance mutex is hold for every command, the port ops could get devlink_port pointer directly. Change the forgotten port_dev() op to be as others and pass devlink_port pointer instead of port_index.
Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: David S. Miller <davem@davemloft.net>
show more ...
|