Bug 148784 - Add support for VIA padlock in sys-fs/loop-aes
Bug#: 148784 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: enhancement Priority: P2
Resolution: FIXED Assigned To: genstef@gentoo.org Reported By: LittleThor@xsw.terminator.net
Component: Ebuilds
URL: 
Summary: Add support for VIA padlock in sys-fs/loop-aes
Keywords:  
Status Whiteboard: 
Opened: 2006-09-23 08:17 0000
Description:   Opened: 2006-09-23 08:17 0000
Please consider adding support for the VIA padlock hardware AES acceleration in
loop-aes. From the loop-aes README:

"If you want enable VIA padlock hardware AES xcrypt instructions, specify
PADLOCK=y on make command line. If enabled, presence of VIA padlock
instructions is detected at run time, but code still works on non-padlock
processors too."

I see two options here, either make PADLOCK=y the default (should still run on
other processors) or (probably more preferable) add a padlock USE flag and do
something like:

use padlock && BUILD_PARAMS="${BUILD_PARAMS} PADLOCK=y"

------- Comment #1 From Jakub Moc (RETIRED) 2006-09-23 10:59:09 0000 -------
*** This bug has been marked as a duplicate of 145537 ***

*** This bug has been marked as a duplicate of 145537 ***

------- Comment #2 From Robert Kerr 2006-09-23 11:41:19 0000 -------
Bug 145537 does not appear to be related?

Padlock support in loop-aes would neither use nor require support in openssl.

Upstream loop-aes already contains it's own padlock implementation as a compile
time option but the ebuild does not enable it. All that's needed is for the
ebuild to allow that compile time option to be set?

------- Comment #3 From Stefan Schweizer 2006-09-23 13:05:10 0000 -------
CCing main contributor for this :)

can you please contribute a patch?

------- Comment #4 From Alon Bar-Lev (RETIRED) 2006-09-23 13:49:52 0000 -------
Created an attachment (id=97891) [details]
loop-aes-3.1d.ebuild.diff

Sure!
Although I don't have the hardware to test it, it seems to work without the
hardware, but I notice a performance impact.

Add new use flag, padlock:
Use VIA padlock instructions, detected at run time, code still works on
non-padlock processors too.

------- Comment #5 From Robert Kerr 2006-09-24 03:55:46 0000 -------
Works great, thanks! Nearly triples the IO speed on a C7.

If you need any testing on this hardware in the future please feel free to CC
me.

------- Comment #6 From Stefan Schweizer 2006-10-04 08:51:42 0000 -------
thanks, fixed