Fan Zhang
e1d90eaa83
examples/vhost_crypto: fix zero copy
This patch fixes the zero copy enable problem for vhost crypto sample application. For some Crypto PMDs such as AESNI-MB and AESNI-GCM the data to be processed will be made a copy in the same buffer but next to the data. For example, to encrypt 64 bytes data the PMD will copy this data from offset 64 to offset 123. This requires the application provides the buffer with at least double of the data size. However there is no way for VMs to know this limitation. When zero-copy is enabled in Vhost the PMD may overwrite the buffer next to the VM data to be processed, and further cause problems such as Segmentation Fault or even worse, crashes the VM. To fix the problem the user should avoid enabling the zero copy for these Crypto PMDs. This patch adds the checking of the PMD names to see if zero copy can be applied. Fixes: 709521f4c2cd ("examples/vhost_crypto: support multi-core") Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
DPDK is a set of libraries and drivers for fast packet processing. It supports many processor architectures and both FreeBSD and Linux. The DPDK uses the Open Source BSD-3-Clause license for the core libraries and drivers. The kernel components are GPL-2.0 licensed. Please check the doc directory for release notes, API documentation, and sample application information. For questions and usage discussions, subscribe to: users@dpdk.org Report bugs and issues to the development mailing list: dev@dpdk.org
Description
Languages
C
99.1%
Meson
0.5%
Python
0.2%
Shell
0.1%