Hi,

I used below ugly way to benchmark the performance roughly. In POC,
confirmed the hardware crypto engine is the bottleneck and  not very
fast
for packet not over than 1500 bytes. Overhead is required for queuing
the data to crypto engine and sending data back to kernel.

        ktime_get_real_ts64(&init_time);
        ret = crypto_wait_req(crypto_aead_encrypt(req), &wait);
        ktime_get_real_ts64(&comp_time);

        init_usecs  = (init_time.tv_sec * 1000 * 1000) +
(init_time.tv_nsec / 1000);
        comp_usecs  = (comp_time.tv_sec * 1000 * 1000) +
(comp_time.tv_nsec / 1000);
        delta_usecs += comp_usecs - init_usecs;

        total_size += skb->len - head_size;
        if(total_size > 100000000){
                mbits = total_size * 8;
                printk("total_size is %u bytes, time is %u, the rate
is %u\n", total_size, delta_usecs,  mbits/delta_usecs);
                total_size = 0;
                delta_usecs = 0;
        }

......
......
Tony

Tony He <huangy...@gmail.com> 于2022年4月2日周六 17:40写道:
>
> Hi Antonio,
>
> I am porting ovpn-dco to embedded ARMv8 device with hardware crypto
> engine. However the performance is not very good.
> It's about 130-140Mbps. I expect more. The SDK already provides kernel
> CryptoAPI(CFI) interface  to access the crypto engine.
> I want to know if the crypto operation is the bottleneck. Do you know
> how to benchmark crypto performance in the kernel space?
> Any advice is welcome. Thank you!
>
> Tony


_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to