Re: [PATCH net-next v2] devlink: let kernel allocate region snapshot id

2020-05-01 Thread Jacob Keller
On 5/1/2020 2:32 PM, Jakub Kicinski wrote: > On Fri, 1 May 2020 21:23:25 + Keller, Jacob E wrote: >>> Could you please send the snapshot id just before you return 0 in this >>> function, as you offered in v1? I think it would be great to do it like >>> that. >>> >> >> Also: Does it make sens

Re: [PATCH net-next v2] devlink: let kernel allocate region snapshot id

2020-05-01 Thread Jakub Kicinski
On Fri, 1 May 2020 21:23:25 + Keller, Jacob E wrote: > > Could you please send the snapshot id just before you return 0 in this > > function, as you offered in v1? I think it would be great to do it like > > that. > > > > Also: Does it make sense to send the snapshot id regardless of > whethe

RE: [PATCH net-next v2] devlink: let kernel allocate region snapshot id

2020-05-01 Thread Keller, Jacob E
> -Original Message- > From: Jiri Pirko > Sent: Wednesday, April 29, 2020 9:53 PM > To: Jakub Kicinski > Cc: da...@davemloft.net; netdev@vger.kernel.org; kernel-t...@fb.com; > Keller, Jacob E > Subject: Re: [PATCH net-next v2] devlink: let kernel allocate

Re: [PATCH net-next v2] devlink: let kernel allocate region snapshot id

2020-04-29 Thread Jiri Pirko
Thu, Apr 30, 2020 at 01:38:13AM CEST, k...@kernel.org 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 mess

RE: [PATCH net-next v2] devlink: let kernel allocate region snapshot id

2020-04-29 Thread Keller, Jacob E
Subject: [PATCH net-next v2] devlink: let kernel allocate region snapshot id > > 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

[PATCH net-next v2] devlink: let kernel allocate region snapshot id

2020-04-29 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. The message carryin