devlink: pass devlink_port to port_split / port_unsplit callbacks
Now that devlink ports are protected by the instance lock it seems natural to pass devlink_port as an argument to the port_split / port_unsplit callbacks. This should save the drivers from doing a lookup. In theory drivers may have supported unsplitting ports which were not registered prior to this change. Reviewed-by: Ido Schimmel <idosch@nvidia.com> Tested-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -1197,9 +1197,9 @@ struct devlink_ops {
|
||||
struct netlink_ext_ack *extack);
|
||||
int (*port_type_set)(struct devlink_port *devlink_port,
|
||||
enum devlink_port_type port_type);
|
||||
int (*port_split)(struct devlink *devlink, unsigned int port_index,
|
||||
int (*port_split)(struct devlink *devlink, struct devlink_port *port,
|
||||
unsigned int count, struct netlink_ext_ack *extack);
|
||||
int (*port_unsplit)(struct devlink *devlink, unsigned int port_index,
|
||||
int (*port_unsplit)(struct devlink *devlink, struct devlink_port *port,
|
||||
struct netlink_ext_ack *extack);
|
||||
int (*sb_pool_get)(struct devlink *devlink, unsigned int sb_index,
|
||||
u16 pool_index,
|
||||
|
||||
Reference in New Issue
Block a user