summaryrefslogtreecommitdiff
path: root/examples/vhost_crypto
AgeCommit message (Collapse)Author
2019-03-30examples: detect default build directoryBruce Richardson
Most examples have in their makefiles a default RTE_TARGET directory to be used in case RTE_TARGET is not set. Rather than just using a hard-coded default, we can instead detect what the build directory is relative to RTE_SDK directory. This fixes a potential issue for anyone who continues to build using "make install T=x86_64-native-linuxapp-gcc" and skips setting RTE_TARGET explicitly, instead relying on the fact that they were building in a directory which corresponded to the example default path - which was changed to "x86_64-native-linux-gcc" by commit 218c4e68c1d9 ("mk: use linux and freebsd in config names"). Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-03-12mk: use linux and freebsd in config namesBruce Richardson
Rather than using linuxapp and bsdapp everywhere, we can change things to use the, more readable, terms "linux" and "freebsd" in our build configs. Rather than renaming the configs we can just duplicate the existing ones with the new names using symlinks, and use the new names exclusively internally. ["make showconfigs" also only shows the new names to keep the list short] The result is that backward compatibility is kept fully but any new builds or development can be done using the newer names, i.e. both "make config T=x86_64-native-linuxapp-gcc" and "T=x86_64-native-linux-gcc" work. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-03-12build/linux: rename macro from LINUXAPP to LINUXBruce Richardson
Rename the macro to make things shorter and more comprehensible. For both meson and make builds, keep the old macro around for backward compatibility. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-02-26examples/vhost_crypto: fix dependency on vhost libraryBruce Richardson
The vhost_crypto example app can't be used without the DPDK vhost library, so disable the build of the example if the lib hasn't been built. Fixes: f5188211c721 ("examples/vhost_crypto: add sample application") Cc: stable@dpdk.org Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-01-18examples/vhost_crypto: fix session private mempoolFan Zhang
This patch fixes the incorrect session private mempool passing to cryptodev. Fixes: ac5e42daca19 ("vhost/crypto: use separate session mempools") Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2019-01-10vhost/crypto: use separate session mempoolsFan Zhang
This patch uses the two session mempool approach to vhost crypto. One mempool is for session header objects, and the other is for session private data. Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2019-01-10cryptodev: change queue pair configure structureFan Zhang
This patch changes the cryptodev queue pair configure structure to enable two mempool passed into cryptodev PMD simutaneously. Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2018-12-13examples/vhost_crypto: fix bracketFan Zhang
This patch fixes a missed bracket bug in the code. Fixes: e1d90eaa83ff ("examples/vhost_crypto: fix zero copy") Cc: stable@dpdk.org Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-11-16examples/vhost_crypto: fix zero copyFan Zhang
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>
2018-10-22mk: build with _GNU_SOURCE defined by defaultAnatoly Burakov
We use _GNU_SOURCE all over the place, but often times we miss defining it, resulting in broken builds on musl. Rather than fixing every library's and driver's and application's makefile, fix it by simply defining _GNU_SOURCE by default for all builds. Remove all usages of _GNU_SOURCE in source files and makefiles, and also fixup a couple of instances of using __USE_GNU instead of _GNU_SOURCE. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
2018-09-14examples/vhost_crypto: support multi-coreFan Zhang
Originally vhost_crypto sample application only supports single core. This patch adds the multi-core support with more flexible options. Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
2018-07-12examples: make Linux environment check consistentThomas Monjalon
Some Makefiles are using CONFIG_RTE_EXEC_ENV and others are using CONFIG_RTE_EXEC_ENV_LINUXAPP. Use the latter one for consistency. We could remove CONFIG_RTE_EXEC_ENV later if considered useless. Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
2018-05-22cryptodev: rename functions to get session sizePablo de Lara
rte_cryptodev_get_header_session_size() and rte_cryptodev_get_private_session_size() functions are targeting symmetric sessions. With the future addition of asymmetric operations, these functions need to be renamed from *cryptodev_*_session_* to *cryptodev_sym_*_session_* to be symmetric specific. The two original functions are marked as deprecated and will be removed in 18.08, so applications can still use the functions in 18.05. Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> Acked-by: Shally Verma <shally.verma@caviumnetworks.com> Acked-by: Fiona Trahe <fiona.trahe@intel.com> Acked-by: Deepak Kumar Jain <deepak.k.jain@intel.com>
2018-04-14examples/vhost_crypto: add sample applicationFan Zhang
This patch adds vhost_crypto sample application to DPDK. Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com> Acked-by: Jay Zhou <jianjay.zhou@huawei.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>