Re: [RFC 4/5] [crypto] geode: add fallback for unsupported modes.

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

 



* Herbert Xu | 2007-10-21 16:31:58 [+0800]:

>> +	if (type == CRYPTO_ALG_TYPE_BLKCIPHER) {
>> +		op->fallback.blk = crypto_alloc_blkcipher(name, 0,
>> +				CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK);
>> +
>> +	} else if (type == CRYPTO_ALG_TYPE_CIPHER) {
>> +		op->fallback.cip = crypto_alloc_cipher(name, 0,
>> +				CRYPTO_ALG_ASYNC | CRYPTO_ALG_NEED_FALLBACK);
>> +	} else {
>> +		printk(KERN_ERR "%s is neither a cipher nor a block cipher: %x\n",
>> +				name, type);
>> +		return -EINVAL;
>> +	}
>
>This looks really icky though.  Couldn't we just have different
>functions for each case (blkcipher vs. cipher)?
will take look.

>
>>  static struct crypto_alg geode_ecb_alg = {
>>  	.cra_name		=	"ecb(aes)",
>> -	.cra_driver_name	=	"ecb-aes-geode-128",
>> -	.cra_priority		=	400,
>> -	.cra_flags		=	CRYPTO_ALG_TYPE_BLKCIPHER,
>> +	.cra_driver_name	=	"ecb-aes-geode",
>> +	.cra_priority		=	300,
>
>What's with the priority decrease?
I don't know. I probably though lets make it 300 like the other one :).
Will revert.

>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