How to enable hardware AES acceleration

This forum is for all other ARMv5 devices

How to enable hardware AES acceleration

Postby kuleszdl » Fri Dec 21, 2012 11:14 pm

Hi archers,

I recently bought a B04 pogoplug-box and installed arch on it just to find out that although it has two cores it is slower in transferring files to an externally attached, AES-encrypted harddrive than my existing NAS (Fujitsu Futro S300, Transmeta 800MHz, 256MB, eSata via PCI card, 100Mbit network). I tried with the same encryption parameters, filesystem etc. and got the following results:

Pogoplug B04: 3,8 MB/s
Futro S300: 4,2 MB/s

(CPU load is constantly at 100% and most time goes to kryptd which is doing the encryption.)

But maybe there is hope? It looks like the B04's cpu seems to support AES encryption in hardware, for which the "mv_cesa" module is required:

http://forum.doozan.com/read.php?2,3389,3397

Unfortunately, the module does not come by default, I did not find the module in the 2.6.31.6 kernel source (was it available back then at all?) and I don't get a 3.2 kernel booted although I installed the "linux-kirkwood" package. Yes, I've seen this thread here already:

viewtopic.php?f=29&t=4703

But still I am confused. Is there some easy way to get the mv_cesa module loaded in the 2.6.31.6 kernel? Would backporting be required? Does the 3.2 kernel work at all (without sata booting) on the B04?

Many thanks!
kuleszdl
 
Posts: 22
Joined: Fri Dec 21, 2012 11:01 pm

Re: How to enable hardware AES acceleration

Postby xenoxaos » Fri Dec 21, 2012 11:51 pm

Actually, the mv_cesa module is for Marvell chipsets (the oxnas is from PLX). There IS however a hardware encryption engine on that SoC, it's just not implemented. The documentation on that is also kinda spotty.

BTW, the kirkwood kernel won't boot on this either.
Arch Linux ARM exists and continues to grow through community support, please donate today!
xenoxaos
Developer
 
Posts: 323
Joined: Thu Jan 06, 2011 1:45 am

Re: How to enable hardware AES acceleration

Postby kuleszdl » Sat Dec 22, 2012 12:13 am

Many thanks! Actually, it's good to know that there is currently no way to getting it to work so I can waste my time with something else...

By the way, I've done a benchmark with encryption disabled and I am getting just 5.1 MB/s - is this gadget really that slow?

I also thought about plugging in the drive directly to the sata port (since it's a eSata/usb drive), but reading from lsusb it does not seem to have native SATA, but just another emulation layer on top of USB. Is this true?:

$this->bbcode_second_pass_code('', 'Bus 001 Device 005: ID 152d:2338 JMicron Technology Corp. / JMicron USA Technology Corp. JM20337 Hi-Speed USB to SATA & PATA Combo Bridge
')
kuleszdl
 
Posts: 22
Joined: Fri Dec 21, 2012 11:01 pm

Re: How to enable hardware AES acceleration

Postby xenoxaos » Sat Dec 22, 2012 12:16 am

SATA is native and you can get upwards of 70MB/s transfer rates. It doesn't show up under lsusb or lspci as it's not on the usb or pci bus. Now, if you're transferring to some filesystems, say NTFS, your transfer rates will be poor because NTFS is fairly CPU heavy.
Arch Linux ARM exists and continues to grow through community support, please donate today!
xenoxaos
Developer
 
Posts: 323
Joined: Thu Jan 06, 2011 1:45 am

Re: How to enable hardware AES acceleration

Postby kuleszdl » Sat Dec 22, 2012 12:42 am

Okay...maybe I'm too curious, but why is this "USB to SATA & PATA Combo Bridge" adapter appearing then in "lsusb"?

And no, I was doing transfers to ext3 filesystems (even without partitions, having the partition directly on the drive).
kuleszdl
 
Posts: 22
Joined: Fri Dec 21, 2012 11:01 pm

Re: How to enable hardware AES acceleration

Postby karog » Sat Dec 22, 2012 12:58 am

$this->bbcode_second_pass_quote('kuleszdl', 'O')kay...maybe I'm too curious, but why is this "USB to SATA & PATA Combo Bridge" adapter appearing then in "lsusb"?

That is probably in your external drive.
karog
 
Posts: 305
Joined: Thu Jan 05, 2012 7:55 pm

Re: How to enable hardware AES acceleration

Postby kuleszdl » Sat Dec 22, 2012 1:02 am

$this->bbcode_second_pass_quote('karog', 'T')hat is probably in your external drive.


Oops indeed, you are right of course.
kuleszdl
 
Posts: 22
Joined: Fri Dec 21, 2012 11:01 pm


Return to Community Supported

Who is online

Users browsing this forum: No registered users and 62 guests