Re: [PATCH net-next v4 2/3] devlink: let kernel allocate region snapshot id

2020-05-01 Thread Jacob Keller
On 5/1/2020 9:40 AM, Jakub Kicinski wrote: > Currently users have to choose a free snapshot id before > calling DEVLINK_CMD_REGION_NEW. This is potentially racy > and inconvenient. > > Make the DEVLINK_ATTR_REGION_SNAPSHOT_ID optional and try > to allocate id automatically. Send a message back

[PATCH net-next v4 2/3] devlink: let kernel allocate region snapshot id

2020-05-01 Thread Jakub Kicinski
Currently users have to choose a free snapshot id before calling DEVLINK_CMD_REGION_NEW. This is potentially racy and inconvenient. Make the DEVLINK_ATTR_REGION_SNAPSHOT_ID optional and try to allocate id automatically. Send a message back to the caller with the snapshot info. Example use: $ devl