Re: [RFC 1/2] SPU-AES support (kernel side)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Herbert Xu | 2007-07-12 12:36:13 [+0800]:

>On Wed, Jun 27, 2007 at 01:00:27AM +0200, Sebastian Siewior wrote:
>>
>> +static int enqueue_request(struct ablkcipher_request *req,
>> +		enum SPU_FUNCTIONS op_type)
>> +{
>> +	struct async_d_request *asy_d_ctx = ablkcipher_request_ctx(req);
>> +	struct crypto_ablkcipher *tfm = crypto_ablkcipher_reqtfm(req);
>> +	struct aes_ctx *ctx = crypto_ablkcipher_ctx(tfm);
>> +	struct kspu_work_item *work = &asy_d_ctx->kspu_work;
>> +
>> +	asy_d_ctx->crypto_operation = op_type;
>> +	asy_d_ctx->progress = 0;
>> +	work->enqueue = aes_queue_work_items;
>> +
>> +	kspu_enqueue_work_item(ctx->spe_ctx->ctx, &asy_d_ctx->kspu_work);
>
>OK this is a software queue so we want to put a limit on it.
Limit means you want me to drop requests after a certain limit (i.e.
when my queue is full)?

>In fact, any reason why you couldn't juse use the existing
>crypto_enqueue_request interface here? That would also make
>that cast function unnecessary.
I would have to start an extra thread that removes requests from
crypto_enqueue_request and enqueues them into kspu_enqueue_work_item.
The later may be used not just for crypto requests but for all KSPU
users. I can't enqueue directly on the SPU in the first place because
this requires to hold a mutex (and then I need an endless queue for the
CRYPTO_TFM_REQ_MAY_BACKLOG requests anyway).

>
>Cheers,
>-- 

Cheers
Sebastian
-
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux