summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2023-05-24 10:34:26 +0100
committerDavid S. Miller <davem@davemloft.net>2023-05-24 10:34:26 +0100
commit41a45ea49d3a74777c8e36b1fe644467bf91a273 (patch)
tree60b58207fb829af1dc46d492864ffea60464aab5 /include
parent47469d2d5913af91f21316230f066692cb6a4c9f (diff)
parent9277649c66fe7cb0e2f8adb09621556bcfb052c7 (diff)
Merge branch 'devlink-port_del-new-cleanup'
Jiri Pirko says: ==================== devlink: small port_new/del() cleanup This patchset cleans up couple of leftovers after recent devlink locking changes. Previously, both port_new/dev() commands were called without holding instance lock. Currently all devlink commands are called with instance lock held. The first patch just removes redundant port notification. The second one removes couple of outdated comments. The last patch changes port_dev() to have devlink_port pointer as an arg instead of port_index, which makes it similar to the rest of port related ops. ==================== Reviewed-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/devlink.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h
index 6a942e70e451..1bd56c8d6f3c 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -1500,41 +1500,35 @@ struct devlink_ops {
* @devlink: Devlink instance
* @attrs: attributes of the new port
* @extack: extack for reporting error messages
- * @new_port_index: index of the new port
*
* Devlink core will call this device driver function upon user request
* to create a new port function of a specified flavor and optional
* attributes
*
* Notes:
- * - Called without devlink instance lock being held. Drivers must
- * implement own means of synchronization
* - On success, drivers must register a port with devlink core
*
* Return: 0 on success, negative value otherwise.
*/
int (*port_new)(struct devlink *devlink,
const struct devlink_port_new_attrs *attrs,
- struct netlink_ext_ack *extack,
- unsigned int *new_port_index);
+ struct netlink_ext_ack *extack);
/**
* port_del() - Delete a port function
* @devlink: Devlink instance
- * @port_index: port function index to delete
+ * @port: The devlink port
* @extack: extack for reporting error messages
*
* Devlink core will call this device driver function upon user request
* to delete a previously created port function
*
* Notes:
- * - Called without devlink instance lock being held. Drivers must
- * implement own means of synchronization
* - On success, drivers must unregister the corresponding devlink
* port
*
* Return: 0 on success, negative value otherwise.
*/
- int (*port_del)(struct devlink *devlink, unsigned int port_index,
+ int (*port_del)(struct devlink *devlink, struct devlink_port *port,
struct netlink_ext_ack *extack);
/**
* port_fn_state_get() - Get the state of a port function