crypto/virtio: fix IV physical address
authorFan Zhang <roy.fan.zhang@intel.com>
Tue, 26 Jun 2018 02:10:48 +0000 (03:10 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Tue, 10 Jul 2018 22:57:51 +0000 (00:57 +0200)
commitb063e843fa03c6af076ae9f5bce73e97211d8989
treea65c4eb6078f35c5d79e8cd89ebe515b98f8778b
parent90f5eede124c6ffbe53095d573140ff0c5921213
crypto/virtio: fix IV physical address

The physical address of IV required by Virtio was computed using
crypto operations' physical address plus the offset. However not
all crypto ops will have physical address field initialized and
compute it runtimely is costly. This patch fixes this problem by
adding iv field in virtio_crypto_op_cookie and does a memcpy of
iv instead.

Fixes: 82adb12a1fce ("crypto/virtio: support burst enqueue/dequeue")
Cc: stable@dpdk.org
Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Reviewed-by: Jay Zhou <jianjay.zhou@huawei.com>
drivers/crypto/virtio/virtio_cryptodev.c
drivers/crypto/virtio/virtio_cryptodev.h
drivers/crypto/virtio/virtio_rxtx.c