diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/ipv4_multicast/main.c | 2 | ||||
-rw-r--r-- | examples/vhost_crypto/main.c | 17 |
2 files changed, 17 insertions, 2 deletions
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c index 4073a490..428ca469 100644 --- a/examples/ipv4_multicast/main.c +++ b/examples/ipv4_multicast/main.c @@ -266,8 +266,6 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone) hdr->tx_offload = pkt->tx_offload; hdr->hash = pkt->hash; - hdr->ol_flags = pkt->ol_flags; - __rte_mbuf_sanity_check(hdr, 1); return hdr; } diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c index cbb5e49d..f08babd9 100644 --- a/examples/vhost_crypto/main.c +++ b/examples/vhost_crypto/main.c @@ -4,6 +4,7 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> #include <unistd.h> #include <stdbool.h> #include <assert.h> @@ -442,6 +443,9 @@ free_resource(void) struct lcore_option *lo = &options.los[i]; struct vhost_crypto_info *info = options.infos[i]; + if (!info) + continue; + rte_mempool_free(info->cop_pool); rte_mempool_free(info->sess_pool); @@ -493,6 +497,19 @@ main(int argc, char *argv[]) info->nb_vids = lo->nb_sockets; rte_cryptodev_info_get(info->cid, &dev_info); + if (options.zero_copy == RTE_VHOST_CRYPTO_ZERO_COPY_ENABLE) { +#define VHOST_CRYPTO_CDEV_NAME_AESNI_MB_PMD crypto_aesni_mb +#define VHOST_CRYPTO_CDEV_NAME_AESNI_GCM_PMD crypto_aesni_gcm + if (strstr(dev_info.driver_name, + RTE_STR(VHOST_CRYPTO_CDEV_NAME_AESNI_MB_PMD)) || + strstr(dev_info.driver_name, + RTE_STR(VHOST_CRYPTO_CDEV_NAME_AESNI_GCM_PMD))) + RTE_LOG(ERR, USER1, "Cannot enable zero-copy in %s\n", + dev_info.driver_name); + ret = -EPERM; + goto error_exit; + } + if (dev_info.max_nb_queue_pairs < info->qid + 1) { RTE_LOG(ERR, USER1, "Number of queues cannot over %u", dev_info.max_nb_queue_pairs); |