SG-3100 No openssl hw crypto accel



  • I ran a few tests to check, but unfortunately I don't have my 2.4.5 results to compare to; however, I believe they were much higher than this.

    I imagine this is related to this bug: https://redmine.pfsense.org/issues/9646

    However, I couldn't get a good read from that ticket (or the mailing lists) on what the next step is since it seems to lean heavily towards "AES-NI is supported automatically", but doesn't address CESA/BSD crypto dev support (e.g. for ARM6/7 systems).

    Sys Info:

    [2.5.0-DEVELOPMENT][root@pfSense.home]/: uname -a
    FreeBSD pfSense.home 12.1-STABLE FreeBSD 12.1-STABLE 45a2df114fa(factory-devel-12) pfSense-SG-3100  arm
    
    [2.5.0-DEVELOPMENT][root@pfSense.home]/: kldstat
    Id Refs Address        Size Name
     1    5 0xc0000000  1e30378 kernel
     2    1 0xdec00000     8000 cryptodev.ko
    

    openssl engines:

    [2.5.0-DEVELOPMENT][root@pfSense.home]/: openssl engine -t -c -pre DUMP_INFO
    (dynamic) Dynamic engine loading support
    [Failure]: DUMP_INFO
    542543872:error:260AC089:engine routines:int_ctrl_helper:invalid cmd name:/build/factory-crossbuild-master-armv7/sources/FreeBSD-src/crypto/openssl/crypto/engine/eng_ctrl.c:87:
    542543872:error:260AB089:engine routines:ENGINE_ctrl_cmd_string:invalid cmd name:/build/factory-crossbuild-master-armv7/sources/FreeBSD-src/crypto/openssl/crypto/engine/eng_ctrl.c:255:
         [ unavailable ]
    

    openssl aes test:

    [2.5.0-DEVELOPMENT][root@pfSense.home]/: openssl speed -evp aes-128-cbc
    Doing aes-128-cbc for 3s on 16 size blocks: 7983903 aes-128-cbc's in 3.07s
    ...
    Doing aes-128-cbc for 3s on 16384 size blocks: 10307 aes-128-cbc's in 2.96s
    OpenSSL 1.1.1g-freebsd  21 Apr 2020
    built on: reproducible build, date unspecified
    options:bn(64,32) rc4(int) des(long) aes(partial) idea(int) blowfish(ptr)
    compiler: clang
    The 'numbers' are in 1000s of bytes per second processed.
    type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
    aes-128-cbc      41605.68k    52626.30k    57610.94k    56982.35k    58536.69k    57032.57k
    

    (For fun, i did the env trick to disable AES-NI, and re-ran it...no change as you can imagine since ARMv6/7 does not support AES-NI)



  • [2.4.5-RELEASE][root@pfsense.local.lan]/root: openssl speed -evp aes-128-cbc
    Doing aes-128-cbc for 3s on 16 size blocks: 199640 aes-128-cbc's in 0.19s
    Doing aes-128-cbc for 3s on 64 size blocks: 215441 aes-128-cbc's in 0.14s
    Doing aes-128-cbc for 3s on 256 size blocks: 187886 aes-128-cbc's in 0.16s
    Doing aes-128-cbc for 3s on 1024 size blocks: 149849 aes-128-cbc's in 0.11s
    Doing aes-128-cbc for 3s on 8192 size blocks: 39862 aes-128-cbc's in 0.02s
    OpenSSL 1.0.2u-freebsd  20 Dec 2019
    built on: date not available
    options:bn(64,32) rc4(idx,int) des(ptr,risc1,16,long) aes(partial) idea(int) blowfish(idx)
    compiler: clang
    The 'numbers' are in 1000s of bytes per second processed.
    type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes
    aes-128-cbc      17035.95k    98049.59k   293173.74k  1402929.15k 20899168.26k
    
    [2.4.5-RELEASE][root@pfsense.local.lan]/root: openssl engine -t -c -pre DUMP_INFO
    (cryptodev) BSD cryptodev engine
    [Failure]: DUMP_INFO
    542513824:error:260AC089:engine routines:INT_CTRL_HELPER:invalid cmd name:/build/factory-crossbuild-245-armv6/sources/FreeBSD-src/crypto/openssl/crypto/engine/eng_ctrl.c:131:
    542513824:error:260AB089:engine routines:ENGINE_ctrl_cmd_string:invalid cmd name:/build/factory-crossbuild-245-armv6/sources/FreeBSD-src/crypto/openssl/crypto/engine/eng_ctrl.c:311:
     [RSA, DSA, DH, DES-CBC, DES-EDE3-CBC, AES-128-CBC, AES-192-CBC, AES-256-CBC]
         [ available ]
    (dynamic) Dynamic engine loading support
    [Failure]: DUMP_INFO
    542513824:error:260AC089:engine routines:INT_CTRL_HELPER:invalid cmd name:/build/factory-crossbuild-245-armv6/sources/FreeBSD-src/crypto/openssl/crypto/engine/eng_ctrl.c:131:
    542513824:error:260AB089:engine routines:ENGINE_ctrl_cmd_string:invalid cmd name:/build/factory-crossbuild-245-armv6/sources/FreeBSD-src/crypto/openssl/crypto/engine/eng_ctrl.c:311:
         [ unavailable ]
    
    [2.4.5-RELEASE][root@pfsense.local.lan]/root: kldstat
    Id Refs Address    Size     Name
     1    1 0xc0000000 1bd2740  kernel
    [2.4.5-RELEASE][root@pfsense.local.lan]/root: uname -a
    FreeBSD pfsense.local.lan 11.3-STABLE FreeBSD 11.3-STABLE #238 885b1ed26b6(factory-RELENG_2_4_5): Tue Jun  2 17:52:40 EDT 2020     root@buildbot1-nyi.netgate.com:/build/factory-crossbuild-245-armv6/obj/armv6/kJlGauaG/arm.armv6/build/factory-crossbuild-245-armv6/sources/FreeBSD-src/sys/pfSense-SG-3100  arm
    

Log in to reply