Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [crypto] [marvell-cesa] Possible regression after Linux 4.7
@ 2016-10-31 13:59 radioconfusion at gmail.com
  2016-11-03 13:57 ` Romain Perier
  0 siblings, 1 reply; 7+ messages in thread
From: radioconfusion at gmail.com @ 2016-10-31 13:59 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,
Fri, 09 Sep 2016 10:24:50 +0300, radioconfusion at gmail.com wrote:
> Thu,  8 Sep 2016 16:52:16 +0200, Romain Perier wrote:
> > > Hello,
> > >
> > > I'm testing the marvell-cesa -driver on Armada 385 board and I think I've found
> > > a regression between Linux 4.7 and 4.8-rc4.
> > > I want to accelerate my curl connections. So I compiled the 4.8-rc4 with
> > > marvell-cesa enabled and HEAD revision of cryptodev-linux.
> > >
> > > Here is my output:
> > >
> > > ~# uname -r
> > > 4.8.0-rc4
> > > ~# modprobe cryptodev
> > > ~# modprobe marvell-cesa
> > > ~# curl -k --ciphers AES256-SHA256 https://myserver/myfile >/dev/null
> > >    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
> > >                                   Dload  Upload   Total   Spent    Left  Speed
> > >   19  200M   19 39.7M    0     0  16.2M      0  0:00:12  0:00:02  0:00:10 16.2M
> > > curl: (56) SSL read: error:1408F119:SSL routines:SSL3_GET_RECORD:decryption
> > > failed or bad record mac, errno 0
> > >
> --- snip ---
> >
> > Thank you for your feedbacks.
> > I can reproduce the issue with and without multiple engines.

I can still reproduce the issue with Linux 4.9-rc3 (2a26d99b251b8625d27aed14e97fc10707a3a81f)

> > However, I have found an interesting thing, If I use only --ciphers
> > AES256, it works perfectly fine, could you confirm this ?
>
> Yes, I can confirm. And I have found the reason too.
> Most of available ciphers will not be accelerated at all.
> Only these ones I have verified to be accelerated by cesa:
> AES256-SHA256
> AES256-SHA
> AES128-SHA256
> AES128-SHA
>
> When cesa is working, I can see "irq/42-f1090000" on process list of top(1) and
> curl doesn't take all of available cpu.
>
--- snip ---

> > In any case, I will investigate.

Do you have any improvement for the issue?
Please let me know if you need any help to resolve it.

Best Regards,
Jussi

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [crypto] [marvell-cesa] Possible regression after Linux 4.7
@ 2016-11-07  8:53 radioconfusion at gmail.com
  0 siblings, 0 replies; 7+ messages in thread
From: radioconfusion at gmail.com @ 2016-11-07  8:53 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

Thu, 3 Nov 2016 14:57:06 +0100, Romain Perier wrote:
>
> > Do you have any improvement for the issue?
> > Please let me know if you need any help to resolve it.
> >
> > Best Regards,
> > Jussi
> >
>
> Sorry for the delay.
> Could you try to revert locally commit
> 2786cee8e50bb4b4303dc22665f391b72318fa84 (crypto: marvell - Move SRAM
> I/O operations to step functions) ?
>
> It seems to fix most of the issues I had with curl.
> I will continue to investigate, that's just to confirm if it fixes the
> issues for you.
>

Thanks for this suggestion.
Unfortunately, I didn't get improvements using curl with this revertion.

Thanks for your investigation. Waiting for your input.

Best Regards,
Jussi

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [crypto] [marvell-cesa] Possible regression after Linux 4.7
@ 2016-09-09  7:24 radioconfusion at gmail.com
  0 siblings, 0 replies; 7+ messages in thread
From: radioconfusion at gmail.com @ 2016-09-09  7:24 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,
Thu,  8 Sep 2016 16:52:16 +0200, Romain Perier wrote:
> > Hello,
> >
> > I'm testing the marvell-cesa -driver on Armada 385 board and I think I've found
> > a regression between Linux 4.7 and 4.8-rc4.
> > I want to accelerate my curl connections. So I compiled the 4.8-rc4 with
> > marvell-cesa enabled and HEAD revision of cryptodev-linux.
> >
> > Here is my output:
> >
> > ~# uname -r
> > 4.8.0-rc4
> > ~# modprobe cryptodev
> > ~# modprobe marvell-cesa
> > ~# curl -k --ciphers AES256-SHA256 https://myserver/myfile >/dev/null
> >    % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
> >                                   Dload  Upload   Total   Spent    Left  Speed
> >   19  200M   19 39.7M    0     0  16.2M      0  0:00:12  0:00:02  0:00:10 16.2M
> > curl: (56) SSL read: error:1408F119:SSL routines:SSL3_GET_RECORD:decryption
> > failed or bad record mac, errno 0
> >
--- snip ---
>
> Thank you for your feedbacks.
> I can reproduce the issue with and without multiple engines.

Thank you for your testing. Do you mean that you can reproduce it with
Linux 4.7 too?

> However, I have found an interesting thing, If I use only --ciphers
> AES256, it works perfectly fine, could you confirm this ?

Yes, I can confirm. And I have found the reason too.
Most of available ciphers will not be accelerated at all.
Only these ones I have verified to be accelerated by cesa:
AES256-SHA256
AES256-SHA
AES128-SHA256
AES128-SHA

When cesa is working, I can see "irq/42-f1090000" on process list of top(1) and
curl doesn't take all of available cpu.

It's not easy to detect acceleration by performance because I tested with
Linux 4.7 and older cryptodev (1.8 release) and I got average curl throughput
~22 MiB/s with AES256-SHA256 + cesa. Without cesa I got ~20 MiB/s average with
same configuration.

> In any case, I will investigate.

Thank you very much.

Best Regards,
Jussi

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [crypto] [marvell-cesa] Possible regression after Linux 4.7
@ 2016-09-06  5:27 radioconfusion at gmail.com
  2016-09-08 14:52 ` Romain Perier
  0 siblings, 1 reply; 7+ messages in thread
From: radioconfusion at gmail.com @ 2016-09-06  5:27 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

I'm testing the marvell-cesa -driver on Armada 385 board and I think I've found
a regression between Linux 4.7 and 4.8-rc4.
I want to accelerate my curl connections. So I compiled the 4.8-rc4 with
marvell-cesa enabled and HEAD revision of cryptodev-linux.

Here is my output:

~# uname -r
4.8.0-rc4
~# modprobe cryptodev
~# modprobe marvell-cesa
~# curl -k --ciphers AES256-SHA256 https://myserver/myfile >/dev/null
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 19  200M   19 39.7M    0     0  16.2M      0  0:00:12  0:00:02  0:00:10 16.2M
curl: (56) SSL read: error:1408F119:SSL routines:SSL3_GET_RECORD:decryption
failed or bad record mac, errno 0

This error is quite easy to reproduce. Especially if you have some other
connections open at same time or two simultaneous curl-connections.
I had a ssh-connection running top(1).

I can not reproduce this with Linux 4.7 or without modprobing marvell-cesa.

I'm not using any special kernel parameter, patches, custom dts, etc.

Best Regards,
Jussi

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-12-05  9:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-31 13:59 [crypto] [marvell-cesa] Possible regression after Linux 4.7 radioconfusion at gmail.com
2016-11-03 13:57 ` Romain Perier
2016-12-05  9:19   ` Romain Perier
  -- strict thread matches above, loose matches on Subject: below --
2016-11-07  8:53 radioconfusion at gmail.com
2016-09-09  7:24 radioconfusion at gmail.com
2016-09-06  5:27 radioconfusion at gmail.com
2016-09-08 14:52 ` Romain Perier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox