Re: [PATCH v2 01/11] crypto: introduce crypto wait for async op

2017-06-10 Thread Herbert Xu
On Sat, Jun 10, 2017 at 11:05:39AM +0300, Gilad Ben-Yossef wrote: > > I guess there is a question if it really is important to know that > your request ended up > on the backlog, rather than being handled.I can imagine it can be used > as back pressure > indication but I wonder if someone is using

Re: [PATCH v2 01/11] crypto: introduce crypto wait for async op

2017-06-10 Thread Gilad Ben-Yossef
On Sat, Jun 10, 2017 at 6:43 AM, Herbert Xu wrote: > On Mon, May 29, 2017 at 11:22:48AM +0300, Gilad Ben-Yossef wrote: >> >> +static inline int crypto_wait_req(int err, struct crypto_wait *wait) >> +{ >> + switch (err) { >> + case -EINPROGRESS: >> + case

Re: [PATCH v2 01/11] crypto: introduce crypto wait for async op

2017-06-09 Thread Herbert Xu
On Mon, May 29, 2017 at 11:22:48AM +0300, Gilad Ben-Yossef wrote: > > +static inline int crypto_wait_req(int err, struct crypto_wait *wait) > +{ > + switch (err) { > + case -EINPROGRESS: > + case -EBUSY: > + wait_for_completion(>completion); > +

[PATCH v2 01/11] crypto: introduce crypto wait for async op

2017-05-29 Thread Gilad Ben-Yossef
Invoking a possibly async. crypto op and waiting for completion while correctly handling backlog processing is a common task in the crypto API implementation and outside users of it. This patch adds a generic implementation for doing so in preparation for using it across the board instead of hand