DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/af_packet: fix fd use after free
From: Timmons C. Player @ 2017-01-05 14:33 UTC (permalink / raw)
  To: linville; +Cc: dev, Timmons C. Player

When using the same file descriptor for both rx and tx, the
eth_dev_stop function would close the same fd twice.   This
change prevents that from happening.

Signed-off-by: Timmons C. Player <timmons.player@spirent.com>
---
 drivers/net/af_packet/rte_eth_af_packet.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c
index 2951f86..c44b8b9 100644
--- a/drivers/net/af_packet/rte_eth_af_packet.c
+++ b/drivers/net/af_packet/rte_eth_af_packet.c
@@ -261,9 +261,16 @@ eth_dev_stop(struct rte_eth_dev *dev)
 		sockfd = internals->rx_queue[i].sockfd;
 		if (sockfd != -1)
 			close(sockfd);
-		sockfd = internals->tx_queue[i].sockfd;
-		if (sockfd != -1)
-			close(sockfd);
+
+		/* Prevent use after free in case tx fd == rx fd */
+		if (sockfd != internals->tx_queue[i].sockfd) {
+			sockfd = internals->tx_queue[i].sockfd;
+			if (sockfd != -1)
+				close(sockfd);
+		}
+
+		internals->rx_queue[i].sockfd = -1;
+		internals->tx_queue[i].sockfd = -1;
 	}
 
 	dev->data->dev_link.link_status = ETH_LINK_DOWN;
-- 
2.7.4

^ permalink raw reply related

* Re: [PATCH v1] doc: announce API and ABI change for ethdev
From: Iremonger, Bernard @ 2017-01-05 14:40 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev@dpdk.org, Mcnamara, John
In-Reply-To: <3085992.4K2P9mV14s@xps13>

Hi Thomas,

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Thursday, January 5, 2017 1:31 PM
> To: Iremonger, Bernard <bernard.iremonger@intel.com>
> Cc: dev@dpdk.org; Mcnamara, John <john.mcnamara@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v1] doc: announce API and ABI change for
> ethdev
> 
> 2017-01-05 10:44, Bernard Iremonger:
> > In 17.05 nine rte_eth_dev_* functions will be removed from
> > librte_ether, renamed and moved to the ixgbe PMD.
> 
> I agree it is a good move to clean up ethdev API.
> 
> > --- a/doc/guides/rel_notes/deprecation.rst
> > +++ b/doc/guides/rel_notes/deprecation.rst
> > +* ethdev: for 17.05 it is planned to deprecate the following nine
> > +rte_eth_dev_* functions
> > +  and move them into the ixgbe PMD:
> > +
> > +  ``rte_eth_dev_bypass_init``
> > +
> > +  ``rte_eth_dev_bypass_state_set``
> > +
> > +  ``rte_eth_dev_bypass_state_show``
> > +
> > +  ``rte_eth_dev_bypass_event_store``
> > +
> > +  ``rte_eth_dev_bypass_event_show``
> > +
> > +  ``rte_eth_dev_wd_timeout_store``
> > +
> > +  ``rte_eth_dev_bypass_wd_timeout_show``
> > +
> > +  ``rte_eth_dev_bypass_ver_show``
> > +
> > +  ``rte_eth_dev_bypass_wd_reset``
> > +
> > +  The following fields will be removed from ``struct eth_dev_ops``:
> > +
> > +  ``bypass_init_t``
> > +
> > +  ``bypass_state_set_t``
> > +
> > +  ``bypass_state_show_t``
> > +
> > +  ``bypass_event_set_t``
> > +
> > +  ``bypass_event_show_t``
> > +
> > +  ``bypass_wd_timeout_set_t``
> > +
> > +  ``bypass_wd_timeout_show_t``
> > +
> > +  ``bypass_ver_show_t``
> > +
> > +  ``bypass_wd_reset_t``
> > +
> > +  The functions will be renamed to the following, and moved to the
> ``ixgbe`` PMD:
> > +
> > +  ``rte_pmd_ixgbe_bypass_init``
> > +
> > +  ``rte_pmd_ixgbe_bypass_state_set``
> > +
> > +  ``rte_pmd_ixgbe_bypass_state_show``
> > +
> > +  ``rte_pmd_ixgbe_bypass_event_set``
> > +
> > +  ``rte_pmd_ixgbe_bypass_event_show``
> > +
> > +  ``rte_pmd_ixgbe_bypass_wd_timeout_set``
> > +
> > +  ``rte_pmd_ixgbe_bypass_wd_timeout_show``
> > +
> > +  ``rte_pmd_ixgbe_bypass_ver_show``
> > +
> > +  ``rte_pmd_ixgbe_bypass_wd_reset``
> >
> 
> Please could you make it shorter by using commas for listing?

I will use commas for the listing in v2.

Regards,

Bernard.

^ permalink raw reply

* Re: [PATCH] crypto/qat: add scatter gather option to QAT feature flags
From: Trahe, Fiona @ 2017-01-05 14:43 UTC (permalink / raw)
  To: Kusztal, ArkadiuszX, dev@dpdk.org
  Cc: De Lara Guarch, Pablo, Griffin, John, Trahe, Fiona,
	Jain, Deepak K
In-Reply-To: <1483519052-8189-1-git-send-email-arkadiuszx.kusztal@intel.com>



> -----Original Message-----
> From: Kusztal, ArkadiuszX
> Sent: Wednesday, January 4, 2017 8:38 AM
> To: dev@dpdk.org
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Griffin, John <john.griffin@intel.com>;
> Jain, Deepak K <deepak.k.jain@intel.com>; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal@intel.com>
> Subject: [PATCH] crypto/qat: add scatter gather option to QAT feature flags
> 
> This commit adds scatter gather option to Intel(R) QuickAssist
> Technology driver feature flags.
> 
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>

^ permalink raw reply

* [PATCH v2 0/4] Introduce new performance test application
From: Slawomir Mrozowicz @ 2017-01-05 16:49 UTC (permalink / raw)
  To: dev; +Cc: Slawomir Mrozowicz
In-Reply-To: <1480691702-4600-1-git-send-email-michalx.k.jastrzebski@intel.com>

This patchset introduce new application which allows measuring
performance parameters of PMDs available in crypto tree. The goal of
this application is to replace existing performance tests in app/test.
Parameters available are: throughput (--ptest throughput) and latency
(--ptest latency). User can use multiply cores to run tests on but only
one type of crypto PMD can be measured during single application
execution. Cipher parameters, type of device, type of operation and
chain mode have to be specified in the command line as application
parameters. These parameters are checked using device capabilities
structure. 
Couple of new library functions in librte_cryptodev are introduced for
application use.
There added also EAL option to suppresses all log output to stdout.
To build the application a CONFIG_RTE_APP_CRYPTO_PERF flag has to be set
(it is set by default).
Example of usage: -c 0xc0 --vdev crypto_aesni_mb_pmd -w 0000:00:00.0 --
--ptest throughput --devtype crypto_aesni_mb --optype cipher-then-auth
--cipher-algo aes-cbc --cipher-op encrypt --cipher-key-sz 16 --auth-algo
sha1-hmac --auth-op generate --auth-key-sz 64 --auth-digest-sz 12
--total-ops 10000000 --burst-sz 32 --buffer-sz 64

Declan Doherty (3)
  eal: add quiet mode to suppress log output to stdout
  lib/librte_cryptodev: functions for new performance test application
  app/crypto-perf: introduce new performance test application

Slawomir Mrozowicz (2):
  lib/librte_cryptodev: functions for new performance test application
  app/crypto-perf: introduce new performance test application

Marcin Kerlin (2)
  lib/librte_cryptodev: functions for new performance test application
  app/crypto-perf: introduce new performance test application

Piotr Azarewicz (1)
  app/crypto-perf: introduce new performance test application

Michal Kobylinski (1)
  app/crypto-perf: introduce new performance test application

 MAINTAINERS                                     |   4 +
 app/Makefile                                    |   1 +
 app/crypto-perf/Makefile                        |  51 ++
 app/crypto-perf/cperf.h                         |  58 ++
 app/crypto-perf/cperf_ops.c                     | 474 +++++++++++++
 app/crypto-perf/cperf_ops.h                     |  66 ++
 app/crypto-perf/cperf_options.h                 | 104 +++
 app/crypto-perf/cperf_options_parsing.c         | 875 ++++++++++++++++++++++++
 app/crypto-perf/cperf_test_latency.c            | 685 +++++++++++++++++++
 app/crypto-perf/cperf_test_latency.h            |  57 ++
 app/crypto-perf/cperf_test_throughput.c         | 651 ++++++++++++++++++
 app/crypto-perf/cperf_test_throughput.h         |  58 ++
 app/crypto-perf/cperf_test_vector_parsing.c     | 500 ++++++++++++++
 app/crypto-perf/cperf_test_vector_parsing.h     |  73 ++
 app/crypto-perf/cperf_test_vectors.c            | 476 +++++++++++++
 app/crypto-perf/cperf_test_vectors.h            |  98 +++
 app/crypto-perf/cperf_verify_parser.c           | 314 +++++++++
 app/crypto-perf/data/aes_cbc_128_sha.data       | 503 ++++++++++++++
 app/crypto-perf/data/aes_cbc_192_sha.data       | 504 ++++++++++++++
 app/crypto-perf/data/aes_cbc_256_sha.data       | 504 ++++++++++++++
 app/crypto-perf/main.c                          | 411 +++++++++++
 config/common_base                              |   6 +
 doc/guides/rel_notes/release_17_02.rst          |   5 +
 doc/guides/tools/cryptoperf.rst                 | 397 +++++++++++
 doc/guides/tools/index.rst                      |   1 +
 lib/librte_cryptodev/rte_crypto_sym.h           |  16 +
 lib/librte_cryptodev/rte_cryptodev.c            | 181 +++++
 lib/librte_cryptodev/rte_cryptodev.h            | 121 ++--
 lib/librte_cryptodev/rte_cryptodev_version.map  |  10 +
 lib/librte_eal/common/eal_common_log.c          |  13 +
 lib/librte_eal/common/eal_common_options.c      |  10 +-
 lib/librte_eal/common/eal_options.h             |   2 +
 lib/librte_eal/common/include/rte_log.h         |  15 +
 lib/librte_eal/linuxapp/eal/eal_log.c           |   8 +-
 lib/librte_eal/linuxapp/eal/rte_eal_version.map |   8 +
 35 files changed, 7209 insertions(+), 51 deletions(-)
 create mode 100644 app/crypto-perf/Makefile
 create mode 100644 app/crypto-perf/cperf.h
 create mode 100644 app/crypto-perf/cperf_ops.c
 create mode 100644 app/crypto-perf/cperf_ops.h
 create mode 100644 app/crypto-perf/cperf_options.h
 create mode 100644 app/crypto-perf/cperf_options_parsing.c
 create mode 100644 app/crypto-perf/cperf_test_latency.c
 create mode 100644 app/crypto-perf/cperf_test_latency.h
 create mode 100644 app/crypto-perf/cperf_test_throughput.c
 create mode 100644 app/crypto-perf/cperf_test_throughput.h
 create mode 100644 app/crypto-perf/cperf_test_vector_parsing.c
 create mode 100644 app/crypto-perf/cperf_test_vector_parsing.h
 create mode 100644 app/crypto-perf/cperf_test_vectors.c
 create mode 100644 app/crypto-perf/cperf_test_vectors.h
 create mode 100644 app/crypto-perf/cperf_verify_parser.c
 create mode 100644 app/crypto-perf/data/aes_cbc_128_sha.data
 create mode 100644 app/crypto-perf/data/aes_cbc_192_sha.data
 create mode 100644 app/crypto-perf/data/aes_cbc_256_sha.data
 create mode 100644 app/crypto-perf/main.c
 create mode 100644 doc/guides/tools/cryptoperf.rst

-- 
2.5.0

^ permalink raw reply

* [PATCH v2 1/3] eal: add quiet mode to suppress log output to stdout
From: Slawomir Mrozowicz @ 2017-01-05 16:49 UTC (permalink / raw)
  To: dev; +Cc: Slawomir Mrozowicz, Declan Doherty
In-Reply-To: <1483635001-15473-1-git-send-email-slawomirx.mrozowicz@intel.com>

Add EAL option to suppresses all log output to stdout.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
---
 lib/librte_eal/common/eal_common_log.c          | 13 +++++++++++++
 lib/librte_eal/common/eal_common_options.c      | 10 +++++++++-
 lib/librte_eal/common/eal_options.h             |  2 ++
 lib/librte_eal/common/include/rte_log.h         | 15 +++++++++++++++
 lib/librte_eal/linuxapp/eal/eal_log.c           |  8 +++++---
 lib/librte_eal/linuxapp/eal/rte_eal_version.map |  8 ++++++++
 6 files changed, 52 insertions(+), 4 deletions(-)

diff --git a/lib/librte_eal/common/eal_common_log.c b/lib/librte_eal/common/eal_common_log.c
index e45d326..701b309 100644
--- a/lib/librte_eal/common/eal_common_log.c
+++ b/lib/librte_eal/common/eal_common_log.c
@@ -45,6 +45,7 @@
 struct rte_logs rte_logs = {
 	.type = ~0,
 	.level = RTE_LOG_DEBUG,
+	.silent = 0,
 	.file = NULL,
 };
 
@@ -87,6 +88,18 @@ rte_get_log_level(void)
 	return rte_logs.level;
 }
 
+void
+rte_log_silence_stdout(void)
+{
+	rte_logs.silent = 1;
+}
+
+int
+rte_log_stdout_silent(void)
+{
+	return rte_logs.silent;
+}
+
 /* Set global log type */
 void
 rte_set_log_type(uint32_t type, int enable)
diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c
index 611e581..c47e02b 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -69,6 +69,7 @@ eal_short_options[] =
 	"r:" /* memory ranks */
 	"v"  /* version */
 	"w:" /* pci-whitelist */
+	"s"  /* silence log output to stdout */
 	;
 
 const struct option
@@ -95,6 +96,7 @@ eal_long_options[] = {
 	{OPT_VFIO_INTR,         1, NULL, OPT_VFIO_INTR_NUM        },
 	{OPT_VMWARE_TSC_MAP,    0, NULL, OPT_VMWARE_TSC_MAP_NUM   },
 	{OPT_XEN_DOM0,          0, NULL, OPT_XEN_DOM0_NUM         },
+	{OPT_LOG_STDOUT_SILENT, 0, NULL, OPT_LOG_STDOUT_SILENT_NUM },
 	{0,                     0, NULL, 0                        }
 };
 
@@ -844,6 +846,9 @@ eal_parse_common_option(int opt, const char *optarg,
 		 * even if info or warning messages are disabled */
 		RTE_LOG(CRIT, EAL, "RTE Version: '%s'\n", rte_version());
 		break;
+	case 's':
+		rte_log_silence_stdout();
+		break;
 
 	/* long options */
 	case OPT_HUGE_UNLINK_NUM:
@@ -1055,9 +1060,12 @@ eal_common_usage(void)
 	       "  -d LIB.so|DIR       Add a driver or driver directory\n"
 	       "                      (can be used multiple times)\n"
 	       "  --"OPT_VMWARE_TSC_MAP"    Use VMware TSC map instead of native RDTSC\n"
-	       "  --"OPT_PROC_TYPE"         Type of this process (primary|secondary|auto)\n"
+		"  --"OPT_PROC_TYPE"         Type of this process "
+		"(primary|secondary|auto)\n"
 	       "  --"OPT_SYSLOG"            Set syslog facility\n"
 	       "  --"OPT_LOG_LEVEL"         Set default log level\n"
+		"  -s, --"OPT_LOG_STDOUT_SILENT" Silent mode, suppresses log "
+		"output to stdout\n"
 	       "  -v                  Display version information on startup\n"
 	       "  -h, --help          This help\n"
 	       "\nEAL options for DEBUG use only:\n"
diff --git a/lib/librte_eal/common/eal_options.h b/lib/librte_eal/common/eal_options.h
index a881c62..bd9778f 100644
--- a/lib/librte_eal/common/eal_options.h
+++ b/lib/librte_eal/common/eal_options.h
@@ -41,6 +41,8 @@ enum {
 	OPT_PCI_BLACKLIST_NUM   = 'b',
 #define OPT_PCI_WHITELIST     "pci-whitelist"
 	OPT_PCI_WHITELIST_NUM   = 'w',
+#define OPT_LOG_STDOUT_SILENT  "log-stdout-silent"
+	OPT_LOG_STDOUT_SILENT_NUM   = 's',
 
 	/* first long only option value must be >= 256, so that we won't
 	 * conflict with short options */
diff --git a/lib/librte_eal/common/include/rte_log.h b/lib/librte_eal/common/include/rte_log.h
index 671e274..3898676 100644
--- a/lib/librte_eal/common/include/rte_log.h
+++ b/lib/librte_eal/common/include/rte_log.h
@@ -54,6 +54,7 @@ extern "C" {
 struct rte_logs {
 	uint32_t type;  /**< Bitfield with enabled logs. */
 	uint32_t level; /**< Log level. */
+	uint32_t silent; /**< silence logging to stdout */
 	FILE *file;     /**< Output file set by rte_openlog_stream, or NULL. */
 };
 
@@ -132,6 +133,20 @@ void rte_set_log_level(uint32_t level);
 uint32_t rte_get_log_level(void);
 
 /**
+ * Silence output to stdout by logging facilities
+ */
+void rte_log_silence_stdout(void);
+
+/**
+ * Check if echoing log output to stdout is enabled.
+ *
+ * @return
+ * - Returns 0 if echoing to logging to stdout is enabled
+ * - Returns 1 if logging is in silent mode
+ */
+int rte_log_stdout_silent(void);
+
+/**
  * Enable or disable the log type.
  *
  * @param type
diff --git a/lib/librte_eal/linuxapp/eal/eal_log.c b/lib/librte_eal/linuxapp/eal/eal_log.c
index e3a50aa..d88ed82 100644
--- a/lib/librte_eal/linuxapp/eal/eal_log.c
+++ b/lib/librte_eal/linuxapp/eal/eal_log.c
@@ -56,12 +56,14 @@ static ssize_t
 console_log_write(__attribute__((unused)) void *c, const char *buf, size_t size)
 {
 	char copybuf[BUFSIZ + 1];
-	ssize_t ret;
+	ssize_t ret = 0;
 	uint32_t loglevel;
 
 	/* write on stdout */
-	ret = fwrite(buf, 1, size, stdout);
-	fflush(stdout);
+	if (!rte_log_stdout_silent()) {
+		ret = fwrite(buf, 1, size, stdout);
+		fflush(stdout);
+	}
 
 	/* truncate message if too big (should not happen) */
 	if (size > BUFSIZ)
diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
index 83721ba..f60c3f7 100644
--- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map
+++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map
@@ -178,3 +178,11 @@ DPDK_16.11 {
 	rte_eal_vdrv_unregister;
 
 } DPDK_16.07;
+
+DPDK_17.02 {
+	global:
+
+	rte_log_stdout_silent;
+	rte_log_silence_stdout;
+
+} DPDK_16.11;
-- 
2.5.0

^ permalink raw reply related

* [PATCH v2 2/3] lib/librte_cryptodev: functions for new performance test application
From: Slawomir Mrozowicz @ 2017-01-05 16:50 UTC (permalink / raw)
  To: dev; +Cc: Slawomir Mrozowicz, Declan Doherty, Marcin Kerlin
In-Reply-To: <1483635001-15473-1-git-send-email-slawomirx.mrozowicz@intel.com>

This patch adds helper functions for new performance application.
Application can be used to measute throughput and latency of
cryptography operation performed by crypto device.

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Signed-off-by: Marcin Kerlin <marcinx.kerlin@intel.com>
---
 lib/librte_cryptodev/rte_crypto_sym.h          |  16 +++
 lib/librte_cryptodev/rte_cryptodev.c           | 181 +++++++++++++++++++++++++
 lib/librte_cryptodev/rte_cryptodev.h           | 121 ++++++++++-------
 lib/librte_cryptodev/rte_cryptodev_version.map |  10 ++
 4 files changed, 281 insertions(+), 47 deletions(-)

diff --git a/lib/librte_cryptodev/rte_crypto_sym.h b/lib/librte_cryptodev/rte_crypto_sym.h
index 0e20b30..c782588 100644
--- a/lib/librte_cryptodev/rte_crypto_sym.h
+++ b/lib/librte_cryptodev/rte_crypto_sym.h
@@ -112,6 +112,10 @@ enum rte_crypto_cipher_algorithm {
 
 };
 
+/** Cipher algorithm name strings */
+extern const char *
+rte_crypto_cipher_algorithm_strings[];
+
 /** Symmetric Cipher Direction */
 enum rte_crypto_cipher_operation {
 	RTE_CRYPTO_CIPHER_OP_ENCRYPT,
@@ -120,6 +124,10 @@ enum rte_crypto_cipher_operation {
 	/**< Decrypt cipher operation */
 };
 
+/** Cipher operation name strings */
+extern const char *
+rte_crypto_cipher_operation_strings[];
+
 /**
  * Symmetric Cipher Setup Data.
  *
@@ -245,12 +253,20 @@ enum rte_crypto_auth_algorithm {
 	RTE_CRYPTO_AUTH_LIST_END
 };
 
+/** Authentication algorithm name strings */
+extern const char *
+rte_crypto_auth_algorithm_strings[];
+
 /** Symmetric Authentication / Hash Operations */
 enum rte_crypto_auth_operation {
 	RTE_CRYPTO_AUTH_OP_VERIFY,	/**< Verify authentication digest */
 	RTE_CRYPTO_AUTH_OP_GENERATE	/**< Generate authentication digest */
 };
 
+/** Authentication operation name strings */
+extern const char *
+rte_crypto_auth_operation_strings[];
+
 /**
  * Authentication / Hash transform data.
  *
diff --git a/lib/librte_cryptodev/rte_cryptodev.c b/lib/librte_cryptodev/rte_cryptodev.c
index bbab4b3..c126b1b 100644
--- a/lib/librte_cryptodev/rte_cryptodev.c
+++ b/lib/librte_cryptodev/rte_cryptodev.c
@@ -111,6 +111,86 @@ static const char *cryptodev_vdev_valid_params[] = {
 	RTE_CRYPTODEV_VDEV_SOCKET_ID
 };
 
+/**
+ * The crypto cipher algorithm strings identifiers.
+ * It could be used in application command line.
+ */
+const char *
+rte_crypto_cipher_algorithm_strings[] = {
+	[RTE_CRYPTO_CIPHER_3DES_CBC]	= "3des-cbc",
+	[RTE_CRYPTO_CIPHER_3DES_ECB]	= "3des-ecb",
+	[RTE_CRYPTO_CIPHER_3DES_CTR]	= "3des-ctr",
+
+	[RTE_CRYPTO_CIPHER_AES_CBC]	= "aes-cbc",
+	[RTE_CRYPTO_CIPHER_AES_CCM]	= "aes-ccm",
+	[RTE_CRYPTO_CIPHER_AES_CTR]	= "aes-ctr",
+	[RTE_CRYPTO_CIPHER_AES_ECB]	= "aes-ecb",
+	[RTE_CRYPTO_CIPHER_AES_GCM]	= "aes-gcm",
+	[RTE_CRYPTO_CIPHER_AES_F8]	= "aes-f8",
+	[RTE_CRYPTO_CIPHER_AES_XTS]	= "aes-xts",
+
+	[RTE_CRYPTO_CIPHER_ARC4]	= "arc4",
+
+	[RTE_CRYPTO_CIPHER_NULL]	= "null",
+
+	[RTE_CRYPTO_CIPHER_KASUMI_F8]	= "kasumi-f8",
+	[RTE_CRYPTO_CIPHER_SNOW3G_UEA2]	= "snow3g-uea2",
+	[RTE_CRYPTO_CIPHER_ZUC_EEA3]	= "zuc-eea3"
+};
+
+/**
+ * The crypto cipher operation strings identifiers.
+ * It could be used in application command line.
+ */
+const char *
+rte_crypto_cipher_operation_strings[] = {
+		[RTE_CRYPTO_CIPHER_OP_ENCRYPT]	= "encrypt",
+		[RTE_CRYPTO_CIPHER_OP_DECRYPT]	= "decrypt"
+};
+
+/**
+ * The crypto auth algorithm strings identifiers.
+ * It could be used in application command line.
+ */
+const char *
+rte_crypto_auth_algorithm_strings[] = {
+	[RTE_CRYPTO_AUTH_AES_CBC_MAC]	= "aes-cbc-mac",
+	[RTE_CRYPTO_AUTH_AES_CCM]	= "aes-ccm",
+	[RTE_CRYPTO_AUTH_AES_CMAC]	= "aes-cmac",
+	[RTE_CRYPTO_AUTH_AES_GCM]	= "aes-gcm",
+	[RTE_CRYPTO_AUTH_AES_GMAC]	= "aes-gmac",
+	[RTE_CRYPTO_AUTH_AES_XCBC_MAC]	= "aes-xcbc-mac",
+
+	[RTE_CRYPTO_AUTH_MD5]		= "md5",
+	[RTE_CRYPTO_AUTH_MD5_HMAC]	= "md5-hmac",
+
+	[RTE_CRYPTO_AUTH_SHA1]		= "sha1",
+	[RTE_CRYPTO_AUTH_SHA1_HMAC]	= "sha1-hmac",
+
+	[RTE_CRYPTO_AUTH_SHA224]	= "sha2-224",
+	[RTE_CRYPTO_AUTH_SHA224_HMAC]	= "sha2-224-hmac",
+	[RTE_CRYPTO_AUTH_SHA256]	= "sha2-256",
+	[RTE_CRYPTO_AUTH_SHA256_HMAC]	= "sha2-256-hmac",
+	[RTE_CRYPTO_AUTH_SHA384]	= "sha2-384",
+	[RTE_CRYPTO_AUTH_SHA384_HMAC]	= "sha2-384-hmac",
+	[RTE_CRYPTO_AUTH_SHA512]	= "sha2-512",
+	[RTE_CRYPTO_AUTH_SHA512_HMAC]	= "sha2-512-hmac",
+
+	[RTE_CRYPTO_AUTH_KASUMI_F9]	= "kasumi-f9",
+	[RTE_CRYPTO_AUTH_SNOW3G_UIA2]	= "snow3g-uia2",
+	[RTE_CRYPTO_AUTH_ZUC_EIA3]	= "zuc-eia3"
+};
+
+/**
+ * The crypto auth operation strings identifiers.
+ * It could be used in application command line.
+ */
+const char *
+rte_crypto_auth_operation_strings[] = {
+		[RTE_CRYPTO_AUTH_OP_VERIFY]	= "verify",
+		[RTE_CRYPTO_AUTH_OP_GENERATE]	= "generate"
+};
+
 static uint8_t
 number_of_sockets(void)
 {
@@ -191,6 +271,73 @@ rte_cryptodev_parse_vdev_init_params(struct rte_crypto_vdev_init_params *params,
 	return ret;
 }
 
+const struct rte_cryptodev_symmetric_capability *
+rte_cryptodev_capability_get(uint8_t dev_id,
+		const struct rte_cryptodev_capability_idx *idx)
+{
+	const struct rte_cryptodev_capabilities *capability;
+	struct rte_cryptodev_info dev_info;
+	int i = 0;
+
+	rte_cryptodev_info_get(dev_id, &dev_info);
+
+	while ((capability = &dev_info.capabilities[i++])->op !=
+			RTE_CRYPTO_OP_TYPE_UNDEFINED) {
+		if (capability->op != RTE_CRYPTO_OP_TYPE_SYMMETRIC)
+			continue;
+
+		if (capability->sym.xform_type != idx->type)
+			continue;
+
+		if (idx->type == RTE_CRYPTO_SYM_XFORM_AUTH &&
+			capability->sym.auth.algo == idx->algo.auth)
+			return &capability->sym;
+
+		if (idx->type == RTE_CRYPTO_SYM_XFORM_CIPHER &&
+			capability->sym.cipher.algo == idx->algo.cipher)
+			return &capability->sym;
+	}
+
+	return NULL;
+
+}
+
+#define param_range_check(x, y) \
+	(((x < y.min) || (x > y.max)) || \
+	(y.increment != 0 && (x % y.increment) != 0))
+
+int
+rte_cryptodev_capability_check_cipher(
+		const struct rte_cryptodev_symmetric_capability *capability,
+		uint16_t key_size, uint16_t iv_size)
+{
+	if (param_range_check(key_size, capability->cipher.key_size))
+		return -1;
+
+	if (param_range_check(iv_size, capability->cipher.iv_size))
+		return -1;
+
+	return 0;
+}
+
+int
+rte_cryptodev_capability_check_auth(
+		const struct rte_cryptodev_symmetric_capability *capability,
+		uint16_t key_size, uint16_t digest_size, uint16_t aad_size)
+{
+	if (param_range_check(key_size, capability->auth.key_size))
+		return -1;
+
+	if (param_range_check(digest_size, capability->auth.digest_size))
+		return -1;
+
+	if (param_range_check(aad_size, capability->auth.aad_size))
+		return -1;
+
+	return 0;
+}
+
+
 const char *
 rte_cryptodev_get_feature_name(uint64_t flag)
 {
@@ -263,6 +410,40 @@ rte_cryptodev_count_devtype(enum rte_cryptodev_type type)
 }
 
 int
+rte_cryptodev_devices_get(const char *dev_name, uint8_t *devices,
+	uint8_t nb_devices)
+{
+	uint8_t i, cmp, count = 0;
+	struct rte_cryptodev **devs = &rte_cryptodev_globals->devs;
+	struct rte_pci_device *pci;
+
+	for (i = 0; i < rte_cryptodev_globals->max_devs && count < nb_devices;
+			i++) {
+
+		if ((*devs + i)
+				&& (*devs + i)->attached ==
+						RTE_CRYPTODEV_ATTACHED) {
+
+			pci = (*devs + i)->pci_dev;
+
+			if (pci)
+				cmp = strncmp(pci->driver->driver.name,
+						dev_name,
+						strlen(dev_name));
+			else
+				cmp = strncmp((*devs + i)->data->name,
+						dev_name,
+						strlen(dev_name));
+
+			if (cmp == 0)
+				devices[count++] = (*devs + i)->data->dev_id;
+		}
+	}
+
+	return count;
+}
+
+int
 rte_cryptodev_socket_id(uint8_t dev_id)
 {
 	struct rte_cryptodev *dev;
diff --git a/lib/librte_cryptodev/rte_cryptodev.h b/lib/librte_cryptodev/rte_cryptodev.h
index fa311a9..af8a53f 100644
--- a/lib/librte_cryptodev/rte_cryptodev.h
+++ b/lib/librte_cryptodev/rte_cryptodev.h
@@ -76,7 +76,7 @@ enum rte_cryptodev_type {
 	RTE_CRYPTODEV_SNOW3G_PMD,	/**< SNOW 3G PMD */
 	RTE_CRYPTODEV_KASUMI_PMD,	/**< KASUMI PMD */
 	RTE_CRYPTODEV_ZUC_PMD,		/**< ZUC PMD */
-	RTE_CRYPTODEV_OPENSSL_PMD,    /**<  OpenSSL PMD */
+	RTE_CRYPTODEV_OPENSSL_PMD,	/**< OpenSSL PMD */
 };
 
 extern const char **rte_cyptodev_names;
@@ -110,6 +110,20 @@ extern const char **rte_cyptodev_names;
 #endif
 
 /**
+ * Crypto parameters range description
+ */
+struct rte_crypto_param_range {
+	uint16_t min;	/**< minimum size */
+	uint16_t max;	/**< maximum size */
+	uint16_t increment;
+	/**< if a range of sizes are supported,
+	 * this parameter is used to indicate
+	 * increments in byte size that are supported
+	 * between the minimum and maximum
+	 */
+};
+
+/**
  * Symmetric Crypto Capability
  */
 struct rte_cryptodev_symmetric_capability {
@@ -122,35 +136,11 @@ struct rte_cryptodev_symmetric_capability {
 			/**< authentication algorithm */
 			uint16_t block_size;
 			/**< algorithm block size */
-			struct {
-				uint16_t min;	/**< minimum key size */
-				uint16_t max;	/**< maximum key size */
-				uint16_t increment;
-				/**< if a range of sizes are supported,
-				 * this parameter is used to indicate
-				 * increments in byte size that are supported
-				 * between the minimum and maximum */
-			} key_size;
+			struct rte_crypto_param_range key_size;
 			/**< auth key size range */
-			struct {
-				uint16_t min;	/**< minimum digest size */
-				uint16_t max;	/**< maximum digest size */
-				uint16_t increment;
-				/**< if a range of sizes are supported,
-				 * this parameter is used to indicate
-				 * increments in byte size that are supported
-				 * between the minimum and maximum */
-			} digest_size;
+			struct rte_crypto_param_range digest_size;
 			/**< digest size range */
-			struct {
-				uint16_t min;	/**< minimum aad size */
-				uint16_t max;	/**< maximum aad size */
-				uint16_t increment;
-				/**< if a range of sizes are supported,
-				 * this parameter is used to indicate
-				 * increments in byte size that are supported
-				 * between the minimum and maximum */
-			} aad_size;
+			struct rte_crypto_param_range aad_size;
 			/**< Additional authentication data size range */
 		} auth;
 		/**< Symmetric Authentication transform capabilities */
@@ -159,25 +149,9 @@ struct rte_cryptodev_symmetric_capability {
 			/**< cipher algorithm */
 			uint16_t block_size;
 			/**< algorithm block size */
-			struct {
-				uint16_t min;	/**< minimum key size */
-				uint16_t max;	/**< maximum key size */
-				uint16_t increment;
-				/**< if a range of sizes are supported,
-				 * this parameter is used to indicate
-				 * increments in byte size that are supported
-				 * between the minimum and maximum */
-			} key_size;
+			struct rte_crypto_param_range key_size;
 			/**< cipher key size range */
-			struct {
-				uint16_t min;	/**< minimum iv size */
-				uint16_t max;	/**< maximum iv size */
-				uint16_t increment;
-				/**< if a range of sizes are supported,
-				 * this parameter is used to indicate
-				 * increments in byte size that are supported
-				 * between the minimum and maximum */
-			} iv_size;
+			struct rte_crypto_param_range iv_size;
 			/**< Initialisation vector data size range */
 		} cipher;
 		/**< Symmetric Cipher transform capabilities */
@@ -196,6 +170,38 @@ struct rte_cryptodev_capabilities {
 	};
 };
 
+/** Structure used to describe crypto algorithms */
+struct rte_cryptodev_capability_idx {
+	enum rte_crypto_sym_xform_type type;
+	union {
+		enum rte_crypto_cipher_algorithm cipher;
+		enum rte_crypto_auth_algorithm auth;
+	} algo;
+};
+
+/** Provide capabilities available for defined device and algorithm */
+const struct rte_cryptodev_symmetric_capability *
+rte_cryptodev_capability_get(uint8_t dev_id,
+		const struct rte_cryptodev_capability_idx *idx);
+
+/**
+ * Check if key size and initial vector are supported
+ * in crypto cipher capability
+ */
+int
+rte_cryptodev_capability_check_cipher(
+		const struct rte_cryptodev_symmetric_capability *capability,
+		uint16_t key_size, uint16_t iv_size);
+
+/**
+ * Check if key size and initial vector are supported
+ * in crypto auth capability
+ */
+int
+rte_cryptodev_capability_check_auth(
+		const struct rte_cryptodev_symmetric_capability *capability,
+		uint16_t key_size, uint16_t digest_size, uint16_t aad_size);
+
 /** Macro used at end of crypto PMD list */
 #define RTE_CRYPTODEV_END_OF_CAPABILITIES_LIST() \
 	{ RTE_CRYPTO_OP_TYPE_UNDEFINED }
@@ -230,7 +236,6 @@ struct rte_cryptodev_capabilities {
 #define	RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER	(1ULL << 9)
 /**< Scatter-gather mbufs are supported */
 
-
 /**
  * Get the name of a crypto device feature flag
  *
@@ -369,8 +374,30 @@ rte_cryptodev_get_dev_id(const char *name);
 extern uint8_t
 rte_cryptodev_count(void);
 
+/**
+ * Get number of crypto device defined type.
+ *
+ * @param	type	type of device.
+ *
+ * @return
+ *   Returns number of crypto device.
+ */
 extern uint8_t
 rte_cryptodev_count_devtype(enum rte_cryptodev_type type);
+
+/**
+ * Get number and identifiers of attached crypto device.
+ *
+ * @param	dev_name	device name.
+ * @param	devices		output devices identifiers.
+ * @param	nb_devices	maximal number of devices.
+ *
+ * @return
+ *   Returns number of attached crypto device.
+ */
+int
+rte_cryptodev_devices_get(const char *dev_name, uint8_t *devices,
+		uint8_t nb_devices);
 /*
  * Return the NUMA socket to which a device is connected
  *
diff --git a/lib/librte_cryptodev/rte_cryptodev_version.map b/lib/librte_cryptodev/rte_cryptodev_version.map
index 9dde0e7..b6f6d49 100644
--- a/lib/librte_cryptodev/rte_cryptodev_version.map
+++ b/lib/librte_cryptodev/rte_cryptodev_version.map
@@ -46,3 +46,13 @@ DPDK_16.11 {
 	rte_cryptodev_pci_remove;
 
 } DPDK_16.07;
+
+DPDK_17.02 {
+	global:
+
+	rte_cryptodev_capability_check_auth;
+	rte_cryptodev_capability_check_cipher;
+	rte_cryptodev_capability_get;
+	rte_cryptodev_devices_get;
+
+} DPDK_16.11;
-- 
2.5.0

^ permalink raw reply related

* [PATCH v2 3/3] app/crypto-perf: introduce new performance test application
From: Slawomir Mrozowicz @ 2017-01-05 16:50 UTC (permalink / raw)
  To: dev
  Cc: Slawomir Mrozowicz, Declan Doherty, Piotr Azarewicz,
	Marcin Kerlin, Michal Kobylinski
In-Reply-To: <1483635001-15473-1-git-send-email-slawomirx.mrozowicz@intel.com>

This patchset introduce new application which allows measuring
performance parameters of PMDs available in crypto tree. The goal of
this application is to replace existing performance tests in app/test.
Parameters available are: throughput (--ptest throughput) and latency
(--ptest latency). User can use multiply cores to run tests on but only
one type of crypto PMD can be measured during single application
execution. Cipher parameters, type of device, type of operation and
chain mode have to be specified in the command line as application
parameters. These parameters are checked using device capabilities
structure.
Couple of new library functions in librte_cryptodev are introduced for
application use.
To build the application a CONFIG_RTE_APP_CRYPTO_PERF flag has to be set
(it is set by default).
Example of usage: -c 0xc0 --vdev crypto_aesni_mb_pmd -w 0000:00:00.0 --
--ptest throughput --devtype crypto_aesni_mb --optype cipher-then-auth
--cipher-algo aes-cbc --cipher-op encrypt --cipher-key-sz 16 --auth-algo
sha1-hmac --auth-op generate --auth-key-sz 64 --auth-digest-sz 12
--total-ops 10000000 --burst-sz 32 --buffer-sz 64

Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Signed-off-by: Slawomir Mrozowicz <slawomirx.mrozowicz@intel.com>
Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com>
Signed-off-by: Marcin Kerlin <marcinx.kerlin@intel.com>
Signed-off-by: Michal Kobylinski <michalx.kobylinski@intel.com>
---
 MAINTAINERS                                 |   4 +
 app/Makefile                                |   1 +
 app/crypto-perf/Makefile                    |  51 ++
 app/crypto-perf/cperf.h                     |  58 ++
 app/crypto-perf/cperf_ops.c                 | 474 +++++++++++++++
 app/crypto-perf/cperf_ops.h                 |  66 +++
 app/crypto-perf/cperf_options.h             | 104 ++++
 app/crypto-perf/cperf_options_parsing.c     | 875 ++++++++++++++++++++++++++++
 app/crypto-perf/cperf_test_latency.c        | 685 ++++++++++++++++++++++
 app/crypto-perf/cperf_test_latency.h        |  57 ++
 app/crypto-perf/cperf_test_throughput.c     | 651 +++++++++++++++++++++
 app/crypto-perf/cperf_test_throughput.h     |  58 ++
 app/crypto-perf/cperf_test_vector_parsing.c | 500 ++++++++++++++++
 app/crypto-perf/cperf_test_vector_parsing.h |  73 +++
 app/crypto-perf/cperf_test_vectors.c        | 476 +++++++++++++++
 app/crypto-perf/cperf_test_vectors.h        |  98 ++++
 app/crypto-perf/cperf_verify_parser.c       | 314 ++++++++++
 app/crypto-perf/data/aes_cbc_128_sha.data   | 503 ++++++++++++++++
 app/crypto-perf/data/aes_cbc_192_sha.data   | 504 ++++++++++++++++
 app/crypto-perf/data/aes_cbc_256_sha.data   | 504 ++++++++++++++++
 app/crypto-perf/main.c                      | 411 +++++++++++++
 config/common_base                          |   6 +
 doc/guides/rel_notes/release_17_02.rst      |   5 +
 doc/guides/tools/cryptoperf.rst             | 397 +++++++++++++
 doc/guides/tools/index.rst                  |   1 +
 25 files changed, 6876 insertions(+)
 create mode 100644 app/crypto-perf/Makefile
 create mode 100644 app/crypto-perf/cperf.h
 create mode 100644 app/crypto-perf/cperf_ops.c
 create mode 100644 app/crypto-perf/cperf_ops.h
 create mode 100644 app/crypto-perf/cperf_options.h
 create mode 100644 app/crypto-perf/cperf_options_parsing.c
 create mode 100644 app/crypto-perf/cperf_test_latency.c
 create mode 100644 app/crypto-perf/cperf_test_latency.h
 create mode 100644 app/crypto-perf/cperf_test_throughput.c
 create mode 100644 app/crypto-perf/cperf_test_throughput.h
 create mode 100644 app/crypto-perf/cperf_test_vector_parsing.c
 create mode 100644 app/crypto-perf/cperf_test_vector_parsing.h
 create mode 100644 app/crypto-perf/cperf_test_vectors.c
 create mode 100644 app/crypto-perf/cperf_test_vectors.h
 create mode 100644 app/crypto-perf/cperf_verify_parser.c
 create mode 100644 app/crypto-perf/data/aes_cbc_128_sha.data
 create mode 100644 app/crypto-perf/data/aes_cbc_192_sha.data
 create mode 100644 app/crypto-perf/data/aes_cbc_256_sha.data
 create mode 100644 app/crypto-perf/main.c
 create mode 100644 doc/guides/tools/cryptoperf.rst

diff --git a/MAINTAINERS b/MAINTAINERS
index ebc97b8..918c2f2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -625,6 +625,10 @@ M: Reshma Pattan <reshma.pattan@intel.com>
 F: app/proc_info/
 F: doc/guides/tools/proc_info.rst
 
+Performance test application
+M: Declan Doherty <declan.doherty@intel.com>
+F: app/crypto-perf/
+F: doc/guides/tools/cryptoperf.rst
 
 Other Example Applications
 --------------------------
diff --git a/app/Makefile b/app/Makefile
index 30ec292..8cf43cb 100644
--- a/app/Makefile
+++ b/app/Makefile
@@ -38,5 +38,6 @@ DIRS-$(CONFIG_RTE_TEST_PMD) += test-pmd
 DIRS-$(CONFIG_RTE_LIBRTE_CMDLINE) += cmdline_test
 DIRS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) += proc_info
 DIRS-$(CONFIG_RTE_LIBRTE_PDUMP) += pdump
+DIRS-$(CONFIG_RTE_APP_CRYPTO_PERF) += crypto-perf
 
 include $(RTE_SDK)/mk/rte.subdir.mk
diff --git a/app/crypto-perf/Makefile b/app/crypto-perf/Makefile
new file mode 100644
index 0000000..f930de9
--- /dev/null
+++ b/app/crypto-perf/Makefile
@@ -0,0 +1,51 @@
+#   BSD LICENSE
+#
+#   Copyright(c) 2016 Intel Corporation. All rights reserved.
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in
+#       the documentation and/or other materials provided with the
+#       distribution.
+#     * Neither the name of Intel Corporation nor the names of its
+#       contributors may be used to endorse or promote products derived
+#       from this software without specific prior written permission.
+#
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+#   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+#   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+#   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+#   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+#   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+#   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+#   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+#   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+include $(RTE_SDK)/mk/rte.vars.mk
+
+
+APP = dpdk-crypto-perf
+
+CFLAGS += $(WERROR_FLAGS)
+
+# all source are stored in SRCS-y
+SRCS-y := main.c
+SRCS-y += cperf_ops.c
+SRCS-y += cperf_options_parsing.c
+SRCS-y += cperf_test_vectors.c
+SRCS-y += cperf_test_throughput.c
+SRCS-y += cperf_test_latency.c
+SRCS-y += cperf_test_vector_parsing.c
+
+# this application needs libraries first
+DEPDIRS-y += lib
+
+include $(RTE_SDK)/mk/rte.app.mk
+
diff --git a/app/crypto-perf/cperf.h b/app/crypto-perf/cperf.h
new file mode 100644
index 0000000..0f570f0
--- /dev/null
+++ b/app/crypto-perf/cperf.h
@@ -0,0 +1,58 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2016 Intel Corporation. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _CPERF_
+#define _CPERF_
+
+#include <rte_crypto.h>
+
+#include "cperf_ops.h"
+
+struct cperf_options;
+struct cperf_test_vector;
+struct cperf_op_fns;
+
+typedef void  *(*cperf_constructor_t)(uint8_t dev_id, uint16_t qp_id,
+		const struct cperf_options *options,
+		const struct cperf_test_vector *t_vec,
+		const struct cperf_op_fns *op_fns);
+
+typedef int (*cperf_runner_t)(void *test_ctx);
+typedef void (*cperf_destructor_t)(void *test_ctx);
+
+struct cperf_test {
+	cperf_constructor_t constructor;
+	cperf_runner_t runner;
+	cperf_destructor_t destructor;
+};
+
+#endif /* _CPERF_ */
diff --git a/app/crypto-perf/cperf_ops.c b/app/crypto-perf/cperf_ops.c
new file mode 100644
index 0000000..afc1e4e
--- /dev/null
+++ b/app/crypto-perf/cperf_ops.c
@@ -0,0 +1,474 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2016 Intel Corporation. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <rte_cryptodev.h>
+
+#include "cperf_ops.h"
+#include "cperf_test_vectors.h"
+
+static int
+cperf_set_ops_null_cipher(struct rte_crypto_op **ops,
+		struct rte_mbuf **bufs_in, struct rte_mbuf **bufs_out,
+		uint16_t nb_ops, struct rte_cryptodev_sym_session *sess,
+		const struct cperf_options *options,
+		const struct cperf_test_vector *test_vector __rte_unused)
+{
+	uint16_t i;
+
+	for (i = 0; i < nb_ops; i++) {
+		struct rte_crypto_sym_op *sym_op = ops[i]->sym;
+
+		rte_crypto_op_attach_sym_session(ops[i], sess);
+
+		sym_op->m_src = bufs_in[i];
+		sym_op->m_dst = bufs_out[i];
+
+		/* cipher parameters */
+		sym_op->cipher.data.length = options->buffer_sz;
+		sym_op->cipher.data.offset = 0;
+	}
+
+	return 0;
+}
+
+static int
+cperf_set_ops_null_auth(struct rte_crypto_op **ops,
+		struct rte_mbuf **bufs_in, struct rte_mbuf **bufs_out,
+		uint16_t nb_ops, struct rte_cryptodev_sym_session *sess,
+		const struct cperf_options *options,
+		const struct cperf_test_vector *test_vector __rte_unused)
+{
+	uint16_t i;
+
+	for (i = 0; i < nb_ops; i++) {
+		struct rte_crypto_sym_op *sym_op = ops[i]->sym;
+
+		rte_crypto_op_attach_sym_session(ops[i], sess);
+
+		sym_op->m_src = bufs_in[i];
+		sym_op->m_dst = bufs_out[i];
+
+		/* auth parameters */
+		sym_op->auth.data.length = options->buffer_sz;
+		sym_op->auth.data.offset = 0;
+	}
+
+	return 0;
+}
+
+static int
+cperf_set_ops_cipher(struct rte_crypto_op **ops,
+		struct rte_mbuf **bufs_in, struct rte_mbuf **bufs_out,
+		uint16_t nb_ops, struct rte_cryptodev_sym_session *sess,
+		const struct cperf_options *options,
+		const struct cperf_test_vector *test_vector)
+{
+	uint16_t i;
+
+	for (i = 0; i < nb_ops; i++) {
+		struct rte_crypto_sym_op *sym_op = ops[i]->sym;
+
+		rte_crypto_op_attach_sym_session(ops[i], sess);
+
+		sym_op->m_src = bufs_in[i];
+		sym_op->m_dst = bufs_out[i];
+
+		/* cipher parameters */
+		sym_op->cipher.iv.data = test_vector->iv.data;
+		sym_op->cipher.iv.phys_addr = test_vector->iv.phys_addr;
+		sym_op->cipher.iv.length = test_vector->iv.length;
+
+		sym_op->cipher.data.length = options->buffer_sz;
+		sym_op->cipher.data.offset = 0;
+	}
+
+	return 0;
+}
+
+static int
+cperf_set_ops_auth(struct rte_crypto_op **ops,
+		struct rte_mbuf **bufs_in, struct rte_mbuf **bufs_out,
+		uint16_t nb_ops, struct rte_cryptodev_sym_session *sess,
+		const struct cperf_options *options,
+		const struct cperf_test_vector *test_vector)
+{
+	uint16_t i;
+
+	for (i = 0; i < nb_ops; i++) {
+		struct rte_crypto_sym_op *sym_op = ops[i]->sym;
+
+		rte_crypto_op_attach_sym_session(ops[i], sess);
+
+		sym_op->m_src = bufs_in[i];
+		sym_op->m_dst = bufs_out[i];
+
+		/* authentication parameters */
+		if (options->auth_op == RTE_CRYPTO_AUTH_OP_VERIFY) {
+			sym_op->auth.digest.data = test_vector->digest.data;
+			sym_op->auth.digest.phys_addr =
+					test_vector->digest.phys_addr;
+			sym_op->auth.digest.length = options->auth_digest_sz;
+		} else {
+
+			uint32_t offset = options->buffer_sz;
+			struct rte_mbuf *buf, *tbuf;
+
+			if (options->out_of_place) {
+				buf =  bufs_out[i];
+			} else {
+				buf =  bufs_in[i];
+
+				tbuf = buf;
+				while ((tbuf->next != NULL) &&
+						(offset >= tbuf->data_len)) {
+					offset -= tbuf->data_len;
+					tbuf = tbuf->next;
+				}
+			}
+
+			sym_op->auth.digest.data = rte_pktmbuf_mtod_offset(buf,
+					uint8_t *, offset);
+			sym_op->auth.digest.phys_addr =
+					rte_pktmbuf_mtophys_offset(buf,	offset);
+			sym_op->auth.digest.length = options->auth_digest_sz;
+			sym_op->auth.aad.phys_addr = test_vector->aad.phys_addr;
+			sym_op->auth.aad.data = test_vector->aad.data;
+			sym_op->auth.aad.length = options->auth_aad_sz;
+
+		}
+
+		sym_op->auth.data.length = options->buffer_sz;
+		sym_op->auth.data.offset = 0;
+	}
+
+	return 0;
+}
+
+static int
+cperf_set_ops_cipher_auth(struct rte_crypto_op **ops,
+		struct rte_mbuf **bufs_in, struct rte_mbuf **bufs_out,
+		uint16_t nb_ops, struct rte_cryptodev_sym_session *sess,
+		const struct cperf_options *options,
+		const struct cperf_test_vector *test_vector)
+{
+	uint16_t i;
+
+	for (i = 0; i < nb_ops; i++) {
+		struct rte_crypto_sym_op *sym_op = ops[i]->sym;
+
+		rte_crypto_op_attach_sym_session(ops[i], sess);
+
+		sym_op->m_src = bufs_in[i];
+		sym_op->m_dst = bufs_out[i];
+
+		/* cipher parameters */
+		sym_op->cipher.iv.data = test_vector->iv.data;
+		sym_op->cipher.iv.phys_addr = test_vector->iv.phys_addr;
+		sym_op->cipher.iv.length = test_vector->iv.length;
+
+		sym_op->cipher.data.length = options->buffer_sz;
+		sym_op->cipher.data.offset = 0;
+
+		/* authentication parameters */
+		if (options->auth_op == RTE_CRYPTO_AUTH_OP_VERIFY) {
+			sym_op->auth.digest.data = test_vector->digest.data;
+			sym_op->auth.digest.phys_addr =
+					test_vector->digest.phys_addr;
+			sym_op->auth.digest.length = options->auth_digest_sz;
+		} else {
+
+			uint32_t offset = options->buffer_sz;
+			struct rte_mbuf *buf, *tbuf;
+
+			if (options->out_of_place) {
+				buf =  bufs_out[i];
+			} else {
+				buf =  bufs_in[i];
+
+				tbuf = buf;
+				while ((tbuf->next != NULL) &&
+						(offset >= tbuf->data_len)) {
+					offset -= tbuf->data_len;
+					tbuf = tbuf->next;
+				}
+			}
+
+			sym_op->auth.digest.data = rte_pktmbuf_mtod_offset(buf,
+					uint8_t *, offset);
+			sym_op->auth.digest.phys_addr =
+					rte_pktmbuf_mtophys_offset(buf,	offset);
+			sym_op->auth.digest.length = options->auth_digest_sz;
+			sym_op->auth.aad.phys_addr = test_vector->aad.phys_addr;
+			sym_op->auth.aad.data = test_vector->aad.data;
+			sym_op->auth.aad.length = options->auth_aad_sz;
+		}
+
+		sym_op->auth.data.length = options->buffer_sz;
+		sym_op->auth.data.offset = 0;
+	}
+
+	return 0;
+}
+
+static int
+cperf_set_ops_aead(struct rte_crypto_op **ops,
+		struct rte_mbuf **bufs_in, struct rte_mbuf **bufs_out,
+		uint16_t nb_ops, struct rte_cryptodev_sym_session *sess,
+		const struct cperf_options *options,
+		const struct cperf_test_vector *test_vector)
+{
+	uint16_t i;
+
+	for (i = 0; i < nb_ops; i++) {
+		struct rte_crypto_sym_op *sym_op = ops[i]->sym;
+
+		rte_crypto_op_attach_sym_session(ops[i], sess);
+
+		sym_op->m_src = bufs_in[i];
+		sym_op->m_dst = bufs_out[i];
+
+		/* cipher parameters */
+		sym_op->cipher.iv.data = test_vector->iv.data;
+		sym_op->cipher.iv.phys_addr = test_vector->iv.phys_addr;
+		sym_op->cipher.iv.length = test_vector->iv.length;
+
+		sym_op->cipher.data.length = options->buffer_sz;
+		sym_op->cipher.data.offset =
+				RTE_ALIGN_CEIL(options->auth_aad_sz, 16);
+
+		sym_op->auth.aad.data = rte_pktmbuf_mtod(bufs_in[i], uint8_t *);
+		sym_op->auth.aad.phys_addr = rte_pktmbuf_mtophys(bufs_in[i]);
+		sym_op->auth.aad.length = options->auth_aad_sz;
+
+		/* authentication parameters */
+		if (options->auth_op == RTE_CRYPTO_AUTH_OP_VERIFY) {
+			sym_op->auth.digest.data = test_vector->digest.data;
+			sym_op->auth.digest.phys_addr =
+					test_vector->digest.phys_addr;
+			sym_op->auth.digest.length = options->auth_digest_sz;
+		} else {
+
+			uint32_t offset = sym_op->cipher.data.length +
+						sym_op->cipher.data.offset;
+			struct rte_mbuf *buf, *tbuf;
+
+			if (options->out_of_place) {
+				buf =  bufs_out[i];
+			} else {
+				buf =  bufs_in[i];
+
+				tbuf = buf;
+				while ((tbuf->next != NULL) &&
+						(offset >= tbuf->data_len)) {
+					offset -= tbuf->data_len;
+					tbuf = tbuf->next;
+				}
+			}
+
+			sym_op->auth.digest.data = rte_pktmbuf_mtod_offset(buf,
+					uint8_t *, offset);
+			sym_op->auth.digest.phys_addr =
+					rte_pktmbuf_mtophys_offset(buf,	offset);
+
+			sym_op->auth.digest.length = options->auth_digest_sz;
+		}
+
+		sym_op->auth.data.length = options->buffer_sz;
+		sym_op->auth.data.offset = options->auth_aad_sz;
+	}
+
+	return 0;
+}
+
+static struct rte_cryptodev_sym_session *
+cperf_create_session(uint8_t dev_id,
+	const struct cperf_options *options,
+	const struct cperf_test_vector *test_vector)
+{
+	struct rte_crypto_sym_xform cipher_xform;
+	struct rte_crypto_sym_xform auth_xform;
+	struct rte_cryptodev_sym_session *sess = NULL;
+
+	/*
+	 * cipher only
+	 */
+	if (options->op_type == CPERF_CIPHER_ONLY) {
+		cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
+		cipher_xform.next = NULL;
+		cipher_xform.cipher.algo = options->cipher_algo;
+		cipher_xform.cipher.op = options->cipher_op;
+
+		/* cipher different than null */
+		if (options->cipher_algo != RTE_CRYPTO_CIPHER_NULL) {
+			cipher_xform.cipher.key.data =
+					test_vector->cipher_key.data;
+			cipher_xform.cipher.key.length =
+					test_vector->cipher_key.length;
+		}
+		/* create crypto session */
+		sess = rte_cryptodev_sym_session_create(dev_id,	&cipher_xform);
+	/*
+	 *  auth only
+	 */
+	} else if (options->op_type == CPERF_AUTH_ONLY) {
+		auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;
+		auth_xform.next = NULL;
+		auth_xform.auth.algo = options->auth_algo;
+		auth_xform.auth.op = options->auth_op;
+
+		/* auth different than null */
+		if (options->auth_algo != RTE_CRYPTO_AUTH_NULL) {
+			auth_xform.auth.digest_length =
+					options->auth_digest_sz;
+			auth_xform.auth.add_auth_data_length =
+					options->auth_aad_sz;
+			auth_xform.auth.key.length =
+					test_vector->auth_key.length;
+			auth_xform.auth.key.data = test_vector->auth_key.data;
+		}
+		/* create crypto session */
+		sess =  rte_cryptodev_sym_session_create(dev_id, &auth_xform);
+	/*
+	 * cipher and auth
+	 */
+	} else if (options->op_type == CPERF_CIPHER_THEN_AUTH
+			|| options->op_type == CPERF_AUTH_THEN_CIPHER
+			|| options->op_type == CPERF_AEAD) {
+
+		/*
+		 * cipher
+		 */
+		cipher_xform.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
+		cipher_xform.next = NULL;
+		cipher_xform.cipher.algo = options->cipher_algo;
+		cipher_xform.cipher.op = options->cipher_op;
+
+		/* cipher different than null */
+		if (options->cipher_algo != RTE_CRYPTO_CIPHER_NULL) {
+			cipher_xform.cipher.key.data =
+					test_vector->cipher_key.data;
+			cipher_xform.cipher.key.length =
+					test_vector->cipher_key.length;
+		}
+
+		/*
+		 * auth
+		 */
+		auth_xform.type = RTE_CRYPTO_SYM_XFORM_AUTH;
+		auth_xform.next = NULL;
+		auth_xform.auth.algo = options->auth_algo;
+		auth_xform.auth.op = options->auth_op;
+
+		/* auth different than null */
+		if (options->auth_algo != RTE_CRYPTO_AUTH_NULL) {
+			auth_xform.auth.digest_length = options->auth_digest_sz;
+			auth_xform.auth.add_auth_data_length =
+					options->auth_aad_sz;
+			/* auth options for aes gcm */
+			if (options->cipher_algo == RTE_CRYPTO_CIPHER_AES_GCM &&
+				options->auth_algo == RTE_CRYPTO_AUTH_AES_GCM) {
+				auth_xform.auth.key.length = 0;
+				auth_xform.auth.key.data = NULL;
+			} else { /* auth options for others */
+				auth_xform.auth.key.length =
+					test_vector->auth_key.length;
+				auth_xform.auth.key.data =
+						test_vector->auth_key.data;
+			}
+		}
+
+		/* create crypto session for aes gcm */
+		if (options->cipher_algo == RTE_CRYPTO_CIPHER_AES_GCM) {
+			if (options->cipher_op ==
+					RTE_CRYPTO_CIPHER_OP_ENCRYPT) {
+				cipher_xform.next = &auth_xform;
+				/* create crypto session */
+				sess = rte_cryptodev_sym_session_create(dev_id,
+					&cipher_xform);
+			} else { /* decrypt */
+				auth_xform.next = &cipher_xform;
+				/* create crypto session */
+				sess = rte_cryptodev_sym_session_create(dev_id,
+					&auth_xform);
+			}
+		} else { /* create crypto session for other */
+			/* cipher then auth */
+			if (options->op_type == CPERF_CIPHER_THEN_AUTH) {
+				cipher_xform.next = &auth_xform;
+				/* create crypto session */
+				sess = rte_cryptodev_sym_session_create(dev_id,
+						&cipher_xform);
+			} else { /* auth then cipher */
+				auth_xform.next = &cipher_xform;
+				/* create crypto session */
+				sess = rte_cryptodev_sym_session_create(dev_id,
+						&auth_xform);
+			}
+		}
+	}
+	return sess;
+}
+
+struct cperf_op_fns ops;
+
+const struct cperf_op_fns *
+cperf_get_op_functions(const struct cperf_options *options)
+{
+	ops.sess_create = cperf_create_session;
+
+	if (options->op_type == CPERF_AEAD
+			|| options->op_type == CPERF_AUTH_THEN_CIPHER
+			|| options->op_type == CPERF_CIPHER_THEN_AUTH) {
+		if (options->cipher_algo == RTE_CRYPTO_CIPHER_AES_GCM &&
+				options->auth_algo == RTE_CRYPTO_AUTH_AES_GCM)
+			ops.populate_ops = cperf_set_ops_aead;
+		else
+			ops.populate_ops = cperf_set_ops_cipher_auth;
+		return &ops;
+	}
+	if (options->op_type == CPERF_AUTH_ONLY) {
+		if (options->auth_algo == RTE_CRYPTO_AUTH_NULL)
+			ops.populate_ops = cperf_set_ops_null_auth;
+		else
+			ops.populate_ops = cperf_set_ops_auth;
+		return &ops;
+	}
+	if (options->op_type == CPERF_CIPHER_ONLY) {
+		if (options->cipher_algo == RTE_CRYPTO_CIPHER_NULL)
+			ops.populate_ops = cperf_set_ops_null_cipher;
+		else
+			ops.populate_ops = cperf_set_ops_cipher;
+		return &ops;
+	}
+
+	return NULL;
+}
diff --git a/app/crypto-perf/cperf_ops.h b/app/crypto-perf/cperf_ops.h
new file mode 100644
index 0000000..8117aab
--- /dev/null
+++ b/app/crypto-perf/cperf_ops.h
@@ -0,0 +1,66 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2016 Intel Corporation. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _CPERF_OPS_
+#define _CPERF_OPS_
+
+#include <rte_crypto.h>
+
+#include "cperf.h"
+#include "cperf_options.h"
+#include "cperf_test_vectors.h"
+
+
+typedef struct rte_cryptodev_sym_session *(*cperf_sessions_create_t)(
+		uint8_t dev_id, const struct cperf_options *options,
+		const struct cperf_test_vector *test_vector);
+
+typedef int (*cperf_populate_ops_t)(struct rte_crypto_op **ops,
+		struct rte_mbuf **bufs_in, struct rte_mbuf **bufs_out,
+		uint16_t nb_ops, struct rte_cryptodev_sym_session *sess,
+		const struct cperf_options *options,
+		const struct cperf_test_vector *test_vector);
+
+
+typedef int (*cperf_verify_crypto_op_t)(struct rte_mbuf *m,
+		const struct cperf_options *options,
+		const struct cperf_test_vector *test_vector);
+
+struct cperf_op_fns {
+	cperf_sessions_create_t sess_create;
+	cperf_populate_ops_t populate_ops;
+};
+
+const struct cperf_op_fns *
+cperf_get_op_functions(const struct cperf_options *options);
+
+#endif /* _CPERF_OPS_ */
diff --git a/app/crypto-perf/cperf_options.h b/app/crypto-perf/cperf_options.h
new file mode 100644
index 0000000..96b7511
--- /dev/null
+++ b/app/crypto-perf/cperf_options.h
@@ -0,0 +1,104 @@
+
+#ifndef _CPERF_OPTIONS_
+#define _CPERF_OPTIONS_
+
+#include <rte_crypto.h>
+
+#define CPERF_PTEST_TYPE	("ptest")
+#define CPERF_SILENT		("silent")
+
+#define CPERF_POOL_SIZE		("pool-sz")
+#define CPERF_TOTAL_OPS		("total-ops")
+#define CPERF_BURST_SIZE	("burst-sz")
+#define CPERF_BUFFER_SIZE	("buffer-sz")
+#define CPERF_SEGMENTS_NB	("segments-nb")
+
+#define CPERF_DEVTYPE		("devtype")
+#define CPERF_OPTYPE		("optype")
+#define CPERF_SESSIONLESS	("sessionless")
+#define CPERF_OUT_OF_PLACE	("out-of-place")
+#define CPERF_VERIFY		("verify")
+#define CPERF_TEST_FILE		("test-file")
+#define CPERF_TEST_NAME		("test-name")
+
+#define CPERF_CIPHER_ALGO	("cipher-algo")
+#define CPERF_CIPHER_OP		("cipher-op")
+#define CPERF_CIPHER_KEY_SZ	("cipher-key-sz")
+#define CPERF_CIPHER_IV_SZ	("cipher-iv-sz")
+
+#define CPERF_AUTH_ALGO		("auth-algo")
+#define CPERF_AUTH_OP		("auth-op")
+#define CPERF_AUTH_KEY_SZ	("auth-key-sz")
+#define CPERF_AUTH_DIGEST_SZ	("auth-digest-sz")
+#define CPERF_AUTH_AAD_SZ	("auth-aad-sz")
+#define CPERF_CSV		("csv-friendly")
+
+
+enum cperf_perf_test_type {
+	CPERF_TEST_TYPE_THROUGHPUT,
+	CPERF_TEST_TYPE_CYCLECOUNT,
+	CPERF_TEST_TYPE_LATENCY
+};
+
+
+extern const char *cperf_test_type_strs[];
+
+enum cperf_op_type {
+	CPERF_CIPHER_ONLY = 1,
+	CPERF_AUTH_ONLY,
+	CPERF_CIPHER_THEN_AUTH,
+	CPERF_AUTH_THEN_CIPHER,
+	CPERF_AEAD
+};
+
+extern const char *cperf_op_type_strs[];
+
+struct cperf_options {
+	enum cperf_perf_test_type test;
+
+	uint32_t pool_sz;
+	uint32_t total_ops;
+	uint32_t burst_sz;
+	uint32_t buffer_sz;
+	uint32_t segments_nb;
+
+	char device_type[RTE_CRYPTODEV_NAME_LEN];
+	enum cperf_op_type op_type;
+
+	uint32_t sessionless:1;
+	uint32_t out_of_place:1;
+	uint32_t verify:1;
+	uint32_t silent:1;
+	uint32_t csv:1;
+
+	char *test_file;
+	char *test_name;
+
+	enum rte_crypto_cipher_algorithm cipher_algo;
+	enum rte_crypto_cipher_operation cipher_op;
+
+	uint16_t cipher_key_sz;
+	uint16_t cipher_iv_sz;
+
+	enum rte_crypto_auth_algorithm auth_algo;
+	enum rte_crypto_auth_operation auth_op;
+
+	uint16_t auth_key_sz;
+	uint16_t auth_digest_sz;
+	uint16_t auth_aad_sz;
+};
+
+void
+cperf_options_default(struct cperf_options *options);
+
+int
+cperf_options_parse(struct cperf_options *options,
+		int argc, char **argv);
+
+int
+cperf_options_check(struct cperf_options *options);
+
+void
+cperf_options_dump(struct cperf_options *options);
+
+#endif
diff --git a/app/crypto-perf/cperf_options_parsing.c b/app/crypto-perf/cperf_options_parsing.c
new file mode 100644
index 0000000..2e9601c
--- /dev/null
+++ b/app/crypto-perf/cperf_options_parsing.c
@@ -0,0 +1,875 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2016 Intel Corporation. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <getopt.h>
+#include <unistd.h>
+
+#include <rte_malloc.h>
+
+#include "cperf_options.h"
+
+struct name_id_map {
+	const char *name;
+	uint32_t id;
+};
+
+static int
+get_str_key_id_mapping(struct name_id_map *map, unsigned int map_len,
+		const char *str_key)
+{
+	unsigned int i;
+
+	for (i = 0; i < map_len; i++) {
+
+		if (strcmp(str_key, map[i].name) == 0)
+			return map[i].id;
+	}
+
+	return -1;
+}
+
+static int
+parse_cperf_test_type(struct cperf_options *opts, const char *arg)
+{
+	struct name_id_map cperftest_namemap[] = {
+		{
+			cperf_test_type_strs[CPERF_TEST_TYPE_THROUGHPUT],
+			CPERF_TEST_TYPE_THROUGHPUT
+		},
+		{
+			cperf_test_type_strs[CPERF_TEST_TYPE_CYCLECOUNT],
+			CPERF_TEST_TYPE_CYCLECOUNT
+		},
+		{
+			cperf_test_type_strs[CPERF_TEST_TYPE_LATENCY],
+			CPERF_TEST_TYPE_LATENCY
+		}
+	};
+
+	int id = get_str_key_id_mapping(
+			(struct name_id_map *)cperftest_namemap,
+			RTE_DIM(cperftest_namemap), arg);
+	if (id < 0) {
+		RTE_LOG(ERR, USER1, "failed to parse test type");
+		return -1;
+	}
+
+	opts->test = (enum cperf_perf_test_type)id;
+
+	return 0;
+}
+
+static int
+parse_uint32_t(uint32_t *value, const char *arg)
+{
+	char *end = NULL;
+	unsigned long n = strtoul(arg, &end, 10);
+
+	if ((optarg[0] == '\0') || (end == NULL) || (*end != '\0'))
+		return -1;
+
+	if (n > UINT32_MAX)
+		return -ERANGE;
+
+	*value = (uint32_t) n;
+
+	return 0;
+}
+
+static int
+parse_uint16_t(uint16_t *value, const char *arg)
+{
+	uint32_t val = 0;
+	int ret = parse_uint32_t(&val, arg);
+
+	if (ret < 0)
+		return ret;
+
+	if (val > UINT16_MAX)
+		return -ERANGE;
+
+	*value = (uint16_t) val;
+
+	return 0;
+}
+
+static int
+parse_total_ops(struct cperf_options *opts, const char *arg)
+{
+	int ret = parse_uint32_t(&opts->total_ops, arg);
+
+	if (ret)
+		RTE_LOG(ERR, USER1, "failed to parse total operations count");
+
+	return ret;
+}
+
+static int
+parse_pool_sz(struct cperf_options *opts, const char *arg)
+{
+	int ret =  parse_uint32_t(&opts->pool_sz, arg);
+
+	if (ret)
+		RTE_LOG(ERR, USER1, "failed to parse pool size");
+	return ret;
+}
+
+static int
+parse_burst_sz(struct cperf_options *opts, const char *arg)
+{
+	int ret = parse_uint32_t(&opts->burst_sz, arg);
+
+	if (ret)
+		RTE_LOG(ERR, USER1, "failed to parse burst size");
+	return ret;
+}
+
+static int
+parse_buffer_sz(struct cperf_options *opts, const char *arg)
+{
+	uint32_t i, valid_buf_sz[] = {
+			32, 64, 128, 256, 384, 512, 768, 1024, 1280, 1536, 1792,
+			2048
+	};
+
+	if (parse_uint32_t(&opts->buffer_sz, arg)) {
+		RTE_LOG(ERR, USER1, "failed to parse buffer size");
+		return -1;
+	}
+
+	for (i = 0; i < RTE_DIM(valid_buf_sz); i++)
+		if (valid_buf_sz[i] == opts->buffer_sz)
+			return 0;
+
+	RTE_LOG(ERR, USER1, "invalid buffer size specified");
+	return -1;
+}
+
+static int
+parse_segments_nb(struct cperf_options *opts, const char *arg)
+{
+	int ret = parse_uint32_t(&opts->segments_nb, arg);
+
+	if (ret) {
+		RTE_LOG(ERR, USER1, "failed to parse segments number\n");
+		return -1;
+	}
+
+	if ((opts->segments_nb == 0) || (opts->segments_nb > 255)) {
+		RTE_LOG(ERR, USER1, "invalid segments number specified\n");
+		return -1;
+	}
+
+	return 0;
+}
+
+static int
+parse_device_type(struct cperf_options *opts, const char *arg)
+{
+	if (strlen(arg) > (sizeof(opts->device_type) - 1))
+		return -1;
+
+	strncpy(opts->device_type, arg, sizeof(opts->device_type));
+
+	return 0;
+}
+
+static int
+parse_op_type(struct cperf_options *opts, const char *arg)
+{
+	struct name_id_map optype_namemap[] = {
+		{
+			cperf_op_type_strs[CPERF_CIPHER_ONLY],
+			CPERF_CIPHER_ONLY
+		},
+		{
+			cperf_op_type_strs[CPERF_AUTH_ONLY],
+			CPERF_AUTH_ONLY
+		},
+		{
+			cperf_op_type_strs[CPERF_CIPHER_THEN_AUTH],
+			CPERF_CIPHER_THEN_AUTH
+		},
+		{
+			cperf_op_type_strs[CPERF_AUTH_THEN_CIPHER],
+			CPERF_AUTH_THEN_CIPHER
+		},
+		{
+			cperf_op_type_strs[CPERF_AEAD],
+			CPERF_AEAD
+		}
+	};
+
+	int id = get_str_key_id_mapping(optype_namemap,
+			RTE_DIM(optype_namemap), arg);
+	if (id < 0) {
+		RTE_LOG(ERR, USER1, "invalid opt type specified\n");
+		return -1;
+	}
+
+	opts->op_type = (enum cperf_op_type)id;
+
+	return 0;
+}
+
+static int
+parse_sessionless(struct cperf_options *opts,
+		const char *arg __rte_unused)
+{
+	opts->sessionless = 1;
+	return 0;
+}
+
+static int
+parse_out_of_place(struct cperf_options *opts,
+		const char *arg __rte_unused)
+{
+	opts->out_of_place = 1;
+	return 0;
+}
+
+static int
+parse_verify(struct cperf_options *opts,
+		const char *arg __rte_unused)
+{
+	opts->verify = 1;
+
+	return 0;
+}
+
+static int
+parse_test_file(struct cperf_options *opts,
+		const char *arg)
+{
+	opts->test_file = strdup(arg);
+	if (access(opts->test_file, F_OK) != -1)
+		return 0;
+	RTE_LOG(ERR, USER1, "Test vector file doesn't exist\n");
+
+	return -1;
+}
+
+static int
+parse_test_name(struct cperf_options *opts,
+		const char *arg)
+{
+	char *test_name = (char *) rte_zmalloc(NULL,
+		sizeof(char) * (strlen(arg) + 3), 0);
+	snprintf(test_name, strlen(arg) + 3, "[%s]", arg);
+	opts->test_name = test_name;
+
+	return 0;
+}
+
+static int
+parse_silent(struct cperf_options *opts,
+		const char *arg __rte_unused)
+{
+	opts->silent = 1;
+
+	return 0;
+}
+
+static int
+parse_cipher_algo(struct cperf_options *opts, const char *arg)
+{
+	struct name_id_map cipher_algo_namemap[] = {
+		{
+			rte_crypto_cipher_algorithm_strings
+			[RTE_CRYPTO_CIPHER_3DES_CBC],
+			RTE_CRYPTO_CIPHER_3DES_CBC
+		},
+		{
+			rte_crypto_cipher_algorithm_strings
+			[RTE_CRYPTO_CIPHER_3DES_ECB],
+			RTE_CRYPTO_CIPHER_3DES_ECB
+		},
+		{
+			rte_crypto_cipher_algorithm_strings
+			[RTE_CRYPTO_CIPHER_3DES_CTR],
+			RTE_CRYPTO_CIPHER_3DES_CTR
+		},
+		{
+			rte_crypto_cipher_algorithm_strings
+			[RTE_CRYPTO_CIPHER_AES_CBC],
+			RTE_CRYPTO_CIPHER_AES_CBC
+		},
+		{
+			rte_crypto_cipher_algorithm_strings
+			[RTE_CRYPTO_CIPHER_AES_CCM],
+			RTE_CRYPTO_CIPHER_AES_CCM
+		},
+		{
+			rte_crypto_cipher_algorithm_strings
+			[RTE_CRYPTO_CIPHER_AES_CTR],
+			RTE_CRYPTO_CIPHER_AES_CTR
+		},
+		{
+			rte_crypto_cipher_algorithm_strings
+			[RTE_CRYPTO_CIPHER_AES_ECB],
+			RTE_CRYPTO_CIPHER_AES_ECB
+		},
+		{
+			rte_crypto_cipher_algorithm_strings
+			[RTE_CRYPTO_CIPHER_AES_GCM],
+			RTE_CRYPTO_CIPHER_AES_GCM
+		},
+		{
+			rte_crypto_cipher_algorithm_strings
+			[RTE_CRYPTO_CIPHER_AES_F8],
+			RTE_CRYPTO_CIPHER_AES_F8
+		},
+		{
+			rte_crypto_cipher_algorithm_strings
+			[RTE_CRYPTO_CIPHER_AES_XTS],
+			RTE_CRYPTO_CIPHER_AES_XTS
+		},
+		{
+			rte_crypto_cipher_algorithm_strings
+			[RTE_CRYPTO_CIPHER_ARC4],
+			RTE_CRYPTO_CIPHER_ARC4
+		},
+		{
+			rte_crypto_cipher_algorithm_strings
+			[RTE_CRYPTO_CIPHER_NULL],
+			RTE_CRYPTO_CIPHER_NULL
+		},
+		{
+			rte_crypto_cipher_algorithm_strings
+			[RTE_CRYPTO_CIPHER_KASUMI_F8],
+			RTE_CRYPTO_CIPHER_KASUMI_F8
+		},
+		{
+			rte_crypto_cipher_algorithm_strings
+			[RTE_CRYPTO_CIPHER_SNOW3G_UEA2],
+			RTE_CRYPTO_CIPHER_SNOW3G_UEA2
+		},
+		{
+			rte_crypto_cipher_algorithm_strings
+			[RTE_CRYPTO_CIPHER_ZUC_EEA3],
+			RTE_CRYPTO_CIPHER_ZUC_EEA3
+		},
+	};
+
+
+	int id = get_str_key_id_mapping(cipher_algo_namemap,
+			RTE_DIM(cipher_algo_namemap), arg);
+	if (id < 0) {
+		RTE_LOG(ERR, USER1, "Invalid cipher algorithm specified/n");
+		return -1;
+	}
+
+	opts->cipher_algo = (enum rte_crypto_cipher_algorithm)id;
+
+	return 0;
+}
+
+static int
+parse_cipher_op(struct cperf_options *opts, const char *arg)
+{
+	struct name_id_map cipher_op_namemap[] = {
+		{
+			rte_crypto_cipher_operation_strings
+			[RTE_CRYPTO_CIPHER_OP_ENCRYPT],
+			RTE_CRYPTO_CIPHER_OP_ENCRYPT },
+		{
+			rte_crypto_cipher_operation_strings
+			[RTE_CRYPTO_CIPHER_OP_DECRYPT],
+			RTE_CRYPTO_CIPHER_OP_DECRYPT
+		}
+	};
+
+	int id = get_str_key_id_mapping(cipher_op_namemap,
+			RTE_DIM(cipher_op_namemap), arg);
+	if (id < 0) {
+		RTE_LOG(ERR, USER1, "Invalid cipher operation specified/n");
+		return -1;
+	}
+
+	opts->cipher_op = (enum rte_crypto_cipher_operation)id;
+
+	return 0;
+}
+
+static int
+parse_cipher_key_sz(struct cperf_options *opts, const char *arg)
+{
+	return parse_uint16_t(&opts->cipher_key_sz, arg);
+}
+
+static int
+parse_cipher_iv_sz(struct cperf_options *opts, const char *arg)
+{
+	return parse_uint16_t(&opts->cipher_iv_sz, arg);
+}
+
+static int
+parse_auth_algo(struct cperf_options *opts, const char *arg) {
+	struct name_id_map cipher_auth_namemap[] = {
+		{
+			rte_crypto_auth_algorithm_strings
+			[RTE_CRYPTO_AUTH_AES_CBC_MAC],
+			RTE_CRYPTO_AUTH_AES_CBC_MAC
+		},
+		{
+			rte_crypto_auth_algorithm_strings
+			[RTE_CRYPTO_AUTH_AES_CCM],
+			RTE_CRYPTO_AUTH_AES_CCM
+		},
+		{
+			rte_crypto_auth_algorithm_strings
+			[RTE_CRYPTO_AUTH_AES_CMAC],
+			RTE_CRYPTO_AUTH_AES_CMAC
+		},
+		{
+			rte_crypto_auth_algorithm_strings
+			[RTE_CRYPTO_AUTH_AES_GCM],
+			RTE_CRYPTO_AUTH_AES_GCM
+		},
+		{
+			rte_crypto_auth_algorithm_strings
+			[RTE_CRYPTO_AUTH_AES_GMAC],
+			RTE_CRYPTO_AUTH_AES_GMAC
+		},
+		{
+			rte_crypto_auth_algorithm_strings
+			[RTE_CRYPTO_AUTH_AES_XCBC_MAC],
+			RTE_CRYPTO_AUTH_AES_XCBC_MAC
+		},
+		{
+			rte_crypto_auth_algorithm_strings
+			[RTE_CRYPTO_AUTH_MD5],
+			RTE_CRYPTO_AUTH_MD5
+		},
+		{
+			rte_crypto_auth_algorithm_strings
+			[RTE_CRYPTO_AUTH_MD5_HMAC],
+			RTE_CRYPTO_AUTH_MD5_HMAC
+		},
+		{
+			rte_crypto_auth_algorithm_strings
+			[RTE_CRYPTO_AUTH_SHA1],
+			RTE_CRYPTO_AUTH_SHA1
+		},
+		{
+			rte_crypto_auth_algorithm_strings
+			[RTE_CRYPTO_AUTH_SHA1_HMAC],
+			RTE_CRYPTO_AUTH_SHA1_HMAC
+		},
+		{
+			rte_crypto_auth_algorithm_strings
+			[RTE_CRYPTO_AUTH_SHA224],
+			RTE_CRYPTO_AUTH_SHA224
+		},
+		{
+			rte_crypto_auth_algorithm_strings
+			[RTE_CRYPTO_AUTH_SHA224_HMAC],
+			RTE_CRYPTO_AUTH_SHA224_HMAC
+		},
+		{
+			rte_crypto_auth_algorithm_strings
+			[RTE_CRYPTO_AUTH_SHA256],
+			RTE_CRYPTO_AUTH_SHA256
+		},
+		{
+			rte_crypto_auth_algorithm_strings
+			[RTE_CRYPTO_AUTH_SHA256_HMAC],
+			RTE_CRYPTO_AUTH_SHA256_HMAC
+		},
+		{
+			rte_crypto_auth_algorithm_strings
+			[RTE_CRYPTO_AUTH_SHA384],
+			RTE_CRYPTO_AUTH_SHA384
+		},
+		{
+			rte_crypto_auth_algorithm_strings
+			[RTE_CRYPTO_AUTH_SHA384_HMAC],
+			RTE_CRYPTO_AUTH_SHA384_HMAC
+		},
+		{
+			rte_crypto_auth_algorithm_strings
+			[RTE_CRYPTO_AUTH_SHA512],
+			RTE_CRYPTO_AUTH_SHA512
+		},
+		{
+			rte_crypto_auth_algorithm_strings
+			[RTE_CRYPTO_AUTH_SHA512_HMAC],
+			RTE_CRYPTO_AUTH_SHA512_HMAC
+		},
+		{
+			rte_crypto_auth_algorithm_strings
+			[RTE_CRYPTO_AUTH_KASUMI_F9],
+			RTE_CRYPTO_AUTH_KASUMI_F9
+		},
+		{
+			rte_crypto_auth_algorithm_strings
+			[RTE_CRYPTO_AUTH_SNOW3G_UIA2],
+			RTE_CRYPTO_AUTH_SNOW3G_UIA2
+		},
+		{
+			rte_crypto_auth_algorithm_strings
+			[RTE_CRYPTO_AUTH_ZUC_EIA3],
+			RTE_CRYPTO_AUTH_ZUC_EIA3
+		},
+	};
+
+
+	int id = get_str_key_id_mapping(cipher_auth_namemap,
+			RTE_DIM(cipher_auth_namemap), arg);
+	if (id < 0) {
+		RTE_LOG(ERR, USER1, "invalid authentication algorithm specified"
+				"\n");
+		return -1;
+	}
+
+	opts->auth_algo = (enum rte_crypto_auth_algorithm)id;
+
+	return 0;
+}
+
+static int
+parse_auth_op(struct cperf_options *opts, const char *arg)
+{
+	struct name_id_map auth_op_namemap[] = {
+		{
+			rte_crypto_auth_operation_strings
+			[RTE_CRYPTO_AUTH_OP_GENERATE],
+			RTE_CRYPTO_AUTH_OP_GENERATE },
+		{
+			rte_crypto_auth_operation_strings
+			[RTE_CRYPTO_AUTH_OP_VERIFY],
+			RTE_CRYPTO_AUTH_OP_VERIFY
+		}
+	};
+
+	int id = get_str_key_id_mapping(auth_op_namemap,
+			RTE_DIM(auth_op_namemap), arg);
+	if (id < 0) {
+		RTE_LOG(ERR, USER1, "invalid authentication operation specified"
+				"\n");
+		return -1;
+	}
+
+	opts->auth_op = (enum rte_crypto_auth_operation)id;
+
+	return 0;
+}
+
+static int
+parse_auth_key_sz(struct cperf_options *opts, const char *arg)
+{
+	return parse_uint16_t(&opts->auth_key_sz, arg);
+}
+
+static int
+parse_auth_digest_sz(struct cperf_options *opts, const char *arg)
+{
+	return parse_uint16_t(&opts->auth_digest_sz, arg);
+}
+
+static int
+parse_auth_aad_sz(struct cperf_options *opts, const char *arg)
+{
+	return parse_uint16_t(&opts->auth_aad_sz, arg);
+}
+
+static int
+parse_csv_friendly(struct cperf_options *opts, const char *arg __rte_unused)
+{
+	opts->csv = 1;
+	opts->silent = 1;
+	return 0;
+}
+
+typedef int (*option_parser_t)(struct cperf_options *opts,
+		const char *arg);
+
+struct long_opt_parser {
+	const char *lgopt_name;
+	option_parser_t parser_fn;
+
+};
+
+static struct option lgopts[] = {
+
+	{ CPERF_PTEST_TYPE, required_argument, 0, 0 },
+
+	{ CPERF_POOL_SIZE, required_argument, 0, 0 },
+	{ CPERF_TOTAL_OPS, required_argument, 0, 0 },
+	{ CPERF_BURST_SIZE, required_argument, 0, 0 },
+	{ CPERF_BUFFER_SIZE, required_argument, 0, 0 },
+	{ CPERF_SEGMENTS_NB, required_argument, 0, 0 },
+
+	{ CPERF_DEVTYPE, required_argument, 0, 0 },
+	{ CPERF_OPTYPE, required_argument, 0, 0 },
+
+	{ CPERF_SILENT, no_argument, 0, 0 },
+	{ CPERF_SESSIONLESS, no_argument, 0, 0 },
+	{ CPERF_OUT_OF_PLACE, no_argument, 0, 0 },
+	{ CPERF_VERIFY, no_argument, 0, 0 },
+	{ CPERF_TEST_FILE, required_argument, 0, 0 },
+	{ CPERF_TEST_NAME, required_argument, 0, 0 },
+
+	{ CPERF_CIPHER_ALGO, required_argument, 0, 0 },
+	{ CPERF_CIPHER_OP, required_argument, 0, 0 },
+
+	{ CPERF_CIPHER_KEY_SZ, required_argument, 0, 0 },
+	{ CPERF_CIPHER_IV_SZ, required_argument, 0, 0 },
+
+	{ CPERF_AUTH_ALGO, required_argument, 0, 0 },
+	{ CPERF_AUTH_OP, required_argument, 0, 0 },
+
+	{ CPERF_AUTH_KEY_SZ, required_argument, 0, 0 },
+	{ CPERF_AUTH_DIGEST_SZ, required_argument, 0, 0 },
+	{ CPERF_AUTH_AAD_SZ, required_argument, 0, 0 },
+	{ CPERF_CSV, no_argument, 0, 0},
+
+	{ NULL, 0, 0, 0 }
+};
+
+void
+cperf_options_default(struct cperf_options *opts)
+{
+	opts->test = CPERF_TEST_TYPE_THROUGHPUT;
+
+	opts->pool_sz = 100000;
+	opts->total_ops = 10000000;
+	opts->burst_sz = 32;
+	opts->buffer_sz = 64;
+	opts->segments_nb = 1;
+
+	strncpy(opts->device_type, "crypto_aesni_mb",
+			sizeof(opts->device_type));
+
+	opts->op_type = CPERF_CIPHER_THEN_AUTH;
+
+	opts->silent = 0;
+	opts->verify = 0;
+	opts->test_file = NULL;
+	opts->test_name = NULL;
+	opts->sessionless = 0;
+	opts->out_of_place = 0;
+
+	opts->cipher_algo = RTE_CRYPTO_CIPHER_AES_CBC;
+	opts->cipher_op = RTE_CRYPTO_CIPHER_OP_ENCRYPT;
+	opts->cipher_key_sz = 16;
+	opts->cipher_iv_sz = 16;
+
+	opts->auth_algo = RTE_CRYPTO_AUTH_SHA1_HMAC;
+	opts->auth_op = RTE_CRYPTO_AUTH_OP_GENERATE;
+
+	opts->auth_key_sz = 64;
+	opts->auth_digest_sz = 12;
+	opts->auth_aad_sz = 0;
+}
+
+static int
+cperf_opts_parse_long(int opt_idx, struct cperf_options *opts)
+{
+	struct long_opt_parser parsermap[] = {
+		{ CPERF_PTEST_TYPE,	parse_cperf_test_type },
+		{ CPERF_SILENT,		parse_silent },
+		{ CPERF_POOL_SIZE,	parse_pool_sz },
+		{ CPERF_TOTAL_OPS,	parse_total_ops },
+		{ CPERF_BURST_SIZE,	parse_burst_sz },
+		{ CPERF_BUFFER_SIZE,	parse_buffer_sz },
+		{ CPERF_SEGMENTS_NB,	parse_segments_nb },
+		{ CPERF_DEVTYPE,	parse_device_type },
+		{ CPERF_OPTYPE,		parse_op_type },
+		{ CPERF_SESSIONLESS,	parse_sessionless },
+		{ CPERF_OUT_OF_PLACE,	parse_out_of_place },
+		{ CPERF_VERIFY,		parse_verify },
+		{ CPERF_TEST_FILE,	parse_test_file },
+		{ CPERF_TEST_NAME,	parse_test_name },
+		{ CPERF_CIPHER_ALGO,	parse_cipher_algo },
+		{ CPERF_CIPHER_OP,	parse_cipher_op },
+		{ CPERF_CIPHER_KEY_SZ,	parse_cipher_key_sz },
+		{ CPERF_CIPHER_IV_SZ,	parse_cipher_iv_sz },
+		{ CPERF_AUTH_ALGO,	parse_auth_algo },
+		{ CPERF_AUTH_OP,	parse_auth_op },
+		{ CPERF_AUTH_KEY_SZ,	parse_auth_key_sz },
+		{ CPERF_AUTH_DIGEST_SZ,	parse_auth_digest_sz },
+		{ CPERF_AUTH_AAD_SZ,	parse_auth_aad_sz },
+		{ CPERF_CSV,	parse_csv_friendly},
+	};
+	unsigned int i;
+
+	for (i = 0; i < RTE_DIM(parsermap); i++) {
+		if (strncmp(lgopts[opt_idx].name, parsermap[i].lgopt_name,
+				strlen(lgopts[opt_idx].name)) == 0)
+			return parsermap[i].parser_fn(opts, optarg);
+	}
+
+	return -EINVAL;
+}
+
+int
+cperf_options_parse(struct cperf_options *options, int argc, char **argv)
+{
+	int opt, retval, opt_idx;
+
+	while ((opt = getopt_long(argc, argv, "", lgopts, &opt_idx)) != EOF) {
+		switch (opt) {
+		/* long options */
+		case 0:
+
+			retval = cperf_opts_parse_long(opt_idx, options);
+			if (retval != 0)
+				return retval;
+
+			break;
+
+		default:
+			return -EINVAL;
+		}
+	}
+
+	return 0;
+}
+
+int
+cperf_options_check(struct cperf_options *options)
+{
+	if (options->segments_nb > options->buffer_sz) {
+		RTE_LOG(ERR, USER1,
+				"Segments number greater than buffer size.\n");
+		return -EINVAL;
+	}
+
+	if (options->verify && options->test_file == NULL) {
+		RTE_LOG(ERR, USER1, "Define path to the file with test"
+				" vectors.\n");
+		return -EINVAL;
+	}
+
+	if (options->test_name != NULL && options->test_file == NULL) {
+		RTE_LOG(ERR, USER1, "Define path to the file with test"
+				" vectors.\n");
+		return -EINVAL;
+	}
+
+	if (options->auth_op == RTE_CRYPTO_AUTH_OP_VERIFY &&
+			options->test_file == NULL) {
+		RTE_LOG(ERR, USER1, "Define path to the file with test"
+				" vectors.\n");
+		return -EINVAL;
+	}
+
+	if (options->verify &&
+			options->total_ops > options->pool_sz) {
+		RTE_LOG(ERR, USER1, "Total number of ops must be less than or"
+				" equal to the pool size.\n");
+		return -EINVAL;
+	}
+
+	if (options->op_type == CPERF_CIPHER_THEN_AUTH) {
+		if (options->cipher_op != RTE_CRYPTO_CIPHER_OP_ENCRYPT &&
+				options->auth_op !=
+				RTE_CRYPTO_AUTH_OP_GENERATE) {
+			RTE_LOG(ERR, USER1, "Option cipher then auth must use"
+					" options: encrypt and generate.\n");
+			return -EINVAL;
+		}
+	} else if (options->op_type == CPERF_AUTH_THEN_CIPHER) {
+		if (options->cipher_op != RTE_CRYPTO_CIPHER_OP_DECRYPT &&
+				options->auth_op !=
+				RTE_CRYPTO_AUTH_OP_VERIFY) {
+			RTE_LOG(ERR, USER1, "Option auth then cipher must use"
+					" options: decrypt and verify.\n");
+			return -EINVAL;
+		}
+	} else if (options->op_type == CPERF_AEAD) {
+		if (!(options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT &&
+				options->auth_op ==
+				RTE_CRYPTO_AUTH_OP_GENERATE) ||
+				!(options->cipher_op ==
+				RTE_CRYPTO_CIPHER_OP_DECRYPT &&
+				options->auth_op ==
+				RTE_CRYPTO_AUTH_OP_VERIFY)) {
+			RTE_LOG(ERR, USER1, "Use together options: encrypt and"
+					" generate or decrypt and verify.\n");
+			return -EINVAL;
+		}
+	}
+
+	return 0;
+}
+
+void
+cperf_options_dump(struct cperf_options *opts)
+{
+	printf("# Crypto Performance Application Options:\n");
+	printf("#\n");
+	printf("# cperf test: %s\n", cperf_test_type_strs[opts->test]);
+	printf("#\n");
+	printf("# size of crypto op / mbuf pool: %u\n", opts->pool_sz);
+	printf("# total number of ops: %u\n", opts->total_ops);
+	printf("# burst size: %u\n", opts->burst_sz);
+	printf("# buffer size: %u\n", opts->buffer_sz);
+	printf("# segments per buffer: %u\n", opts->segments_nb);
+	printf("#\n");
+	printf("# cryptodev type: %s\n", opts->device_type);
+	printf("#\n");
+	printf("# crypto operation: %s\n", cperf_op_type_strs[opts->op_type]);
+	printf("# verify operation: %s\n", opts->verify ? "yes" : "no");
+	printf("# sessionless: %s\n", opts->sessionless ? "yes" : "no");
+	printf("# out of place: %s\n", opts->out_of_place ? "yes" : "no");
+
+	printf("#\n");
+
+	if (opts->op_type == CPERF_AUTH_ONLY ||
+			opts->op_type == CPERF_CIPHER_THEN_AUTH ||
+			opts->op_type == CPERF_AUTH_THEN_CIPHER ||
+			opts->op_type == CPERF_AEAD) {
+		printf("# auth algorithm: %s\n",
+			rte_crypto_auth_algorithm_strings[opts->auth_algo]);
+		printf("# auth operation: %s\n",
+			rte_crypto_auth_operation_strings[opts->auth_op]);
+		printf("# auth key size: %u\n", opts->auth_key_sz);
+		printf("# auth digest size: %u\n", opts->auth_digest_sz);
+		printf("# auth aad size: %u\n", opts->auth_aad_sz);
+		printf("#\n");
+	}
+
+	if (opts->op_type == CPERF_CIPHER_ONLY ||
+			opts->op_type == CPERF_CIPHER_THEN_AUTH ||
+			opts->op_type == CPERF_AUTH_THEN_CIPHER ||
+			opts->op_type == CPERF_AEAD) {
+		printf("# cipher algorithm: %s\n",
+			rte_crypto_cipher_algorithm_strings[opts->cipher_algo]);
+		printf("# cipher operation: %s\n",
+			rte_crypto_cipher_operation_strings[opts->cipher_op]);
+		printf("# cipher key size: %u\n", opts->cipher_key_sz);
+		printf("# cipher iv size: %u\n", opts->cipher_iv_sz);
+		printf("#\n");
+	}
+}
diff --git a/app/crypto-perf/cperf_test_latency.c b/app/crypto-perf/cperf_test_latency.c
new file mode 100644
index 0000000..3196c2f
--- /dev/null
+++ b/app/crypto-perf/cperf_test_latency.c
@@ -0,0 +1,685 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2016 Intel Corporation. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <rte_malloc.h>
+#include <rte_cycles.h>
+#include <rte_crypto.h>
+#include <rte_cryptodev.h>
+
+#include "cperf_test_latency.h"
+#include "cperf_ops.h"
+
+
+struct cperf_latency_results {
+
+	uint64_t ops_failed;
+
+	uint64_t enqd_tot;
+	uint64_t enqd_max;
+	uint64_t enqd_min;
+
+	uint64_t deqd_tot;
+	uint64_t deqd_max;
+	uint64_t deqd_min;
+
+	uint64_t cycles_tot;
+	uint64_t cycles_max;
+	uint64_t cycles_min;
+
+	uint64_t burst_num;
+	uint64_t num;
+};
+
+struct cperf_op_result {
+	uint64_t tsc_start;
+	uint64_t tsc_end;
+	enum rte_crypto_op_status status;
+};
+
+struct cperf_latency_ctx {
+	uint8_t dev_id;
+	uint16_t qp_id;
+	uint8_t lcore_id;
+
+	struct rte_mempool *pkt_mbuf_pool_in;
+	struct rte_mempool *pkt_mbuf_pool_out;
+	struct rte_mbuf **mbufs_in;
+	struct rte_mbuf **mbufs_out;
+
+	struct rte_mempool *crypto_op_pool;
+
+	struct rte_cryptodev_sym_session *sess;
+
+	cperf_populate_ops_t populate_ops;
+	cperf_verify_crypto_op_t verify_op_output;
+
+	const struct cperf_options *options;
+	const struct cperf_test_vector *test_vector;
+	struct cperf_op_result *res;
+	struct cperf_latency_results results;
+};
+
+#define max(a, b) (a > b ? (uint64_t)a : (uint64_t)b)
+#define min(a, b) (a < b ? (uint64_t)a : (uint64_t)b)
+
+static void
+cperf_latency_test_free(struct cperf_latency_ctx *ctx, uint32_t mbuf_nb)
+{
+	uint32_t i;
+
+	if (ctx) {
+		if (ctx->sess)
+			rte_cryptodev_sym_session_free(ctx->dev_id, ctx->sess);
+
+		if (ctx->mbufs_in) {
+			for (i = 0; i < mbuf_nb; i++)
+				rte_pktmbuf_free(ctx->mbufs_in[i]);
+
+			rte_free(ctx->mbufs_in);
+		}
+
+		if (ctx->mbufs_out) {
+			for (i = 0; i < mbuf_nb; i++) {
+				if (ctx->mbufs_out[i] != NULL)
+					rte_pktmbuf_free(ctx->mbufs_out[i]);
+			}
+
+			rte_free(ctx->mbufs_out);
+		}
+
+		if (ctx->pkt_mbuf_pool_in)
+			rte_mempool_free(ctx->pkt_mbuf_pool_in);
+
+		if (ctx->pkt_mbuf_pool_out)
+			rte_mempool_free(ctx->pkt_mbuf_pool_out);
+
+		if (ctx->crypto_op_pool)
+			rte_mempool_free(ctx->crypto_op_pool);
+
+		rte_free(ctx->res);
+		rte_free(ctx);
+	}
+}
+
+static struct rte_mbuf *
+cperf_mbuf_create(struct rte_mempool *mempool,
+		uint32_t segments_nb,
+		const struct cperf_options *options,
+		const struct cperf_test_vector *test_vector)
+{
+	struct rte_mbuf *mbuf;
+	uint32_t segment_sz = options->buffer_sz / segments_nb;
+	uint32_t last_sz = options->buffer_sz % segments_nb;
+	uint8_t *mbuf_data;
+	uint8_t *test_data =
+			(options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) ?
+					test_vector->plaintext.data :
+					test_vector->ciphertext.data;
+
+	mbuf = rte_pktmbuf_alloc(mempool);
+	if (mbuf == NULL)
+		goto error;
+
+	mbuf_data = (uint8_t *)rte_pktmbuf_append(mbuf, segment_sz);
+	if (mbuf_data == NULL)
+		goto error;
+
+	memcpy(mbuf_data, test_data, segment_sz);
+	test_data += segment_sz;
+	segments_nb--;
+
+	while (segments_nb) {
+		struct rte_mbuf *m;
+
+		m = rte_pktmbuf_alloc(mempool);
+		if (m == NULL)
+			goto error;
+
+		rte_pktmbuf_chain(mbuf, m);
+
+		mbuf_data = (uint8_t *)rte_pktmbuf_append(mbuf, segment_sz);
+		if (mbuf_data == NULL)
+			goto error;
+
+		memcpy(mbuf_data, test_data, segment_sz);
+		test_data += segment_sz;
+		segments_nb--;
+	}
+
+	if (last_sz) {
+		mbuf_data = (uint8_t *)rte_pktmbuf_append(mbuf, last_sz);
+		if (mbuf_data == NULL)
+			goto error;
+
+		memcpy(mbuf_data, test_data, last_sz);
+	}
+
+	mbuf_data = (uint8_t *)rte_pktmbuf_append(mbuf,
+			options->auth_digest_sz);
+	if (mbuf_data == NULL)
+		goto error;
+
+	if (options->op_type == CPERF_AEAD) {
+		uint8_t *aead = (uint8_t *)rte_pktmbuf_prepend(mbuf,
+			RTE_ALIGN_CEIL(options->auth_aad_sz, 16));
+
+		if (aead == NULL)
+			goto error;
+
+		memcpy(aead, test_vector->aad.data, test_vector->aad.length);
+	}
+
+	return mbuf;
+error:
+	if (mbuf != NULL)
+		rte_pktmbuf_free(mbuf);
+
+	return NULL;
+}
+
+void *
+cperf_latency_test_constructor(uint8_t dev_id, uint16_t qp_id,
+		const struct cperf_options *options,
+		const struct cperf_test_vector *test_vector,
+		const struct cperf_op_fns *op_fns)
+{
+	struct cperf_latency_ctx *ctx = NULL;
+	unsigned int mbuf_idx = 0;
+	char pool_name[32] = "";
+
+	ctx = rte_malloc(NULL, sizeof(struct cperf_latency_ctx), 0);
+	if (ctx == NULL)
+		goto err;
+
+	ctx->dev_id = dev_id;
+	ctx->qp_id = qp_id;
+
+	ctx->populate_ops = op_fns->populate_ops;
+	ctx->options = options;
+	ctx->test_vector = test_vector;
+
+	ctx->sess = op_fns->sess_create(dev_id, options, test_vector);
+	if (ctx->sess == NULL)
+		goto err;
+
+	snprintf(pool_name, sizeof(pool_name), "cperf_pool_in_cdev_%d",
+				dev_id);
+
+	ctx->pkt_mbuf_pool_in = rte_pktmbuf_pool_create(pool_name,
+			options->pool_sz * options->segments_nb, 0, 0,
+			RTE_PKTMBUF_HEADROOM +
+			RTE_CACHE_LINE_ROUNDUP(
+				(options->buffer_sz / options->segments_nb) +
+				(options->buffer_sz % options->segments_nb) +
+					options->auth_digest_sz),
+			rte_socket_id());
+
+	if (ctx->pkt_mbuf_pool_in == NULL)
+		goto err;
+
+	/* Generate mbufs_in with plaintext populated for test */
+	if (ctx->options->pool_sz % ctx->options->burst_sz)
+		goto err;
+
+	ctx->mbufs_in = rte_malloc(NULL,
+			(sizeof(struct rte_mbuf *) *
+			ctx->options->pool_sz), 0);
+
+	for (mbuf_idx = 0; mbuf_idx < options->pool_sz; mbuf_idx++) {
+		ctx->mbufs_in[mbuf_idx] = cperf_mbuf_create(
+				ctx->pkt_mbuf_pool_in, options->segments_nb,
+				options, test_vector);
+		if (ctx->mbufs_in[mbuf_idx] == NULL)
+			goto err;
+	}
+
+	if (options->out_of_place == 1)	{
+
+		snprintf(pool_name, sizeof(pool_name),
+				"cperf_pool_out_cdev_%d",
+				dev_id);
+
+		ctx->pkt_mbuf_pool_out = rte_pktmbuf_pool_create(
+				pool_name, options->pool_sz, 0, 0,
+				RTE_PKTMBUF_HEADROOM +
+				RTE_CACHE_LINE_ROUNDUP(
+					options->buffer_sz +
+					options->auth_digest_sz),
+				rte_socket_id());
+
+		if (ctx->pkt_mbuf_pool_out == NULL)
+			goto err;
+	}
+
+	ctx->mbufs_out = rte_malloc(NULL,
+			(sizeof(struct rte_mbuf *) *
+			ctx->options->pool_sz), 0);
+
+	for (mbuf_idx = 0; mbuf_idx < options->pool_sz; mbuf_idx++) {
+		if (options->out_of_place == 1)	{
+			ctx->mbufs_out[mbuf_idx] = cperf_mbuf_create(
+					ctx->pkt_mbuf_pool_out, 1,
+					options, test_vector);
+			if (ctx->mbufs_out[mbuf_idx] == NULL)
+				goto err;
+		} else {
+			ctx->mbufs_out[mbuf_idx] = NULL;
+		}
+	}
+
+	snprintf(pool_name, sizeof(pool_name), "cperf_op_pool_cdev_%d",
+			dev_id);
+
+	ctx->crypto_op_pool = rte_crypto_op_pool_create(pool_name,
+			RTE_CRYPTO_OP_TYPE_SYMMETRIC, options->pool_sz, 0, 0,
+			rte_socket_id());
+	if (ctx->crypto_op_pool == NULL)
+		goto err;
+
+	ctx->res = rte_malloc(NULL, sizeof(struct cperf_op_result) *
+			ctx->options->total_ops, 0);
+
+	if (ctx->res == NULL)
+		goto err;
+
+	return ctx;
+err:
+	cperf_latency_test_free(ctx, mbuf_idx);
+
+	return NULL;
+}
+
+static int
+cperf_latency_test_verifier(struct rte_mbuf *mbuf,
+		const struct cperf_options *options,
+		const struct cperf_test_vector *vector)
+{
+	const struct rte_mbuf *m;
+	uint32_t len;
+	uint16_t nb_segs;
+	uint8_t *data;
+	uint32_t cipher_offset, auth_offset;
+	uint8_t	cipher, auth;
+	int res = 0;
+
+	m = mbuf;
+	nb_segs = m->nb_segs;
+	len = 0;
+	while (m && nb_segs != 0) {
+		len += m->data_len;
+		m = m->next;
+		nb_segs--;
+	}
+
+	data = rte_malloc(NULL, len, 0);
+	if (data == NULL)
+		return 1;
+
+	m = mbuf;
+	nb_segs = m->nb_segs;
+	len = 0;
+	while (m && nb_segs != 0) {
+		memcpy(data + len, rte_pktmbuf_mtod(m, uint8_t *),
+				m->data_len);
+		len += m->data_len;
+		m = m->next;
+		nb_segs--;
+	}
+
+	switch (options->op_type) {
+	case CPERF_CIPHER_ONLY:
+		cipher = 1;
+		cipher_offset = 0;
+		auth = 0;
+		auth_offset = 0;
+		break;
+	case CPERF_CIPHER_THEN_AUTH:
+		cipher = 1;
+		cipher_offset = 0;
+		auth = 1;
+		auth_offset = vector->plaintext.length;
+		break;
+	case CPERF_AUTH_ONLY:
+		cipher = 0;
+		cipher_offset = 0;
+		auth = 1;
+		auth_offset = vector->plaintext.length;
+		break;
+	case CPERF_AUTH_THEN_CIPHER:
+		cipher = 1;
+		cipher_offset = 0;
+		auth = 1;
+		auth_offset = vector->plaintext.length;
+		break;
+	case CPERF_AEAD:
+		cipher = 1;
+		cipher_offset = vector->aad.length;
+		auth = 1;
+		auth_offset = vector->aad.length + vector->plaintext.length;
+		break;
+	}
+
+	if (cipher == 1) {
+		if (options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT)
+			res += memcmp(data + cipher_offset,
+					vector->ciphertext.data,
+					vector->ciphertext.length);
+		else
+			res += memcmp(data + cipher_offset,
+					vector->plaintext.data,
+					vector->plaintext.length);
+	}
+
+	if (auth == 1) {
+		if (options->auth_op == RTE_CRYPTO_AUTH_OP_GENERATE)
+			res += memcmp(data + auth_offset,
+					vector->digest.data,
+					vector->digest.length);
+	}
+
+	if (res != 0)
+		res = 1;
+
+	return res;
+}
+
+int
+cperf_latency_test_runner(void *arg)
+{
+	struct cperf_latency_ctx *ctx = arg;
+	struct cperf_op_result *pres;
+
+	if (ctx == NULL)
+		return 0;
+
+	struct rte_crypto_op *ops[ctx->options->burst_sz];
+	struct rte_crypto_op *ops_processed[ctx->options->burst_sz];
+	uint64_t ops_enqd = 0, ops_deqd = 0;
+	uint16_t ops_unused = 0;
+	uint64_t m_idx = 0, b_idx = 0, i;
+
+	uint64_t tsc_val, tsc_end, tsc_start;
+	uint64_t tsc_max = 0, tsc_min = ~0UL, tsc_tot = 0, tsc_idx = 0;
+	uint64_t enqd_max = 0, enqd_min = ~0UL, enqd_tot = 0;
+	uint64_t deqd_max = 0, deqd_min = ~0UL, deqd_tot = 0;
+
+	uint32_t lcore = rte_lcore_id();
+
+#ifdef CPERF_LINEARIZATION_ENABLE
+	struct rte_cryptodev_info dev_info;
+	int linearize = 0;
+
+	/* Check if source mbufs require coalescing */
+	if (ctx->options->segments_nb > 1) {
+		rte_cryptodev_info_get(ctx->dev_id, &dev_info);
+		if ((dev_info.feature_flags &
+				RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER) == 0)
+			linearize = 1;
+	}
+#endif /* CPERF_LINEARIZATION_ENABLE */
+
+	ctx->lcore_id = lcore;
+
+	while (enqd_tot < ctx->options->total_ops) {
+
+		uint16_t burst_size = ((enqd_tot + ctx->options->burst_sz)
+				<= ctx->options->total_ops) ?
+						ctx->options->burst_sz :
+						ctx->options->total_ops -
+						enqd_tot;
+		uint16_t ops_needed = burst_size - ops_unused;
+
+		/* Allocate crypto ops from pool */
+		if (ops_needed != rte_crypto_op_bulk_alloc(
+				ctx->crypto_op_pool,
+				RTE_CRYPTO_OP_TYPE_SYMMETRIC,
+				ops, ops_needed))
+			return -1;
+
+		/* Setup crypto op, attach mbuf etc */
+		(ctx->populate_ops)(ops, &ctx->mbufs_in[m_idx],
+				&ctx->mbufs_out[m_idx],
+				ops_needed, ctx->sess, ctx->options,
+				ctx->test_vector);
+
+		tsc_start = rte_rdtsc_precise();
+
+#ifdef CPERF_LINEARIZATION_ENABLE
+		if (linearize) {
+			/* PMD doesn't support scatter-gather and source buffer
+			 * is segmented.
+			 * We need to linearize it before enqueuing.
+			 */
+			for (i = 0; i < burst_size; i++)
+				rte_pktmbuf_linearize(ops[i]->sym->m_src);
+		}
+#endif /* CPERF_LINEARIZATION_ENABLE */
+
+		/* Enqueue burst of ops on crypto device */
+		ops_enqd = rte_cryptodev_enqueue_burst(ctx->dev_id, ctx->qp_id,
+				ops, burst_size);
+
+		/* Dequeue processed burst of ops from crypto device */
+		ops_deqd = rte_cryptodev_dequeue_burst(ctx->dev_id, ctx->qp_id,
+				ops_processed, ctx->options->burst_sz);
+
+		tsc_end = rte_rdtsc_precise();
+
+		for (i = 0; i < burst_size; i++) {
+			ctx->res[tsc_idx].tsc_start = tsc_start;
+			ops[i]->opaque_data = (void *)&ctx->res[tsc_idx];
+			tsc_idx++;
+		}
+
+		/*
+		 * Calculate number of ops not enqueued (mainly for hw
+		 * accelerators whose ingress queue can fill up).
+		 */
+		ops_unused = burst_size - ops_enqd;
+
+		if (likely(ops_deqd))  {
+			/*
+			 * free crypto ops so they can be reused. We don't free
+			 * the mbufs here as we don't want to reuse them as
+			 * the crypto operation will change the data and cause
+			 * failures.
+			 */
+			for (i = 0; i < ops_deqd; i++) {
+				pres = (struct cperf_op_result *)
+						(ops_processed[i]->opaque_data);
+				pres->tsc_end = tsc_end;
+				pres->status = ops_processed[i]->status;
+
+				rte_crypto_op_free(ops_processed[i]);
+			}
+
+			deqd_tot += ops_deqd;
+			deqd_max = max(ops_deqd, deqd_max);
+			deqd_min = min(ops_deqd, deqd_min);
+		}
+
+		enqd_tot += ops_enqd;
+		enqd_max = max(ops_enqd, enqd_max);
+		enqd_min = min(ops_enqd, enqd_min);
+
+		m_idx += ops_needed;
+		m_idx = m_idx + ctx->options->burst_sz > ctx->options->pool_sz ?
+				0 : m_idx;
+		b_idx++;
+	}
+
+	/* Dequeue any operations still in the crypto device */
+	while (deqd_tot < ctx->options->total_ops) {
+		/* Sending 0 length burst to flush sw crypto device */
+		rte_cryptodev_enqueue_burst(ctx->dev_id, ctx->qp_id, NULL, 0);
+
+		/* dequeue burst */
+		ops_deqd = rte_cryptodev_dequeue_burst(ctx->dev_id, ctx->qp_id,
+				ops_processed, ctx->options->burst_sz);
+
+		tsc_end = rte_rdtsc_precise();
+
+		if (ops_deqd != 0) {
+			for (i = 0; i < ops_deqd; i++) {
+				pres = (struct cperf_op_result *)
+						(ops_processed[i]->opaque_data);
+				pres->tsc_end = tsc_end;
+				pres->status = ops_processed[i]->status;
+
+				rte_crypto_op_free(ops_processed[i]);
+			}
+
+			deqd_tot += ops_deqd;
+			deqd_max = max(ops_deqd, deqd_max);
+			deqd_min = min(ops_deqd, deqd_min);
+		}
+	}
+
+	for (i = 0; i < tsc_idx; i++) {
+		tsc_val = ctx->res[i].tsc_end - ctx->res[i].tsc_start;
+		tsc_max = max(tsc_val, tsc_max);
+		tsc_min = min(tsc_val, tsc_min);
+		tsc_tot += tsc_val;
+	}
+
+	if (ctx->options->verify) {
+		struct rte_mbuf **mbufs;
+
+		if (ctx->options->out_of_place == 1)
+			mbufs = ctx->mbufs_out;
+		else
+			mbufs = ctx->mbufs_in;
+
+		for (i = 0; i < ctx->options->total_ops; i++) {
+
+			if (ctx->res[i].status != RTE_CRYPTO_OP_STATUS_SUCCESS
+					|| cperf_latency_test_verifier(mbufs[i],
+							ctx->options,
+							ctx->test_vector)) {
+
+				ctx->results.ops_failed++;
+			}
+		}
+	}
+
+	ctx->results.enqd_tot = enqd_tot;
+	ctx->results.enqd_max = enqd_max;
+	ctx->results.enqd_min = enqd_min;
+
+	ctx->results.deqd_tot = deqd_tot;
+	ctx->results.deqd_max = deqd_max;
+	ctx->results.deqd_min = deqd_min;
+
+	ctx->results.cycles_tot = tsc_tot;
+	ctx->results.cycles_max = tsc_max;
+	ctx->results.cycles_min = tsc_min;
+
+	ctx->results.burst_num = b_idx;
+	ctx->results.num = tsc_idx;
+
+	return 0;
+}
+
+void
+cperf_latency_test_destructor(void *arg)
+{
+	struct cperf_latency_ctx *ctx = arg;
+	uint64_t i;
+	if (ctx == NULL)
+		return;
+	static int only_once;
+	uint64_t etot, eavg, emax, emin;
+	uint64_t dtot, davg, dmax, dmin;
+	uint64_t ctot, cavg, cmax, cmin;
+	double ttot, tavg, tmax, tmin;
+
+	const uint64_t tunit = 1000000; /* us */
+	const uint64_t tsc_hz = rte_get_tsc_hz();
+
+	etot = ctx->results.enqd_tot;
+	eavg = ctx->results.enqd_tot / ctx->results.burst_num;
+	emax = ctx->results.enqd_max;
+	emin = ctx->results.enqd_min;
+
+	dtot = ctx->results.deqd_tot;
+	davg = ctx->results.deqd_tot / ctx->results.burst_num;
+	dmax = ctx->results.deqd_max;
+	dmin = ctx->results.deqd_min;
+
+	ctot = ctx->results.cycles_tot;
+	cavg = ctx->results.cycles_tot / ctx->results.num;
+	cmax = ctx->results.cycles_max;
+	cmin = ctx->results.cycles_min;
+
+	ttot = tunit*(double)(ctot) / tsc_hz;
+	tavg = tunit*(double)(cavg) / tsc_hz;
+	tmax = tunit*(double)(cmax) / tsc_hz;
+	tmin = tunit*(double)(cmin) / tsc_hz;
+
+	if (ctx->options->csv) {
+		if (!only_once)
+			printf("\n# lcore, Pakt Seq #, Packet Size, cycles,"
+					" time (us)");
+
+		for (i = 0; i < ctx->options->total_ops; i++) {
+
+			printf("\n%u;%lu;%lu;%.3f", ctx->lcore_id, i + 1,
+				ctx->res[i].tsc_end - ctx->res[i].tsc_start,
+				tunit * (double) (ctx->res[i].tsc_end
+						- ctx->res[i].tsc_start)
+					/ tsc_hz);
+
+		}
+		only_once = 1;
+	} else {
+		printf("\n# Device %d on lcore %u\n", ctx->dev_id,
+			ctx->lcore_id);
+		printf("\n# total operations: %u", ctx->options->total_ops);
+		printf("\n#  verified failed: %lu", ctx->results.ops_failed);
+		printf("\n#     burst number: %lu", ctx->results.burst_num);
+		printf("\n#");
+		printf("\n#          \t       Total\t   Average\t   Maximum\t "
+				"  Minimum");
+		printf("\n#  enqueued\t%12lu\t%10lu\t%10lu\t%10lu", etot, eavg,
+			emax, emin);
+		printf("\n#  dequeued\t%12lu\t%10lu\t%10lu\t%10lu", dtot, davg,
+			dmax, dmin);
+		printf("\n#    cycles\t%12lu\t%10lu\t%10lu\t%10lu", ctot, cavg,
+			cmax, cmin);
+		printf("\n# time [us]\t%12.0f\t%10.3f\t%10.3f\t%10.3f", ttot,
+			tavg, tmax, tmin);
+		printf("\n\n");
+
+	}
+	cperf_latency_test_free(ctx, ctx->options->pool_sz);
+
+}
diff --git a/app/crypto-perf/cperf_test_latency.h b/app/crypto-perf/cperf_test_latency.h
new file mode 100644
index 0000000..5e3eea8
--- /dev/null
+++ b/app/crypto-perf/cperf_test_latency.h
@@ -0,0 +1,57 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2016 Intel Corporation. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _CPERF_LATENCY_
+#define _CPERF_LATENCY_
+
+#include <stdint.h>
+
+#include <rte_mbuf.h>
+
+#include "cperf.h"
+#include "cperf_ops.h"
+#include "cperf_options.h"
+#include "cperf_test_vectors.h"
+
+void *
+cperf_latency_test_constructor(uint8_t dev_id, uint16_t qp_id,
+		const struct cperf_options *options,
+		const struct cperf_test_vector *test_vector,
+		const struct cperf_op_fns *ops_fn);
+
+int
+cperf_latency_test_runner(void *test_ctx);
+
+void
+cperf_latency_test_destructor(void *test_ctx);
+
+#endif /* _CPERF_LATENCY_ */
diff --git a/app/crypto-perf/cperf_test_throughput.c b/app/crypto-perf/cperf_test_throughput.c
new file mode 100644
index 0000000..5128267
--- /dev/null
+++ b/app/crypto-perf/cperf_test_throughput.c
@@ -0,0 +1,651 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2016 Intel Corporation. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <rte_malloc.h>
+#include <rte_cycles.h>
+#include <rte_crypto.h>
+#include <rte_cryptodev.h>
+
+#include "cperf_test_throughput.h"
+#include "cperf_ops.h"
+
+struct cperf_throughput_results {
+	uint64_t ops_enqueued;
+	uint64_t ops_dequeued;
+
+	uint64_t ops_enqueued_failed;
+	uint64_t ops_dequeued_failed;
+
+	uint64_t ops_failed;
+
+	double ops_per_second;
+	double throughput_gbps;
+	double cycles_per_byte;
+};
+
+struct cperf_throughput_ctx {
+	uint8_t dev_id;
+	uint16_t qp_id;
+	uint8_t lcore_id;
+
+	struct rte_mempool *pkt_mbuf_pool_in;
+	struct rte_mempool *pkt_mbuf_pool_out;
+	struct rte_mbuf **mbufs_in;
+	struct rte_mbuf **mbufs_out;
+
+	struct rte_mempool *crypto_op_pool;
+
+	struct rte_cryptodev_sym_session *sess;
+
+	cperf_populate_ops_t populate_ops;
+	cperf_verify_crypto_op_t verify_op_output;
+
+	const struct cperf_options *options;
+	const struct cperf_test_vector *test_vector;
+	struct cperf_throughput_results results;
+
+};
+
+struct cperf_op_result {
+	enum rte_crypto_op_status status;
+};
+
+static void
+cperf_throughput_test_free(struct cperf_throughput_ctx *ctx, uint32_t mbuf_nb)
+{
+	uint32_t i;
+
+	if (ctx) {
+		if (ctx->sess)
+			rte_cryptodev_sym_session_free(ctx->dev_id, ctx->sess);
+
+		if (ctx->mbufs_in) {
+			for (i = 0; i < mbuf_nb; i++)
+				rte_pktmbuf_free(ctx->mbufs_in[i]);
+
+			rte_free(ctx->mbufs_in);
+		}
+
+		if (ctx->mbufs_out) {
+			for (i = 0; i < mbuf_nb; i++) {
+				if (ctx->mbufs_out[i] != NULL)
+					rte_pktmbuf_free(ctx->mbufs_out[i]);
+			}
+
+			rte_free(ctx->mbufs_out);
+		}
+
+		if (ctx->pkt_mbuf_pool_in)
+			rte_mempool_free(ctx->pkt_mbuf_pool_in);
+
+		if (ctx->pkt_mbuf_pool_out)
+			rte_mempool_free(ctx->pkt_mbuf_pool_out);
+
+		if (ctx->crypto_op_pool)
+			rte_mempool_free(ctx->crypto_op_pool);
+
+		rte_free(ctx);
+	}
+}
+
+static struct rte_mbuf *
+cperf_mbuf_create(struct rte_mempool *mempool,
+		uint32_t segments_nb,
+		const struct cperf_options *options,
+		const struct cperf_test_vector *test_vector)
+{
+	struct rte_mbuf *mbuf;
+	uint32_t segment_sz = options->buffer_sz / segments_nb;
+	uint32_t last_sz = options->buffer_sz % segments_nb;
+	uint8_t *mbuf_data;
+	uint8_t *test_data =
+			(options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) ?
+					test_vector->plaintext.data :
+					test_vector->ciphertext.data;
+
+	mbuf = rte_pktmbuf_alloc(mempool);
+	if (mbuf == NULL)
+		goto error;
+
+	mbuf_data = (uint8_t *)rte_pktmbuf_append(mbuf, segment_sz);
+	if (mbuf_data == NULL)
+		goto error;
+
+	memcpy(mbuf_data, test_data, segment_sz);
+	test_data += segment_sz;
+	segments_nb--;
+
+	while (segments_nb) {
+		struct rte_mbuf *m;
+
+		m = rte_pktmbuf_alloc(mempool);
+		if (m == NULL)
+			goto error;
+
+		rte_pktmbuf_chain(mbuf, m);
+
+		mbuf_data = (uint8_t *)rte_pktmbuf_append(mbuf, segment_sz);
+		if (mbuf_data == NULL)
+			goto error;
+
+		memcpy(mbuf_data, test_data, segment_sz);
+		test_data += segment_sz;
+		segments_nb--;
+	}
+
+	if (last_sz) {
+		mbuf_data = (uint8_t *)rte_pktmbuf_append(mbuf, last_sz);
+		if (mbuf_data == NULL)
+			goto error;
+
+		memcpy(mbuf_data, test_data, last_sz);
+	}
+
+	mbuf_data = (uint8_t *)rte_pktmbuf_append(mbuf,
+			options->auth_digest_sz);
+	if (mbuf_data == NULL)
+		goto error;
+
+	if (options->op_type == CPERF_AEAD) {
+		uint8_t *aead = (uint8_t *)rte_pktmbuf_prepend(mbuf,
+			RTE_ALIGN_CEIL(options->auth_aad_sz, 16));
+
+		if (aead == NULL)
+			goto error;
+
+		memcpy(aead, test_vector->aad.data, test_vector->aad.length);
+	}
+
+	return mbuf;
+error:
+	if (mbuf != NULL)
+		rte_pktmbuf_free(mbuf);
+
+	return NULL;
+}
+
+void *
+cperf_throughput_test_constructor(uint8_t dev_id, uint16_t qp_id,
+		const struct cperf_options *options,
+		const struct cperf_test_vector *test_vector,
+		const struct cperf_op_fns *op_fns)
+{
+	struct cperf_throughput_ctx *ctx = NULL;
+	unsigned int mbuf_idx;
+	char pool_name[32] = "";
+
+	ctx = rte_malloc(NULL, sizeof(struct cperf_throughput_ctx), 0);
+	if (ctx == NULL)
+		goto err;
+
+	ctx->dev_id = dev_id;
+	ctx->qp_id = qp_id;
+
+	ctx->populate_ops = op_fns->populate_ops;
+	ctx->options = options;
+	ctx->test_vector = test_vector;
+
+	ctx->sess = op_fns->sess_create(dev_id, options, test_vector);
+	if (ctx->sess == NULL)
+		goto err;
+
+	snprintf(pool_name, sizeof(pool_name), "cperf_pool_in_cdev_%d",
+			dev_id);
+
+	ctx->pkt_mbuf_pool_in = rte_pktmbuf_pool_create(pool_name,
+			options->pool_sz * options->segments_nb, 0, 0,
+			RTE_PKTMBUF_HEADROOM +
+			RTE_CACHE_LINE_ROUNDUP(
+				(options->buffer_sz / options->segments_nb) +
+				(options->buffer_sz % options->segments_nb) +
+					options->auth_digest_sz),
+			rte_socket_id());
+
+	if (ctx->pkt_mbuf_pool_in == NULL)
+		goto err;
+
+	/* Generate mbufs_in with plaintext populated for test */
+	if (ctx->options->pool_sz % ctx->options->burst_sz)
+		goto err;
+
+	ctx->mbufs_in = rte_malloc(NULL,
+			(sizeof(struct rte_mbuf *) * ctx->options->pool_sz), 0);
+
+	for (mbuf_idx = 0; mbuf_idx < options->pool_sz; mbuf_idx++) {
+		ctx->mbufs_in[mbuf_idx] = cperf_mbuf_create(
+				ctx->pkt_mbuf_pool_in, options->segments_nb,
+				options, test_vector);
+		if (ctx->mbufs_in[mbuf_idx] == NULL)
+			goto err;
+	}
+
+	if (options->out_of_place == 1)	{
+
+		snprintf(pool_name, sizeof(pool_name), "cperf_pool_out_cdev_%d",
+				dev_id);
+
+		ctx->pkt_mbuf_pool_out = rte_pktmbuf_pool_create(
+				pool_name, options->pool_sz, 0, 0,
+				RTE_PKTMBUF_HEADROOM +
+				RTE_CACHE_LINE_ROUNDUP(
+					options->buffer_sz +
+					options->auth_digest_sz),
+				rte_socket_id());
+
+		if (ctx->pkt_mbuf_pool_out == NULL)
+			goto err;
+	}
+
+	ctx->mbufs_out = rte_malloc(NULL,
+			(sizeof(struct rte_mbuf *) *
+			ctx->options->pool_sz), 0);
+
+	for (mbuf_idx = 0; mbuf_idx < options->pool_sz; mbuf_idx++) {
+		if (options->out_of_place == 1)	{
+			ctx->mbufs_out[mbuf_idx] = cperf_mbuf_create(
+					ctx->pkt_mbuf_pool_out, 1,
+					options, test_vector);
+			if (ctx->mbufs_out[mbuf_idx] == NULL)
+				goto err;
+		} else {
+			ctx->mbufs_out[mbuf_idx] = NULL;
+		}
+	}
+
+	snprintf(pool_name, sizeof(pool_name), "cperf_op_pool_cdev_%d",
+			dev_id);
+
+	ctx->crypto_op_pool = rte_crypto_op_pool_create(pool_name,
+			RTE_CRYPTO_OP_TYPE_SYMMETRIC, options->pool_sz, 0, 0,
+			rte_socket_id());
+	if (ctx->crypto_op_pool == NULL)
+		goto err;
+
+	return ctx;
+err:
+	cperf_throughput_test_free(ctx, mbuf_idx);
+
+	return NULL;
+}
+
+static int
+cperf_throughput_test_verifier(struct rte_mbuf *mbuf,
+		const struct cperf_options *options,
+		const struct cperf_test_vector *vector)
+{
+	const struct rte_mbuf *m;
+	uint32_t len;
+	uint16_t nb_segs;
+	uint8_t *data;
+	uint32_t cipher_offset, auth_offset;
+	uint8_t	cipher, auth;
+	int res = 0;
+
+	m = mbuf;
+	nb_segs = m->nb_segs;
+	len = 0;
+	while (m && nb_segs != 0) {
+		len += m->data_len;
+		m = m->next;
+		nb_segs--;
+	}
+
+	data = rte_malloc(NULL, len, 0);
+	if (data == NULL)
+		return 1;
+
+	m = mbuf;
+	nb_segs = m->nb_segs;
+	len = 0;
+	while (m && nb_segs != 0) {
+		memcpy(data + len, rte_pktmbuf_mtod(m, uint8_t *),
+				m->data_len);
+		len += m->data_len;
+		m = m->next;
+		nb_segs--;
+	}
+
+	switch (options->op_type) {
+	case CPERF_CIPHER_ONLY:
+		cipher = 1;
+		cipher_offset = 0;
+		auth = 0;
+		auth_offset = 0;
+		break;
+	case CPERF_CIPHER_THEN_AUTH:
+		cipher = 1;
+		cipher_offset = 0;
+		auth = 1;
+		auth_offset = vector->plaintext.length;
+		break;
+	case CPERF_AUTH_ONLY:
+		cipher = 0;
+		cipher_offset = 0;
+		auth = 1;
+		auth_offset = vector->plaintext.length;
+		break;
+	case CPERF_AUTH_THEN_CIPHER:
+		cipher = 1;
+		cipher_offset = 0;
+		auth = 1;
+		auth_offset = vector->plaintext.length;
+		break;
+	case CPERF_AEAD:
+		cipher = 1;
+		cipher_offset = vector->aad.length;
+		auth = 1;
+		auth_offset = vector->aad.length + vector->plaintext.length;
+		break;
+	}
+
+	if (cipher == 1) {
+		if (options->cipher_op == RTE_CRYPTO_CIPHER_OP_ENCRYPT)
+			res += memcmp(data + cipher_offset,
+					vector->ciphertext.data,
+					vector->ciphertext.length);
+		else
+			res += memcmp(data + cipher_offset,
+					vector->plaintext.data,
+					vector->plaintext.length);
+	}
+
+	if (auth == 1) {
+		if (options->auth_op == RTE_CRYPTO_AUTH_OP_GENERATE)
+			res += memcmp(data + auth_offset,
+					vector->digest.data,
+					vector->digest.length);
+	}
+
+	if (res != 0)
+		res = 1;
+
+	return res;
+}
+
+int
+cperf_throughput_test_runner(void *test_ctx)
+{
+	struct cperf_throughput_ctx *ctx = test_ctx;
+	struct cperf_op_result *res, *pres;
+
+	res = rte_malloc(NULL, sizeof(struct cperf_op_result) *
+			ctx->options->total_ops, 0);
+	if (res == NULL)
+		return 0;
+
+	uint64_t ops_enqd = 0, ops_enqd_total = 0, ops_enqd_failed = 0;
+	uint64_t ops_deqd = 0, ops_deqd_total = 0, ops_deqd_failed = 0;
+
+	uint64_t i, m_idx = 0, tsc_start, tsc_end, tsc_duration;
+
+	uint16_t ops_unused = 0;
+	uint64_t idx = 0;
+
+	struct rte_crypto_op *ops[ctx->options->burst_sz];
+	struct rte_crypto_op *ops_processed[ctx->options->burst_sz];
+
+	uint32_t lcore = rte_lcore_id();
+
+#ifdef CPERF_LINEARIZATION_ENABLE
+	struct rte_cryptodev_info dev_info;
+	int linearize = 0;
+
+	/* Check if source mbufs require coalescing */
+	if (ctx->options->segments_nb > 1) {
+		rte_cryptodev_info_get(ctx->dev_id, &dev_info);
+		if ((dev_info.feature_flags &
+				RTE_CRYPTODEV_FF_MBUF_SCATTER_GATHER) == 0)
+			linearize = 1;
+	}
+#endif /* CPERF_LINEARIZATION_ENABLE */
+
+	ctx->lcore_id = lcore;
+
+	if (!ctx->options->csv)
+		printf("\n# Running throughput test on device: %u, lcore: %u\n",
+			ctx->dev_id, lcore);
+
+	rte_cryptodev_enqueue_burst(ctx->dev_id, ctx->qp_id, NULL, 0);
+
+	for (i = 0; i < ctx->options->total_ops; i++)
+		rte_cryptodev_dequeue_burst(ctx->dev_id, ctx->qp_id,
+				ops_processed, ctx->options->burst_sz);
+
+	tsc_start = rte_rdtsc_precise();
+
+	while (ops_enqd_total < ctx->options->total_ops) {
+
+		uint16_t burst_size = ((ops_enqd_total + ctx->options->burst_sz)
+				<= ctx->options->total_ops) ?
+						ctx->options->burst_sz :
+						ctx->options->total_ops -
+						ops_enqd_total;
+
+		uint16_t ops_needed = burst_size - ops_unused;
+
+		/* Allocate crypto ops from pool */
+		if (ops_needed != rte_crypto_op_bulk_alloc(
+				ctx->crypto_op_pool,
+				RTE_CRYPTO_OP_TYPE_SYMMETRIC,
+				ops, ops_needed))
+			return -1;
+
+		/* Setup crypto op, attach mbuf etc */
+		(ctx->populate_ops)(ops, &ctx->mbufs_in[m_idx],
+				&ctx->mbufs_out[m_idx],
+				ops_needed, ctx->sess, ctx->options,
+				ctx->test_vector);
+
+		for (i = 0; i < burst_size; i++) {
+			ops[i]->opaque_data = (void *)&res[idx];
+			idx++;
+		}
+
+#ifdef CPERF_LINEARIZATION_ENABLE
+		if (linearize) {
+			/* PMD doesn't support scatter-gather and source buffer
+			 * is segmented.
+			 * We need to linearize it before enqueuing.
+			 */
+			for (i = 0; i < burst_size; i++)
+				rte_pktmbuf_linearize(ops[i]->sym->m_src);
+		}
+#endif /* CPERF_LINEARIZATION_ENABLE */
+
+		/* Enqueue burst of ops on crypto device */
+		ops_enqd = rte_cryptodev_enqueue_burst(ctx->dev_id, ctx->qp_id,
+				ops, burst_size);
+		if (ops_enqd < burst_size)
+			ops_enqd_failed++;
+
+		/**
+		 * Calculate number of ops not enqueued (mainly for hw
+		 * accelerators whose ingress queue can fill up).
+		 */
+		ops_unused = burst_size - ops_enqd;
+		ops_enqd_total += ops_enqd;
+
+
+		/* Dequeue processed burst of ops from crypto device */
+		ops_deqd = rte_cryptodev_dequeue_burst(ctx->dev_id, ctx->qp_id,
+				ops_processed, ctx->options->burst_sz);
+		if (likely(ops_deqd))  {
+			/* free crypto ops so they can be reused. We don't free
+			 * the mbufs here as we don't want to reuse them as
+			 * the crypto operation will change the data and cause
+			 * failures.
+			 */
+			for (i = 0; i < ops_deqd; i++) {
+				pres = (struct cperf_op_result *)
+						(ops_processed[i]->opaque_data);
+				pres->status = ops_processed[i]->status;
+
+				rte_crypto_op_free(ops_processed[i]);
+			}
+
+			ops_deqd_total += ops_deqd;
+		} else {
+			/**
+			 * Count dequeue polls which didn't return any
+			 * processed operations. This statistic is mainly
+			 * relevant to hw accelerators.
+			 */
+			ops_deqd_failed++;
+		}
+
+		m_idx += ops_needed;
+		m_idx = m_idx + ctx->options->burst_sz > ctx->options->pool_sz ?
+				0 : m_idx;
+	}
+
+	/* Dequeue any operations still in the crypto device */
+
+	while (ops_deqd_total < ctx->options->total_ops) {
+		/* Sending 0 length burst to flush sw crypto device */
+		rte_cryptodev_enqueue_burst(ctx->dev_id, ctx->qp_id, NULL, 0);
+
+		/* dequeue burst */
+		ops_deqd = rte_cryptodev_dequeue_burst(ctx->dev_id, ctx->qp_id,
+				ops_processed, ctx->options->burst_sz);
+		if (ops_deqd == 0)
+			ops_deqd_failed++;
+		else {
+			for (i = 0; i < ops_deqd; i++) {
+				pres = (struct cperf_op_result *)
+						(ops_processed[i]->opaque_data);
+				pres->status = ops_processed[i]->status;
+
+				rte_crypto_op_free(ops_processed[i]);
+			}
+
+			ops_deqd_total += ops_deqd;
+		}
+	}
+
+	tsc_end = rte_rdtsc_precise();
+	tsc_duration = (tsc_end - tsc_start);
+
+	if (ctx->options->verify) {
+		struct rte_mbuf **mbufs;
+
+		if (ctx->options->out_of_place == 1)
+			mbufs = ctx->mbufs_out;
+		else
+			mbufs = ctx->mbufs_in;
+
+		for (i = 0; i < ctx->options->total_ops; i++) {
+
+			if (res[i].status != RTE_CRYPTO_OP_STATUS_SUCCESS ||
+					cperf_throughput_test_verifier(
+					mbufs[i], ctx->options,
+					ctx->test_vector)) {
+
+				ctx->results.ops_failed++;
+			}
+		}
+	}
+
+	rte_free(res);
+
+	/* Calculate average operations processed per second */
+	ctx->results.ops_per_second = ((double)ctx->options->total_ops /
+			tsc_duration) * rte_get_tsc_hz();
+
+	/* Calculate average throughput (Gbps) in bits per second */
+	ctx->results.throughput_gbps = ((ctx->results.ops_per_second *
+			ctx->options->buffer_sz * 8) / 1000000000);
+
+
+	/* Calculate average cycles per byte */
+	ctx->results.cycles_per_byte =  ((double)tsc_duration /
+			ctx->options->total_ops) / ctx->options->buffer_sz;
+
+	ctx->results.ops_enqueued = ops_enqd_total;
+	ctx->results.ops_dequeued = ops_deqd_total;
+
+	ctx->results.ops_enqueued_failed = ops_enqd_failed;
+	ctx->results.ops_dequeued_failed = ops_deqd_failed;
+
+	return 0;
+}
+
+
+
+void
+cperf_throughput_test_destructor(void *arg)
+{
+	struct cperf_throughput_ctx *ctx = arg;
+	struct cperf_throughput_results *results = &ctx->results;
+	static int only_once;
+
+	if (ctx == NULL)
+		return;
+
+	if (!ctx->options->csv) {
+		printf("\n# Device %d on lcore %u\n",
+				ctx->dev_id, ctx->lcore_id);
+		printf("# Buffer Size(B)\t  Enqueued\t  Dequeued\tFailed Enq"
+				"\tFailed Deq\tOps(Millions)\tThroughput(Gbps)"
+				"\tCycles Per Byte\n");
+
+		printf("\n%16u\t%10lu\t%10lu\t%10lu\t%10lu\t%13.0f\t%16.4f"
+				"\t%15.2f\n",
+				ctx->options->buffer_sz,
+				results->ops_enqueued,
+				results->ops_dequeued,
+				results->ops_enqueued_failed,
+				results->ops_dequeued_failed,
+				results->ops_per_second,
+				results->throughput_gbps,
+				results->cycles_per_byte);
+	} else {
+		if (!only_once)
+			printf("\n# CPU lcore id, Burst Size(B), "
+				"Buffer Size(B),Enqueued,Dequeued,Failed Enq,"
+				"Failed Deq,Ops(Millions),Throughput(Gbps),"
+				"Cycles Per Byte\n");
+		only_once = 1;
+		printf("%u;%u;%u;%lu;%lu;%lu;%lu;%.f3;%.f3;%.f3\n",
+				ctx->lcore_id,
+				ctx->options->burst_sz,
+				ctx->options->buffer_sz,
+				results->ops_enqueued,
+				results->ops_dequeued,
+				results->ops_enqueued_failed,
+				results->ops_dequeued_failed,
+				results->ops_per_second,
+				results->throughput_gbps,
+				results->cycles_per_byte);
+	}
+
+	cperf_throughput_test_free(ctx, ctx->options->pool_sz);
+}
diff --git a/app/crypto-perf/cperf_test_throughput.h b/app/crypto-perf/cperf_test_throughput.h
new file mode 100644
index 0000000..497a490
--- /dev/null
+++ b/app/crypto-perf/cperf_test_throughput.h
@@ -0,0 +1,58 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2016 Intel Corporation. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _CPERF_THROUGHPUT_
+#define _CPERF_THROUGHPUT_
+
+#include <stdint.h>
+
+#include <rte_mbuf.h>
+
+#include "cperf.h"
+#include "cperf_ops.h"
+#include "cperf_options.h"
+#include "cperf_test_vectors.h"
+
+
+void *
+cperf_throughput_test_constructor(uint8_t dev_id, uint16_t qp_id,
+		const struct cperf_options *options,
+		const struct cperf_test_vector *test_vector,
+		const struct cperf_op_fns *ops_fn);
+
+int
+cperf_throughput_test_runner(void *test_ctx);
+
+void
+cperf_throughput_test_destructor(void *test_ctx);
+
+#endif /* _CPERF_THROUGHPUT_ */
diff --git a/app/crypto-perf/cperf_test_vector_parsing.c b/app/crypto-perf/cperf_test_vector_parsing.c
new file mode 100644
index 0000000..e0bcb20
--- /dev/null
+++ b/app/crypto-perf/cperf_test_vector_parsing.c
@@ -0,0 +1,500 @@
+#include <stdio.h>
+
+#include <rte_malloc.h>
+
+#include "cperf_options.h"
+#include "cperf_test_vectors.h"
+#include "cperf_test_vector_parsing.h"
+
+int
+free_test_vector(struct cperf_test_vector *vector, struct cperf_options *opts)
+{
+	if (vector == NULL || opts == NULL)
+		return -1;
+
+	rte_free(vector->iv.data);
+	rte_free(vector->aad.data);
+	rte_free(vector->digest.data);
+
+	if (opts->test_file != NULL) {
+		rte_free(vector->plaintext.data);
+		rte_free(vector->cipher_key.data);
+		rte_free(vector->auth_key.data);
+		rte_free(vector->ciphertext.data);
+	}
+
+	rte_free(vector);
+
+	return 0;
+}
+
+void
+show_test_vector(struct cperf_test_vector *test_vector)
+{
+	const uint8_t wrap = 32;
+	uint32_t i;
+
+	if (test_vector == NULL)
+		return;
+
+	if (test_vector->plaintext.data) {
+		printf("\nplaintext =\n");
+		for (i = 0; i < test_vector->plaintext.length; ++i) {
+			if ((i % wrap == 0) && (i != 0))
+				printf("\n");
+			if (i == test_vector->plaintext.length - 1)
+				printf("0x%02x",
+					test_vector->plaintext.data[i]);
+			else
+				printf("0x%02x, ",
+					test_vector->plaintext.data[i]);
+		}
+		printf("\n");
+	}
+
+	if (test_vector->cipher_key.data) {
+		printf("\ncipher_key =\n");
+		for (i = 0; i < test_vector->cipher_key.length; ++i) {
+			if ((i % wrap == 0) && (i != 0))
+				printf("\n");
+			if (i == (uint32_t)(test_vector->cipher_key.length - 1))
+				printf("0x%02x",
+					test_vector->cipher_key.data[i]);
+			else
+				printf("0x%02x, ",
+					test_vector->cipher_key.data[i]);
+		}
+		printf("\n");
+	}
+
+	if (test_vector->auth_key.data) {
+		printf("\nauth_key =\n");
+		for (i = 0; i < test_vector->auth_key.length; ++i) {
+			if ((i % wrap == 0) && (i != 0))
+				printf("\n");
+			if (i == (uint32_t)(test_vector->auth_key.length - 1))
+				printf("0x%02x", test_vector->auth_key.data[i]);
+			else
+				printf("0x%02x, ",
+					test_vector->auth_key.data[i]);
+		}
+		printf("\n");
+	}
+
+	if (test_vector->iv.data) {
+		printf("\niv =\n");
+		for (i = 0; i < test_vector->iv.length; ++i) {
+			if ((i % wrap == 0) && (i != 0))
+				printf("\n");
+			if (i == (uint32_t)(test_vector->iv.length - 1))
+				printf("0x%02x", test_vector->iv.data[i]);
+			else
+				printf("0x%02x, ", test_vector->iv.data[i]);
+		}
+		printf("\n");
+	}
+
+	if (test_vector->ciphertext.data) {
+		printf("\nciphertext =\n");
+		for (i = 0; i < test_vector->ciphertext.length; ++i) {
+			if ((i % wrap == 0) && (i != 0))
+				printf("\n");
+			if (i == test_vector->ciphertext.length - 1)
+				printf("0x%02x",
+					test_vector->ciphertext.data[i]);
+			else
+				printf("0x%02x, ",
+					test_vector->ciphertext.data[i]);
+		}
+		printf("\n");
+	}
+
+	if (test_vector->aad.data) {
+		printf("\naad =\n");
+		for (i = 0; i < test_vector->aad.length; ++i) {
+			if ((i % wrap == 0) && (i != 0))
+				printf("\n");
+			if (i == (uint32_t)(test_vector->aad.length - 1))
+				printf("0x%02x", test_vector->aad.data[i]);
+			else
+				printf("0x%02x, ", test_vector->aad.data[i]);
+		}
+		printf("\n");
+	}
+
+	if (test_vector->digest.data) {
+		printf("\ndigest =\n");
+		for (i = 0; i < test_vector->digest.length; ++i) {
+			if ((i % wrap == 0) && (i != 0))
+				printf("\n");
+			if (i == (uint32_t)(test_vector->digest.length - 1))
+				printf("0x%02x", test_vector->digest.data[i]);
+			else
+				printf("0x%02x, ", test_vector->digest.data[i]);
+		}
+		printf("\n");
+	}
+}
+
+/* trim leading and trailing spaces */
+static char *
+trim_space(char *str)
+{
+	char *start, *end;
+
+	for (start = str; *start; start++) {
+		if (!isspace((unsigned char) start[0]))
+			break;
+	}
+
+	for (end = start + strlen(start); end > start + 1; end--) {
+		if (!isspace((unsigned char) end[-1]))
+			break;
+	}
+
+	*end = 0;
+
+	/* Shift from "start" to the beginning of the string */
+	if (start > str)
+		memmove(str, start, (end - start) + 1);
+
+	return str;
+}
+
+/* tokenization test values separated by a comma */
+static int
+parse_values(char *tokens, uint8_t **data, uint32_t *data_length)
+{
+	uint32_t n_tokens;
+	uint32_t data_size = 32;
+
+	uint8_t *values, *values_resized;
+	char *tok, *error = NULL;
+
+	tok = strtok(tokens, CPERF_VALUE_DELIMITER);
+	if (tok == NULL)
+		return -1;
+
+	values = (uint8_t *) rte_zmalloc(NULL, sizeof(uint8_t) * data_size, 0);
+	if (values == NULL)
+		return -1;
+
+	n_tokens = 0;
+	while (tok != NULL) {
+		values_resized = NULL;
+
+		if (n_tokens >= data_size) {
+			data_size *= 2;
+
+			values_resized = (uint8_t *) rte_realloc(values,
+				sizeof(uint8_t) * data_size, 0);
+			if (values_resized == NULL) {
+				rte_free(values);
+				return -1;
+			}
+			values = values_resized;
+		}
+
+		values[n_tokens] = (uint8_t) strtoul(tok, &error, 0);
+		if ((error == NULL) || (*error != '\0')) {
+			printf("Failed with convert '%s'\n", tok);
+			rte_free(values);
+			return -1;
+		}
+
+		tok = strtok(NULL, CPERF_VALUE_DELIMITER);
+		if (tok == NULL)
+			break;
+
+		n_tokens++;
+	}
+
+	values_resized = (uint8_t *) rte_realloc(values,
+		sizeof(uint8_t) * (n_tokens + 1), 0);
+
+	if (values_resized == NULL) {
+		rte_free(values);
+		return -1;
+	}
+
+	*data = values_resized;
+	*data_length = n_tokens + 1;
+
+	return 0;
+}
+
+/* checks the type of key and assigns data */
+static int
+parse_entry(char *entry, struct cperf_test_vector *vector,
+	struct cperf_options *opts, uint8_t tc_found)
+{
+	int status;
+	uint32_t data_length;
+
+	uint8_t *data = NULL;
+	char *token, *key_token;
+
+	/* get key */
+	token = strtok(entry, CPERF_ENTRY_DELIMITER);
+	key_token = token;
+
+	/* get values for key */
+	token = strtok(NULL, CPERF_ENTRY_DELIMITER);
+	if (token == NULL) {
+		printf("Expected 'key = values' but was '%.40s'..\n",
+			key_token);
+		return -1;
+	}
+
+	status = parse_values(token, &data, &data_length);
+	if (status)
+		return -1;
+
+	/* compare keys */
+	if (strstr(key_token, "plaintext")) {
+		rte_free(vector->plaintext.data);
+		vector->plaintext.data = data;
+		if (tc_found)
+			vector->plaintext.length = data_length;
+		else {
+			if (opts->buffer_sz > data_length) {
+				printf("Global plaintext shorter than "
+					"buffer_sz\n");
+				return -1;
+			}
+			vector->plaintext.length = opts->buffer_sz;
+		}
+
+	} else if (strstr(key_token, "cipher_key")) {
+		rte_free(vector->cipher_key.data);
+		vector->cipher_key.data = data;
+		if (tc_found)
+			vector->cipher_key.length = data_length;
+		else {
+			if (opts->cipher_key_sz > data_length) {
+				printf("Global cipher_key shorter than "
+					"cipher_key_sz\n");
+				return -1;
+			}
+			vector->cipher_key.length = opts->cipher_key_sz;
+		}
+
+	} else if (strstr(key_token, "auth_key")) {
+		rte_free(vector->auth_key.data);
+		vector->auth_key.data = data;
+		if (tc_found)
+			vector->auth_key.length = data_length;
+		else {
+			if (opts->auth_key_sz > data_length) {
+				printf("Global auth_key shorter than "
+					"auth_key_sz\n");
+				return -1;
+			}
+			vector->auth_key.length = opts->auth_key_sz;
+		}
+
+	} else if (strstr(key_token, "iv")) {
+		rte_free(vector->iv.data);
+		vector->iv.data = data;
+		vector->iv.phys_addr = rte_malloc_virt2phy(vector->iv.data);
+		if (tc_found)
+			vector->iv.length = data_length;
+		else {
+			if (opts->cipher_iv_sz > data_length) {
+				printf("Global iv shorter than "
+					"cipher_iv_sz\n");
+				return -1;
+			}
+			vector->iv.length = opts->cipher_iv_sz;
+		}
+
+	} else if (strstr(key_token, "ciphertext")) {
+		rte_free(vector->ciphertext.data);
+		vector->ciphertext.data = data;
+		if (tc_found)
+			vector->ciphertext.length = data_length;
+		else {
+			if (opts->buffer_sz > data_length) {
+				printf("Global ciphertext shorter than "
+					"buffer_sz\n");
+				return -1;
+			}
+			vector->ciphertext.length = opts->buffer_sz;
+		}
+
+	} else if (strstr(key_token, "aad")) {
+		rte_free(vector->aad.data);
+		vector->aad.data = data;
+		vector->aad.phys_addr = rte_malloc_virt2phy(vector->aad.data);
+		if (tc_found)
+			vector->aad.length = data_length;
+		else {
+			if (opts->auth_aad_sz > data_length) {
+				printf("Global aad shorter than "
+					"auth_aad_sz\n");
+				return -1;
+			}
+			vector->aad.length = opts->auth_aad_sz;
+		}
+
+	} else if (strstr(key_token, "digest")) {
+		rte_free(vector->digest.data);
+		vector->digest.data = data;
+		vector->digest.phys_addr = rte_malloc_virt2phy(
+			vector->digest.data);
+		if (tc_found)
+			vector->digest.length = data_length;
+		else {
+			if (opts->auth_digest_sz > data_length) {
+				printf("Global digest shorter than "
+					"auth_digest_sz\n");
+				return -1;
+			}
+			vector->digest.length = opts->auth_digest_sz;
+		}
+	} else {
+		printf("Not valid key: '%s'\n", trim_space(key_token));
+		return -1;
+	}
+
+	return 0;
+}
+
+/* searches in the file for test keys and values */
+static int
+parse_file(struct cperf_test_vector *vector, struct cperf_options *opts)
+{
+	uint8_t tc_found = 0;
+	uint8_t tc_data_start = 0;
+	ssize_t read;
+	size_t len = 0;
+	int status = 0;
+
+	FILE *fp;
+	char *line = NULL;
+	char *entry = NULL;
+
+	fp = fopen(opts->test_file, "r");
+	if (fp == NULL) {
+		printf("File %s does not exists\n", opts->test_file);
+		return -1;
+	}
+
+	while ((read = getline(&line, &len, fp)) != -1) {
+
+		/* ignore comments and new lines */
+		if (line[0] == '#' || line[0] == '/' || line[0] == '\n'
+			|| line[0] == '\r' || line[0] == ' ')
+			continue;
+
+		trim_space(line);
+
+		/* next test case is started */
+		if (line[0] == '[' && line[strlen(line) - 1] == ']' && tc_found)
+			break;
+		/* test case section started, end of global data */
+		else if (line[0] == '[' && line[strlen(line) - 1] == ']')
+			tc_data_start = 1;
+
+		/* test name unspecified, end after global data */
+		if (tc_data_start && opts->test_name == NULL)
+			break;
+		/* searching for a suitable test */
+		else if (tc_data_start && tc_found == 0) {
+			if (!strcmp(line, opts->test_name)) {
+				tc_found = 1;
+				continue;
+			} else
+				continue;
+		}
+
+		/* buffer for multiline */
+		entry = (char *) rte_realloc(entry,
+					sizeof(char) * strlen(line) + 1, 0);
+		if (entry == NULL)
+			return -1;
+
+		memset(entry, 0, strlen(line) + 1);
+		strncpy(entry, line, strlen(line));
+
+		/* check if entry ends with , or = */
+		if (entry[strlen(entry) - 1] == ','
+			|| entry[strlen(entry) - 1] == '=') {
+			while ((read = getline(&line, &len, fp)) != -1) {
+				trim_space(line);
+
+				/* extend entry about length of new line */
+				char *entry_extended = (char *) rte_realloc(
+					entry, sizeof(char)
+						* (strlen(line) + strlen(entry))
+						+ 1, 0);
+
+				if (entry_extended == NULL)
+					goto err;
+				entry = entry_extended;
+
+				strncat(entry, line, strlen(line));
+
+				if (entry[strlen(entry) - 1] != ',')
+					break;
+			}
+		}
+		status = parse_entry(entry, vector, opts, tc_found);
+		if (status) {
+			printf("An error occurred while parsing!\n");
+			goto err;
+		}
+	}
+
+	if (tc_found == 0 && opts->test_name != NULL) {
+		printf("Not found '%s' case in test file\n", opts->test_name);
+		goto err;
+	}
+
+	fclose(fp);
+	free(line);
+	rte_free(entry);
+
+	return 0;
+
+err:
+	if (fp)
+		fclose(fp);
+	if (line)
+		free(line);
+	if (entry)
+		rte_free(entry);
+
+	return -1;
+}
+
+struct cperf_test_vector*
+cperf_test_vector_get_from_file(struct cperf_options *opts)
+{
+	int status;
+	struct cperf_test_vector *test_vector = NULL;
+
+	if (opts == NULL || opts->test_file == NULL)
+		return test_vector;
+
+	test_vector = (struct cperf_test_vector *) rte_zmalloc(NULL,
+		sizeof(struct cperf_test_vector), 0);
+	if (test_vector == NULL)
+		return test_vector;
+
+	/* filling the vector with data from a file */
+	status = parse_file(test_vector, opts);
+	if (status) {
+		free_test_vector(test_vector, opts);
+		return NULL;
+	}
+
+	/* other values not included in the file */
+	test_vector->data.cipher_offset = 0;
+	test_vector->data.cipher_length = opts->buffer_sz;
+
+	test_vector->data.auth_offset = 0;
+	test_vector->data.auth_length = opts->buffer_sz;
+
+	return test_vector;
+}
diff --git a/app/crypto-perf/cperf_test_vector_parsing.h b/app/crypto-perf/cperf_test_vector_parsing.h
new file mode 100644
index 0000000..5d0dcea
--- /dev/null
+++ b/app/crypto-perf/cperf_test_vector_parsing.h
@@ -0,0 +1,73 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2016 Intel Corporation. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef APP_CRYPTO_PERF_CPERF_TEST_VECTOR_PARSING_H_
+#define APP_CRYPTO_PERF_CPERF_TEST_VECTOR_PARSING_H_
+
+#define CPERF_VALUE_DELIMITER ","
+#define CPERF_ENTRY_DELIMITER "="
+
+/**
+ * Frees the allocated memory for test vector
+ *
+ * @param vector
+ *   Destination vector test to release
+ * @param opts
+ *   Test options
+ * @return
+ *   0 on success, (-1) on error.
+ */
+int
+free_test_vector(struct cperf_test_vector *vector, struct cperf_options *opts);
+
+/**
+ * Displays data in test vector
+ *
+ * @param vector
+ *   Vector to display
+ */
+void
+show_test_vector(struct cperf_test_vector *test_vector);
+
+/**
+ * Completes test vector with data from file
+ *
+ * @param opts
+ *   Test options
+ * @return
+ *   NULL on error.
+ *   Test vector pointer on successful.
+ */
+struct cperf_test_vector*
+cperf_test_vector_get_from_file(struct cperf_options *opts);
+
+#endif /* APP_CRYPTO_PERF_CPERF_TEST_VECTOR_PARSING_H_ */
diff --git a/app/crypto-perf/cperf_test_vectors.c b/app/crypto-perf/cperf_test_vectors.c
new file mode 100644
index 0000000..d38476e
--- /dev/null
+++ b/app/crypto-perf/cperf_test_vectors.c
@@ -0,0 +1,476 @@
+#include <rte_crypto.h>
+#include <rte_malloc.h>
+
+#include "cperf_test_vectors.h"
+
+uint8_t plaintext[2048] = {
+	0x71, 0x75, 0x83, 0x98, 0x75, 0x42, 0x51, 0x09, 0x94, 0x02, 0x13, 0x20,
+	0x15, 0x64, 0x46, 0x32, 0x08, 0x18, 0x91, 0x82, 0x86, 0x52, 0x23, 0x93,
+	0x44, 0x54, 0x28, 0x68, 0x78, 0x78, 0x70, 0x06, 0x42, 0x74, 0x41, 0x27,
+	0x73, 0x38, 0x53, 0x77, 0x51, 0x96, 0x53, 0x24, 0x03, 0x88, 0x74, 0x14,
+	0x70, 0x23, 0x88, 0x30, 0x85, 0x18, 0x89, 0x27, 0x41, 0x71, 0x61, 0x23,
+	0x04, 0x83, 0x30, 0x57, 0x26, 0x47, 0x23, 0x75, 0x25, 0x62, 0x53, 0x80,
+	0x38, 0x34, 0x21, 0x33, 0x34, 0x51, 0x46, 0x29, 0x94, 0x64, 0x22, 0x67,
+	0x25, 0x45, 0x70, 0x26, 0x74, 0x39, 0x46, 0x71, 0x08, 0x85, 0x27, 0x18,
+	0x93, 0x39, 0x72, 0x11, 0x57, 0x26, 0x88, 0x46, 0x47, 0x49, 0x86, 0x92,
+	0x03, 0x37, 0x96, 0x40, 0x84, 0x53, 0x67, 0x47, 0x60, 0x60, 0x37, 0x67,
+	0x02, 0x68, 0x76, 0x62, 0x42, 0x01, 0x59, 0x11, 0x01, 0x89, 0x40, 0x87,
+	0x58, 0x20, 0x51, 0x21, 0x66, 0x26, 0x26, 0x73, 0x03, 0x06, 0x14, 0x25,
+	0x98, 0x42, 0x44, 0x67, 0x24, 0x78, 0x71, 0x45, 0x32, 0x61, 0x20, 0x26,
+	0x08, 0x88, 0x44, 0x26, 0x40, 0x63, 0x76, 0x23, 0x78, 0x55, 0x81, 0x97,
+	0x95, 0x89, 0x39, 0x07, 0x14, 0x50, 0x50, 0x73, 0x07, 0x20, 0x86, 0x83,
+	0x74, 0x57, 0x72, 0x36, 0x68, 0x61, 0x14, 0x41, 0x56, 0x49, 0x64, 0x72,
+	0x75, 0x81, 0x47, 0x91, 0x08, 0x76, 0x47, 0x06, 0x55, 0x77, 0x61, 0x45,
+	0x50, 0x10, 0x07, 0x46, 0x46, 0x89, 0x80, 0x07, 0x24, 0x95, 0x39, 0x43,
+	0x03, 0x75, 0x24, 0x35, 0x57, 0x82, 0x09, 0x64, 0x29, 0x24, 0x26, 0x66,
+	0x67, 0x29, 0x05, 0x90, 0x82, 0x02, 0x45, 0x71, 0x21, 0x34, 0x25, 0x48,
+	0x68, 0x26, 0x01, 0x18, 0x73, 0x18, 0x46, 0x15, 0x14, 0x33, 0x28, 0x44,
+	0x24, 0x82, 0x20, 0x12, 0x99, 0x43, 0x68, 0x43, 0x25, 0x14, 0x34, 0x33,
+	0x31, 0x13, 0x77, 0x44, 0x95, 0x22, 0x99, 0x02, 0x30, 0x50, 0x74, 0x43,
+	0x81, 0x78, 0x32, 0x17, 0x09, 0x85, 0x04, 0x37, 0x31, 0x98, 0x76, 0x79,
+	0x64, 0x10, 0x39, 0x89, 0x59, 0x90, 0x50, 0x15, 0x77, 0x39, 0x28, 0x14,
+	0x30, 0x19, 0x68, 0x77, 0x89, 0x48, 0x86, 0x16, 0x11, 0x33, 0x84, 0x56,
+	0x10, 0x20, 0x94, 0x72, 0x41, 0x69, 0x13, 0x00, 0x56, 0x27, 0x01, 0x57,
+	0x46, 0x65, 0x65, 0x19, 0x33, 0x07, 0x62, 0x19, 0x91, 0x60, 0x29, 0x11,
+	0x41, 0x25, 0x88, 0x21, 0x93, 0x85, 0x87, 0x40, 0x91, 0x25, 0x32, 0x86,
+	0x76, 0x54, 0x92, 0x52, 0x72, 0x46, 0x61, 0x84, 0x20, 0x14, 0x65, 0x83,
+	0x69, 0x90, 0x80, 0x11, 0x35, 0x70, 0x42, 0x64, 0x74, 0x85, 0x15, 0x23,
+	0x06, 0x55, 0x67, 0x49, 0x76, 0x47, 0x11, 0x95, 0x00, 0x85, 0x05, 0x12,
+	0x58, 0x53, 0x25, 0x73, 0x62, 0x81, 0x63, 0x82, 0x32, 0x75, 0x16, 0x48,
+	0x04, 0x96, 0x75, 0x16, 0x43, 0x83, 0x41, 0x85, 0x95, 0x67, 0x27, 0x83,
+	0x22, 0x43, 0x02, 0x27, 0x69, 0x62, 0x78, 0x50, 0x57, 0x66, 0x99, 0x89,
+	0x05, 0x06, 0x35, 0x86, 0x37, 0x27, 0x48, 0x46, 0x50, 0x80, 0x96, 0x40,
+	0x42, 0x36, 0x21, 0x54, 0x49, 0x18, 0x63, 0x38, 0x45, 0x76, 0x23, 0x20,
+	0x28, 0x06, 0x17, 0x32, 0x58, 0x50, 0x49, 0x54, 0x29, 0x46, 0x18, 0x12,
+	0x17, 0x50, 0x02, 0x80, 0x99, 0x53, 0x15, 0x02, 0x07, 0x14, 0x19, 0x60,
+	0x56, 0x43, 0x76, 0x71, 0x49, 0x99, 0x54, 0x83, 0x28, 0x94, 0x30, 0x30,
+	0x57, 0x05, 0x89, 0x80, 0x11, 0x03, 0x78, 0x35, 0x73, 0x52, 0x67, 0x39,
+	0x67, 0x07, 0x04, 0x49, 0x23, 0x83, 0x86, 0x89, 0x57, 0x71, 0x08, 0x41,
+	0x15, 0x97, 0x19, 0x72, 0x03, 0x27, 0x72, 0x52, 0x66, 0x67, 0x99, 0x15,
+	0x33, 0x64, 0x69, 0x78, 0x07, 0x83, 0x53, 0x71, 0x21, 0x50, 0x05, 0x48,
+	0x59, 0x85, 0x01, 0x36, 0x65, 0x02, 0x52, 0x01, 0x09, 0x49, 0x28, 0x77,
+	0x25, 0x35, 0x67, 0x77, 0x81, 0x64, 0x24, 0x29, 0x42, 0x32, 0x59, 0x22,
+	0x93, 0x48, 0x59, 0x03, 0x85, 0x87, 0x15, 0x55, 0x23, 0x42, 0x58, 0x17,
+	0x18, 0x37, 0x70, 0x83, 0x80, 0x12, 0x44, 0x83, 0x45, 0x70, 0x55, 0x86,
+	0x03, 0x23, 0x01, 0x56, 0x94, 0x12, 0x41, 0x34, 0x82, 0x90, 0x83, 0x46,
+	0x17, 0x56, 0x66, 0x96, 0x75, 0x80, 0x59, 0x07, 0x15, 0x84, 0x19, 0x52,
+	0x37, 0x44, 0x44, 0x83, 0x72, 0x43, 0x25, 0x42, 0x26, 0x86, 0x87, 0x86,
+	0x91, 0x62, 0x14, 0x90, 0x34, 0x26, 0x14, 0x33, 0x59, 0x70, 0x73, 0x15,
+	0x49, 0x40, 0x66, 0x88, 0x42, 0x66, 0x16, 0x42, 0x55, 0x92, 0x82, 0x06,
+	0x20, 0x96, 0x36, 0x96, 0x13, 0x07, 0x84, 0x94, 0x37, 0x66, 0x62, 0x78,
+	0x60, 0x58, 0x80, 0x50, 0x69, 0x03, 0x97, 0x16, 0x64, 0x45, 0x21, 0x39,
+	0x79, 0x28, 0x52, 0x17, 0x14, 0x77, 0x31, 0x60, 0x86, 0x70, 0x09, 0x53,
+	0x39, 0x32, 0x52, 0x31, 0x35, 0x79, 0x24, 0x70, 0x25, 0x48, 0x23, 0x49,
+	0x10, 0x64, 0x54, 0x30, 0x82, 0x34, 0x51, 0x20, 0x46, 0x04, 0x29, 0x25,
+	0x65, 0x09, 0x55, 0x30, 0x30, 0x52, 0x85, 0x32, 0x79, 0x19, 0x59, 0x07,
+	0x05, 0x12, 0x11, 0x03, 0x21, 0x90, 0x36, 0x62, 0x23, 0x67, 0x36, 0x67,
+	0x47, 0x39, 0x92, 0x88, 0x45, 0x43, 0x71, 0x16, 0x48, 0x27, 0x68, 0x39,
+	0x98, 0x38, 0x03, 0x31, 0x85, 0x10, 0x06, 0x95, 0x54, 0x79, 0x28, 0x79,
+	0x56, 0x16, 0x65, 0x69, 0x00, 0x54, 0x09, 0x91, 0x06, 0x10, 0x10, 0x86,
+	0x75, 0x01, 0x02, 0x71, 0x01, 0x09, 0x32, 0x94, 0x66, 0x43, 0x68, 0x36,
+	0x19, 0x52, 0x02, 0x04, 0x45, 0x49, 0x40, 0x94, 0x07, 0x87, 0x86, 0x79,
+	0x84, 0x07, 0x75, 0x30, 0x73, 0x02, 0x57, 0x81, 0x65, 0x02, 0x28, 0x96,
+	0x57, 0x07, 0x70, 0x34, 0x39, 0x35, 0x75, 0x19, 0x47, 0x57, 0x08, 0x75,
+	0x86, 0x57, 0x11, 0x32, 0x09, 0x47, 0x83, 0x93, 0x20, 0x94, 0x90, 0x88,
+	0x39, 0x63, 0x22, 0x88, 0x54, 0x54, 0x95, 0x75, 0x67, 0x26, 0x02, 0x49,
+	0x26, 0x17, 0x35, 0x16, 0x27, 0x65, 0x64, 0x26, 0x93, 0x92, 0x77, 0x85,
+	0x84, 0x40, 0x59, 0x29, 0x49, 0x69, 0x94, 0x71, 0x72, 0x21, 0x55, 0x03,
+	0x19, 0x74, 0x09, 0x40, 0x57, 0x68, 0x41, 0x19, 0x11, 0x21, 0x63, 0x56,
+	0x29, 0x77, 0x57, 0x81, 0x44, 0x40, 0x76, 0x77, 0x02, 0x71, 0x66, 0x35,
+	0x89, 0x02, 0x64, 0x51, 0x61, 0x02, 0x46, 0x91, 0x38, 0x93, 0x62, 0x57,
+	0x18, 0x98, 0x12, 0x87, 0x29, 0x48, 0x65, 0x39, 0x99, 0x45, 0x54, 0x69,
+	0x51, 0x16, 0x25, 0x75, 0x60, 0x70, 0x33, 0x72, 0x01, 0x60, 0x26, 0x51,
+	0x44, 0x14, 0x39, 0x12, 0x95, 0x48, 0x87, 0x33, 0x90, 0x16, 0x42, 0x78,
+	0x48, 0x58, 0x96, 0x93, 0x75, 0x23, 0x07, 0x13, 0x86, 0x07, 0x96, 0x30,
+	0x22, 0x82, 0x91, 0x36, 0x72, 0x16, 0x48, 0x77, 0x64, 0x99, 0x07, 0x34,
+	0x78, 0x60, 0x61, 0x13, 0x48, 0x93, 0x46, 0x62, 0x48, 0x38, 0x37, 0x96,
+	0x58, 0x64, 0x39, 0x90, 0x69, 0x46, 0x81, 0x98, 0x61, 0x89, 0x15, 0x59,
+	0x78, 0x98, 0x21, 0x34, 0x00, 0x69, 0x97, 0x80, 0x28, 0x81, 0x53, 0x49,
+	0x79, 0x53, 0x92, 0x20, 0x29, 0x40, 0x70, 0x06, 0x09, 0x55, 0x99, 0x41,
+	0x51, 0x35, 0x55, 0x27, 0x39, 0x06, 0x29, 0x83, 0x66, 0x03, 0x68, 0x14,
+	0x11, 0x69, 0x95, 0x51, 0x71, 0x55, 0x24, 0x60, 0x52, 0x58, 0x88, 0x11,
+	0x88, 0x25, 0x37, 0x86, 0x01, 0x52, 0x93, 0x52, 0x02, 0x24, 0x91, 0x58,
+	0x56, 0x37, 0x50, 0x88, 0x39, 0x09, 0x61, 0x19, 0x08, 0x86, 0x29, 0x51,
+	0x63, 0x38, 0x81, 0x14, 0x75, 0x75, 0x39, 0x99, 0x22, 0x04, 0x32, 0x63,
+	0x14, 0x68, 0x41, 0x79, 0x09, 0x57, 0x87, 0x29, 0x26, 0x94, 0x05, 0x71,
+	0x82, 0x41, 0x26, 0x98, 0x68, 0x18, 0x55, 0x42, 0x78, 0x05, 0x74, 0x17,
+	0x34, 0x34, 0x07, 0x62, 0x94, 0x72, 0x21, 0x08, 0x54, 0x72, 0x21, 0x08,
+	0x31, 0x53, 0x82, 0x35, 0x27, 0x40, 0x85, 0x77, 0x08, 0x52, 0x58, 0x48,
+	0x03, 0x86, 0x65, 0x51, 0x96, 0x43, 0x89, 0x19, 0x15, 0x08, 0x49, 0x62,
+	0x57, 0x46, 0x17, 0x68, 0x56, 0x04, 0x70, 0x63, 0x75, 0x88, 0x13, 0x27,
+	0x87, 0x44, 0x46, 0x27, 0x02, 0x97, 0x71, 0x07, 0x40, 0x17, 0x24, 0x61,
+	0x16, 0x94, 0x86, 0x85, 0x67, 0x58, 0x87, 0x92, 0x02, 0x84, 0x75, 0x19,
+	0x43, 0x60, 0x68, 0x03, 0x54, 0x75, 0x33, 0x17, 0x97, 0x75, 0x12, 0x62,
+	0x43, 0x08, 0x35, 0x75, 0x32, 0x21, 0x08, 0x82, 0x78, 0x04, 0x74, 0x09,
+	0x13, 0x48, 0x63, 0x68, 0x67, 0x09, 0x08, 0x50, 0x11, 0x71, 0x64, 0x72,
+	0x63, 0x76, 0x21, 0x62, 0x80, 0x57, 0x19, 0x15, 0x26, 0x88, 0x02, 0x26,
+	0x83, 0x17, 0x61, 0x76, 0x28, 0x10, 0x22, 0x37, 0x56, 0x71, 0x51, 0x60,
+	0x12, 0x79, 0x24, 0x83, 0x78, 0x47, 0x78, 0x20, 0x52, 0x27, 0x19, 0x88,
+	0x81, 0x04, 0x70, 0x20, 0x25, 0x10, 0x04, 0x01, 0x72, 0x57, 0x30, 0x93,
+	0x96, 0x23, 0x02, 0x94, 0x61, 0x44, 0x17, 0x65, 0x77, 0x60, 0x27, 0x43,
+	0x24, 0x59, 0x46, 0x76, 0x00, 0x11, 0x31, 0x99, 0x41, 0x48, 0x75, 0x32,
+	0x05, 0x15, 0x45, 0x31, 0x57, 0x89, 0x10, 0x47, 0x53, 0x14, 0x66, 0x54,
+	0x60, 0x55, 0x36, 0x93, 0x30, 0x03, 0x63, 0x80, 0x65, 0x43, 0x17, 0x36,
+	0x18, 0x64, 0x21, 0x38, 0x16, 0x19, 0x19, 0x51, 0x73, 0x80, 0x38, 0x27,
+	0x30, 0x89, 0x13, 0x43, 0x54, 0x11, 0x78, 0x05, 0x24, 0x38, 0x83, 0x56,
+	0x50, 0x59, 0x12, 0x47, 0x69, 0x70, 0x70, 0x91, 0x28, 0x02, 0x08, 0x91,
+	0x66, 0x09, 0x31, 0x65, 0x46, 0x20, 0x04, 0x85, 0x89, 0x53, 0x91, 0x42,
+	0x34, 0x09, 0x36, 0x92, 0x42, 0x06, 0x87, 0x88, 0x23, 0x54, 0x87, 0x85,
+	0x52, 0x98, 0x95, 0x76, 0x13, 0x50, 0x59, 0x89, 0x18, 0x14, 0x17, 0x47,
+	0x10, 0x97, 0x39, 0x14, 0x33, 0x79, 0x83, 0x62, 0x55, 0x18, 0x30, 0x83,
+	0x03, 0x45, 0x38, 0x37, 0x35, 0x20, 0x94, 0x84, 0x89, 0x80, 0x89, 0x10,
+	0x48, 0x77, 0x33, 0x36, 0x50, 0x07, 0x93, 0x02, 0x45, 0x42, 0x91, 0x12,
+	0x98, 0x09, 0x77, 0x20, 0x31, 0x95, 0x10, 0x29, 0x89, 0x02, 0x38, 0x92,
+	0x90, 0x19, 0x51, 0x10, 0x19, 0x82, 0x23, 0x68, 0x06, 0x00, 0x67, 0x50,
+	0x25, 0x03, 0x41, 0x69, 0x53, 0x42, 0x23, 0x99, 0x29, 0x21, 0x63, 0x22,
+	0x72, 0x54, 0x72, 0x40, 0x23, 0x39, 0x74, 0x92, 0x53, 0x28, 0x67, 0x56,
+	0x46, 0x84, 0x59, 0x85, 0x10, 0x92, 0x31, 0x20, 0x39, 0x95, 0x65, 0x15,
+	0x76, 0x35, 0x37, 0x21, 0x98, 0x41, 0x68, 0x74, 0x94, 0x94, 0x86, 0x90,
+	0x35, 0x07, 0x06, 0x38, 0x78, 0x32, 0x00, 0x60, 0x86, 0x12, 0x34, 0x65,
+	0x67, 0x35, 0x76, 0x94, 0x78, 0x22, 0x99, 0x42, 0x82, 0x40, 0x05, 0x74,
+	0x18, 0x59, 0x03, 0x83, 0x89, 0x05, 0x19, 0x28, 0x88, 0x35, 0x59, 0x10,
+	0x12, 0x96, 0x48, 0x67, 0x59, 0x87, 0x26, 0x85, 0x74, 0x64, 0x78, 0x56,
+	0x91, 0x81, 0x45, 0x90, 0x21, 0x80, 0x32, 0x19, 0x61, 0x38, 0x61, 0x70,
+	0x35, 0x08, 0x93, 0x53, 0x21, 0x95, 0x08, 0x27, 0x90, 0x28, 0x94, 0x27,
+	0x35, 0x78, 0x03, 0x57, 0x74, 0x84, 0x73, 0x63, 0x27, 0x98, 0x14, 0x21,
+	0x22, 0x36, 0x75, 0x31, 0x81, 0x65, 0x85, 0x51, 0x02, 0x45, 0x18, 0x06,
+	0x39, 0x13, 0x29, 0x29, 0x73, 0x26, 0x99, 0x51, 0x38, 0x43, 0x35, 0x58,
+	0x70, 0x92, 0x32, 0x13, 0x80, 0x16, 0x26, 0x44, 0x22, 0x28, 0x05, 0x45,
+	0x86, 0x90, 0x38, 0x19, 0x40, 0x06, 0x30, 0x56, 0x94, 0x09, 0x02, 0x02,
+	0x96, 0x29, 0x22, 0x44, 0x87, 0x38, 0x09, 0x95, 0x58, 0x46, 0x42, 0x78,
+	0x72, 0x77, 0x86, 0x31, 0x97, 0x19, 0x86, 0x51, 0x73, 0x76, 0x63, 0x98,
+	0x39, 0x40, 0x20, 0x20, 0x67, 0x42, 0x55, 0x50, 0x63, 0x76, 0x81, 0x87,
+	0x13, 0x81, 0x19, 0x54, 0x11, 0x77, 0x90, 0x26, 0x47, 0x25, 0x92, 0x88,
+	0x18, 0x56, 0x23, 0x73, 0x91, 0x52, 0x39, 0x08, 0x59, 0x51, 0x81, 0x57,
+	0x78, 0x17, 0x13, 0x90, 0x90, 0x50, 0x65, 0x59, 0x99, 0x77, 0x42, 0x28,
+	0x21, 0x59, 0x97, 0x64, 0x25, 0x17, 0x92, 0x24, 0x50, 0x00, 0x28, 0x40,
+	0x85, 0x33, 0x78, 0x86, 0x79, 0x40, 0x28, 0x30, 0x14, 0x12, 0x01, 0x72,
+	0x41, 0x43, 0x06, 0x87, 0x67, 0x31, 0x66, 0x77, 0x07, 0x50, 0x55, 0x50,
+	0x22, 0x80, 0x42, 0x06, 0x38, 0x01, 0x63, 0x66, 0x70, 0x12, 0x52, 0x91,
+	0x90, 0x97, 0x21, 0x28, 0x22, 0x65, 0x02, 0x80, 0x72, 0x31, 0x17, 0x76,
+	0x35, 0x16, 0x03, 0x56, 0x59, 0x93, 0x36, 0x37, 0x67, 0x54, 0x46, 0x87,
+	0x29, 0x01, 0x30, 0x80, 0x47, 0x47, 0x31, 0x98, 0x34, 0x30, 0x23, 0x86,
+	0x86, 0x14, 0x05, 0x75, 0x09, 0x88, 0x77, 0x92, 0x59, 0x43, 0x98, 0x72,
+	0x55, 0x54, 0x25, 0x59, 0x22, 0x27, 0x21, 0x62, 0x97, 0x10, 0x61, 0x73,
+	0x86, 0x95, 0x99, 0x10, 0x62, 0x35, 0x25, 0x16, 0x62, 0x60, 0x51, 0x48,
+	0x69, 0x69, 0x92, 0x27, 0x19, 0x43, 0x40, 0x52, 0x70, 0x23, 0x37, 0x28,
+	0x73, 0x10, 0x32, 0x55, 0x85, 0x46, 0x97, 0x59, 0x88, 0x48, 0x54, 0x06,
+	0x58, 0x04, 0x82, 0x98, 0x88, 0x34, 0x05, 0x41, 0x94, 0x44, 0x35, 0x10,
+	0x96, 0x48, 0x21, 0x17, 0x24, 0x40, 0x26, 0x15, 0x49, 0x28, 0x12, 0x17,
+	0x10, 0x17, 0x91, 0x42, 0x84, 0x15, 0x83, 0x36, 0x29, 0x49, 0x92, 0x77,
+	0x74, 0x11, 0x72, 0x97, 0x64, 0x53, 0x23, 0x29, 0x16, 0x35, 0x22, 0x10,
+	0x87, 0x07, 0x44, 0x78, 0x18, 0x19, 0x79, 0x03, 0x58, 0x24, 0x15, 0x63,
+	0x55, 0x75, 0x56, 0x14, 0x63, 0x65, 0x86, 0x61, 0x92, 0x94, 0x30, 0x92,
+	0x69, 0x78, 0x40, 0x95, 0x19, 0x81, 0x41, 0x66, 0x97, 0x00, 0x17, 0x37,
+	0x20, 0x82, 0x14, 0x26, 0x42, 0x63, 0x84, 0x20, 0x96, 0x11, 0x68, 0x37,
+	0x60, 0x28, 0x69, 0x85, 0x45, 0x04, 0x62, 0x20, 0x49, 0x39, 0x74, 0x84,
+	0x60, 0x23, 0x38, 0x33, 0x42, 0x49, 0x38, 0x82, 0x30, 0x63, 0x21, 0x51,
+	0x69, 0x09, 0x05, 0x55, 0x78, 0x90, 0x68, 0x69, 0x22, 0x20, 0x17, 0x26,
+	0x54, 0x01, 0x10, 0x04, 0x68, 0x19, 0x88, 0x40, 0x91, 0x74, 0x81, 0x29,
+	0x07, 0x45, 0x33, 0x77, 0x12, 0x47, 0x08, 0x60, 0x09, 0x42, 0x84, 0x15,
+	0x63, 0x92, 0x64, 0x77, 0x07, 0x44, 0x11, 0x07, 0x79, 0x81, 0x24, 0x05,
+	0x21, 0x60, 0x81, 0x70, 0x66, 0x36, 0x69, 0x68, 0x45, 0x01, 0x11, 0x95,
+	0x67, 0x95, 0x55, 0x07, 0x96, 0x63, 0x84, 0x04, 0x74, 0x72, 0x61, 0x91,
+	0x60, 0x09, 0x90, 0x14, 0x34, 0x94, 0x06, 0x12, 0x01, 0x94, 0x40, 0x14,
+	0x12, 0x53, 0x64, 0x81, 0x75, 0x99, 0x36, 0x99, 0x11, 0x69, 0x95, 0x51,
+	0x71, 0x55, 0x24, 0x60, 0x52, 0x58, 0x88, 0x11, 0x88, 0x25, 0x37, 0x86,
+	0x66, 0x36, 0x69, 0x68, 0x45, 0x01, 0x11, 0x95
+};
+
+/* cipher text */
+uint8_t ciphertext[2048] = {
+	0xE2, 0x19, 0x24, 0x56, 0x13, 0x59, 0xA6, 0x5D, 0xDF, 0xD0, 0x72, 0xAA,
+	0x23, 0xC7, 0x36, 0x3A, 0xBB, 0x3E, 0x8B, 0x64, 0xD5, 0xBF, 0xDE, 0x65,
+	0xA2, 0x75, 0xD9, 0x45, 0x6C, 0x3C, 0xD2, 0x6A, 0xC7, 0xD0, 0x9A, 0xD0,
+	0x87, 0xB8, 0xE4, 0x94, 0x11, 0x62, 0x5A, 0xC3, 0xC3, 0x01, 0xA3, 0x86,
+	0xBC, 0xBC, 0x9C, 0xC0, 0x81, 0x9F, 0xBF, 0x5C, 0x6F, 0x3F, 0x13, 0xF1,
+	0xAE, 0xCF, 0x26, 0xB3, 0xBC, 0x49, 0xD6, 0x3B, 0x7A, 0x2E, 0x99, 0x9E,
+	0x1B, 0x04, 0x50, 0x6C, 0x48, 0x6B, 0x4E, 0x72, 0xFC, 0xC8, 0xA7, 0x0C,
+	0x2C, 0xD9, 0xED, 0xE4, 0x82, 0xC4, 0x81, 0xA6, 0xB4, 0xCC, 0xAD, 0x10,
+	0xF3, 0x1C, 0x39, 0x05, 0x41, 0x2D, 0x57, 0x32, 0xE7, 0x16, 0xF8, 0x4D,
+	0xF0, 0xDE, 0x40, 0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0x09, 0x0A, 0x0B
+};
+
+/* iv */
+uint8_t iv[] = {
+	0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
+	0x0C, 0x0D, 0x0E, 0x0F
+};
+
+/* cipher key */
+uint8_t cipher_key[] = {
+	0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
+	0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+	0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F
+};
+
+/* auth key */
+uint8_t auth_key[] = {
+	0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
+	0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+	0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23,
+	0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F,
+	0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B,
+	0x3C, 0x3D, 0x3E, 0x3F, 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47,
+	0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53,
+	0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F,
+	0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B,
+	0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77,
+	0x78, 0x79, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F
+};
+
+/* Digests */
+uint8_t digest[2048] = { 0x00 };
+
+struct cperf_test_vector*
+cperf_test_vector_get_dummy(struct cperf_options *options)
+{
+	struct cperf_test_vector *t_vec;
+
+	t_vec = (struct cperf_test_vector *)rte_malloc(NULL,
+			sizeof(struct cperf_test_vector), 0);
+	if (t_vec == NULL)
+		return t_vec;
+
+	t_vec->plaintext.data = plaintext;
+	t_vec->plaintext.length = options->buffer_sz;
+
+	if (options->op_type ==	CPERF_CIPHER_ONLY ||
+			options->op_type == CPERF_CIPHER_THEN_AUTH ||
+			options->op_type == CPERF_AUTH_THEN_CIPHER ||
+			options->op_type == CPERF_AEAD) {
+		if (options->cipher_algo == RTE_CRYPTO_CIPHER_NULL) {
+			t_vec->cipher_key.length = -1;
+			t_vec->ciphertext.data = plaintext;
+			t_vec->cipher_key.data = NULL;
+			t_vec->iv.data = NULL;
+		} else {
+			t_vec->cipher_key.length = options->cipher_key_sz;
+			t_vec->ciphertext.data = ciphertext;
+			t_vec->cipher_key.data = cipher_key;
+			t_vec->iv.data = rte_malloc(NULL, options->cipher_iv_sz,
+					16);
+			if (t_vec->iv.data == NULL) {
+				rte_free(t_vec);
+				return NULL;
+			}
+			memcpy(t_vec->iv.data, iv, options->cipher_iv_sz);
+		}
+		t_vec->ciphertext.length = options->buffer_sz;
+		t_vec->iv.phys_addr = rte_malloc_virt2phy(t_vec->iv.data);
+		t_vec->iv.length = options->cipher_iv_sz;
+		t_vec->data.cipher_offset = 0;
+		t_vec->data.cipher_length = options->buffer_sz;
+	}
+
+	if (options->op_type ==	CPERF_AUTH_ONLY ||
+			options->op_type == CPERF_CIPHER_THEN_AUTH ||
+			options->op_type == CPERF_AUTH_THEN_CIPHER ||
+			options->op_type == CPERF_AEAD) {
+		t_vec->auth_key.length = options->auth_key_sz;
+		if (options->auth_algo == RTE_CRYPTO_AUTH_NULL) {
+			t_vec->auth_key.data = NULL;
+			t_vec->aad.data = NULL;
+		} else if (options->auth_algo == RTE_CRYPTO_AUTH_AES_GCM) {
+			t_vec->auth_key.data = NULL;
+			t_vec->aad.data = rte_malloc(NULL, options->auth_aad_sz,
+					16);
+			if (t_vec->aad.data == NULL) {
+				if (options->op_type !=	CPERF_AUTH_ONLY)
+					rte_free(t_vec->iv.data);
+				rte_free(t_vec);
+				return NULL;
+			}
+			memcpy(t_vec->aad.data, aad, options->auth_aad_sz);
+		} else {
+			t_vec->auth_key.data = auth_key;
+			t_vec->aad.data = NULL;
+		}
+
+		t_vec->aad.phys_addr = rte_malloc_virt2phy(t_vec->aad.data);
+		t_vec->aad.length = options->auth_aad_sz;
+		t_vec->digest.data = rte_malloc(NULL, options->auth_digest_sz,
+				16);
+		if (t_vec->digest.data == NULL) {
+			if (options->op_type !=	CPERF_AUTH_ONLY)
+				rte_free(t_vec->iv.data);
+			rte_free(t_vec->aad.data);
+			rte_free(t_vec);
+			return NULL;
+		}
+		t_vec->digest.phys_addr =
+				rte_malloc_virt2phy(t_vec->digest.data);
+		t_vec->digest.length = options->auth_digest_sz;
+		memcpy(t_vec->digest.data, digest, options->auth_digest_sz);
+		t_vec->data.auth_offset = 0;
+		t_vec->data.auth_length = options->buffer_sz;
+	}
+
+	return t_vec;
+}
diff --git a/app/crypto-perf/cperf_test_vectors.h b/app/crypto-perf/cperf_test_vectors.h
new file mode 100644
index 0000000..c14c984
--- /dev/null
+++ b/app/crypto-perf/cperf_test_vectors.h
@@ -0,0 +1,98 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright(c) 2016 Intel Corporation. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _CPERF_TEST_VECTRORS_
+#define _CPERF_TEST_VECTRORS_
+
+#include "cperf_options.h"
+
+struct cperf_test_vector {
+	struct {
+		uint8_t *data;
+		uint32_t length;
+	} plaintext;
+
+	struct {
+		uint8_t *data;
+		uint16_t length;
+	} cipher_key;
+
+	struct {
+		uint8_t *data;
+		uint16_t length;
+	} auth_key;
+
+	struct {
+		uint8_t *data;
+		phys_addr_t phys_addr;
+		uint16_t length;
+	} iv;
+
+	struct {
+		uint8_t *data;
+		uint32_t length;
+	} ciphertext;
+
+	struct {
+		uint8_t *data;
+		phys_addr_t phys_addr;
+		uint16_t length;
+	} aad;
+
+	struct {
+		uint8_t *data;
+		phys_addr_t phys_addr;
+		uint16_t length;
+	} digest;
+
+	struct {
+		uint32_t auth_offset;
+		uint32_t auth_length;
+		uint32_t cipher_offset;
+		uint32_t cipher_length;
+	} data;
+};
+
+struct cperf_test_vector*
+cperf_test_vector_get_dummy(struct cperf_options *options);
+
+extern uint8_t ciphertext[2048];
+
+extern uint8_t cipher_key[];
+extern uint8_t auth_key[];
+
+extern uint8_t iv[];
+extern uint8_t aad[];
+
+extern uint8_t digest[2048];
+
+#endif
diff --git a/app/crypto-perf/cperf_verify_parser.c b/app/crypto-perf/cperf_verify_parser.c
new file mode 100644
index 0000000..5640d84
--- /dev/null
+++ b/app/crypto-perf/cperf_verify_parser.c
@@ -0,0 +1,314 @@
+#include <stdio.h>
+
+#include <rte_malloc.h>
+#include "cperf_options.h"
+#include "cperf_test_vectors.h"
+#include "cperf_verify_parser.h"
+
+int
+free_test_vector(struct cperf_test_vector *vector, struct cperf_options *opts)
+{
+	if (vector == NULL || opts == NULL)
+		return -1;
+
+	if (opts->test_file == NULL) {
+		if (vector->iv.data)
+			rte_free(vector->iv.data);
+		if (vector->aad.data)
+			rte_free(vector->aad.data);
+		if (vector->digest.data)
+			rte_free(vector->digest.data);
+		rte_free(vector);
+
+	} else {
+		if (vector->plaintext.data)
+			rte_free(vector->plaintext.data);
+		if (vector->cipher_key.data)
+			rte_free(vector->cipher_key.data);
+		if (vector->auth_key.data)
+			rte_free(vector->auth_key.data);
+		if (vector->iv.data)
+			rte_free(vector->iv.data);
+		if (vector->ciphertext.data)
+			rte_free(vector->ciphertext.data);
+		if (vector->aad.data)
+			rte_free(vector->aad.data);
+		if (vector->digest.data)
+			rte_free(vector->digest.data);
+		rte_free(vector);
+	}
+
+	return 0;
+}
+
+/* trim leading and trailing spaces */
+static char *
+trim(char *str)
+{
+	char *start, *end;
+
+	for (start = str; *start; start++) {
+		if (!isspace((unsigned char) start[0]))
+			break;
+	}
+
+	for (end = start + strlen(start); end > start + 1; end--) {
+		if (!isspace((unsigned char) end[-1]))
+			break;
+	}
+
+	*end = 0;
+
+	/* Shift from "start" to the beginning of the string */
+	if (start > str)
+		memmove(str, start, (end - start) + 1);
+
+	return str;
+}
+
+/* tokenization test values separated by a comma */
+static int
+parse_values(char *tokens, uint8_t **data, uint32_t *data_length)
+{
+	uint8_t n_tokens;
+	uint32_t data_size = 32;
+	uint8_t *values;
+	char *tok, *error = NULL;
+
+	tok = strtok(tokens, VALUE_DELIMITER);
+	if (tok == NULL)
+		return -1;
+
+	values = (uint8_t *) rte_zmalloc(NULL, sizeof(uint8_t) * data_size, 0);
+	if (values == NULL)
+		return -1;
+
+	n_tokens = 0;
+	while (tok != NULL) {
+		uint8_t *values_extended = NULL;
+
+		if (n_tokens >= data_size) {
+
+			data_size *= 2;
+
+			values_extended = (uint8_t *) rte_realloc(values,
+				sizeof(uint8_t) * data_size, 0);
+			if (values_extended == NULL) {
+				rte_free(values);
+				return -1;
+			}
+
+			values = values_extended;
+		}
+
+		values[n_tokens] = (uint8_t) strtoul(tok, &error, 0);
+		if ((error == NULL) || (*error != '\0')) {
+			printf("Failed with convert '%s'\n", tok);
+			rte_free(values);
+			return -1;
+		}
+
+		tok = strtok(NULL, VALUE_DELIMITER);
+		if (tok == NULL)
+			break;
+
+		n_tokens++;
+	}
+
+	uint8_t *resize_values = (uint8_t *) rte_realloc(values,
+		sizeof(uint8_t) * (n_tokens + 1), 0);
+
+	if (resize_values == NULL) {
+		rte_free(values);
+		return -1;
+	}
+
+	*data = resize_values;
+	*data_length = n_tokens + 1;
+
+	return 0;
+}
+
+/* checks the type of key and assigns data */
+static int
+parse_entry(char *entry, struct cperf_test_vector *vector)
+{
+	char *token, *key_token;
+	uint8_t *data = NULL;
+	int status;
+	uint32_t data_length;
+
+	/* get key */
+	token = strtok(entry, ENTRY_DELIMITER);
+	key_token = token;
+
+	/* get values for key */
+	token = strtok(NULL, ENTRY_DELIMITER);
+
+	if (token == NULL) {
+		printf("Expected 'key = values' but was '%.40s'..\n",
+			key_token);
+		return -1;
+	}
+
+	status = parse_values(token, &data, &data_length);
+	if (status)
+		return -1;
+
+	/* compare keys */
+	if (strstr(key_token, "plaintext")) {
+		if (vector->plaintext.data)
+			rte_free(vector->plaintext.data);
+		vector->plaintext.data = data;
+		vector->plaintext.length = data_length;
+	} else if (strstr(key_token, "cipher_key")) {
+		if (vector->cipher_key.data)
+			rte_free(vector->cipher_key.data);
+		vector->cipher_key.data = data;
+		vector->cipher_key.length = data_length;
+	} else if (strstr(key_token, "auth_key")) {
+		if (vector->auth_key.data)
+			rte_free(vector->auth_key.data);
+		vector->auth_key.data = data;
+		vector->auth_key.length = data_length;
+	} else if (strstr(key_token, "iv")) {
+		if (vector->iv.data)
+			rte_free(vector->iv.data);
+		vector->iv.data = data;
+		vector->iv.phys_addr = rte_malloc_virt2phy(vector->iv.data);
+		vector->iv.length = data_length;
+	} else if (strstr(key_token, "ciphertext")) {
+		if (vector->ciphertext.data)
+			rte_free(vector->ciphertext.data);
+		vector->ciphertext.data = data;
+		vector->ciphertext.length = data_length;
+	} else if (strstr(key_token, "aad")) {
+		if (vector->aad.data)
+			rte_free(vector->aad.data);
+		vector->aad.data = data;
+		vector->aad.phys_addr = rte_malloc_virt2phy(vector->aad.data);
+		vector->aad.length = data_length;
+	} else if (strstr(key_token, "digest")) {
+		if (vector->digest.data)
+			rte_free(vector->digest.data);
+		vector->digest.data = data;
+		vector->digest.phys_addr = rte_malloc_virt2phy(
+			vector->digest.data);
+		vector->digest.length = data_length;
+	} else {
+		printf("Not valid key: '%s'\n", trim(key_token));
+		return -1;
+	}
+
+	return 0;
+}
+
+/* searches in the file for registry keys and values */
+static int
+parse_file(struct cperf_test_vector *v_vec, const char *path)
+{
+	FILE *fp;
+	char *line = NULL, *entry = NULL;
+	ssize_t read;
+	size_t len = 0;
+	int status = 0;
+
+	fp = fopen(path, "r");
+	if (fp == NULL) {
+		printf("File %s does not exists\n", path);
+		return -1;
+	}
+
+	while ((read = getline(&line, &len, fp)) != -1) {
+		/* ignore comments and new lines */
+		if (line[0] == '#' || line[0] == '/' || line[0] == '\n'
+			|| line[0] == '\r' || line[0] == ' ')
+			continue;
+
+		trim(line);
+
+		/* buffer for multiline */
+		entry = (char *) rte_realloc(entry,
+					sizeof(char) * strlen(line) + 1, 0);
+		if (entry == NULL)
+			return -1;
+
+		memset(entry, 0, strlen(line) + 1);
+		strncpy(entry, line, strlen(line));
+
+		/* check if entry ends with , or = */
+		if (entry[strlen(entry) - 1] == ','
+			|| entry[strlen(entry) - 1] == '=') {
+			while ((read = getline(&line, &len, fp)) != -1) {
+				trim(line);
+
+				/* extend entry about length of new line */
+				char *entry_extended = (char *) rte_realloc(
+					entry, sizeof(char)
+						* (strlen(line) + strlen(entry))
+						+ 1, 0);
+
+				if (entry_extended == NULL)
+					goto err;
+				entry = entry_extended;
+
+				strncat(entry, line, strlen(line));
+
+				if (entry[strlen(entry) - 1] != ',')
+					break;
+			}
+		}
+		status = parse_entry(entry, v_vec);
+		if (status) {
+			printf("An error occurred while parsing!\n");
+			goto err;
+		}
+	}
+
+	fclose(fp);
+	free(line);
+	rte_free(entry);
+
+	return 0;
+
+err:
+	if (fp)
+		fclose(fp);
+	if (line)
+		free(line);
+	if (entry)
+		rte_free(entry);
+
+	return -1;
+}
+
+struct cperf_test_vector*
+cperf_test_vector_get_from_file(struct cperf_options *opts)
+{
+	int status;
+	struct cperf_test_vector *test_vector = NULL;
+
+	if (opts == NULL || opts->test_file == NULL)
+		return test_vector;
+
+	test_vector = (struct cperf_test_vector *) rte_zmalloc(NULL,
+		sizeof(struct cperf_test_vector), 0);
+	if (test_vector == NULL)
+		return test_vector;
+
+	/* filling the vector with data from a file */
+	status = parse_file(test_vector, opts->test_file);
+	if (status) {
+		free_test_vector(test_vector, opts);
+		return NULL;
+	}
+
+	/* other values not included in the file */
+	test_vector->data.cipher_offset = 0;
+	test_vector->data.cipher_length = opts->buffer_sz;
+
+	test_vector->data.auth_offset = 0;
+	test_vector->data.auth_length = opts->buffer_sz;
+
+	return test_vector;
+}
diff --git a/app/crypto-perf/data/aes_cbc_128_sha.data b/app/crypto-perf/data/aes_cbc_128_sha.data
new file mode 100644
index 0000000..42fa194
--- /dev/null
+++ b/app/crypto-perf/data/aes_cbc_128_sha.data
@@ -0,0 +1,503 @@
+# List of tests for AES-128 CBC:
+# 1) [sha1_hmac_buff_x]
+# 2) [sha224_hmac_buff_x]
+# 3) [sha256_hmac_buff_x]
+# 4) [sha384_hmac_buff_x]
+# 5) [sha512_hmac_buff_x]
+# where x is one of the values: 32, 64, 128, 256, 512, 1024, 2048
+
+##########
+# GLOBAL #
+##########
+plaintext =
+0xff, 0xca, 0xfb, 0xf1, 0x38, 0x20, 0x2f, 0x7b, 0x24, 0x98, 0x26, 0x7d, 0x1d, 0x9f, 0xb3, 0x93,
+0xd9, 0xef, 0xbd, 0xad, 0x4e, 0x40, 0xbd, 0x60, 0xe9, 0x48, 0x59, 0x90, 0x67, 0xd7, 0x2b, 0x7b,
+0x8a, 0xe0, 0x4d, 0xb0, 0x70, 0x38, 0xcc, 0x48, 0x61, 0x7d, 0xee, 0xd6, 0x35, 0x49, 0xae, 0xb4,
+0xaf, 0x6b, 0xdd, 0xe6, 0x21, 0xc0, 0x60, 0xce, 0x0a, 0xf4, 0x1c, 0x2e, 0x1c, 0x8d, 0xe8, 0x7b,
+0x59, 0xda, 0x19, 0x4f, 0xec, 0x07, 0x8e, 0xe2, 0xf0, 0x61, 0xf9, 0x27, 0x61, 0x6f, 0xf8, 0xdf,
+0x62, 0x4d, 0xaf, 0x06, 0xfe, 0x41, 0xa6, 0xa6, 0xf9, 0xa2, 0x06, 0x40, 0xb3, 0x04, 0xbd, 0xe6,
+0xc8, 0x17, 0xfb, 0x56, 0x6f, 0xa9, 0x3b, 0x8e, 0xa6, 0x58, 0xdc, 0x91, 0x17, 0x58, 0x42, 0x95,
+0xa3, 0x7c, 0x81, 0x78, 0xa6, 0x3d, 0x3f, 0x75, 0x74, 0x17, 0x1a, 0xd3, 0x6c, 0x2f, 0x48, 0x39,
+0x20, 0x20, 0xc1, 0x9a, 0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, 0xcd, 0x86, 0x79, 0xf5, 0x01, 0x47,
+0x4f, 0xf9, 0x1d, 0x9d, 0x36, 0xf7, 0x68, 0x1a, 0x64, 0x44, 0x58, 0x5d, 0xe5, 0x81, 0x15, 0x2a,
+0x41, 0xe4, 0x0e, 0xaa, 0x1f, 0x04, 0x21, 0xff, 0x2c, 0xf3, 0x73, 0x2b, 0x48, 0x1e, 0xd2, 0xf7,
+0xf6, 0xd9, 0xaf, 0xbf, 0x08, 0x3b, 0xbb, 0x19, 0x5f, 0xf6, 0x7d, 0x25, 0x85, 0xdf, 0x6b, 0x54,
+0xd0, 0xe7, 0x4b, 0x9e, 0xc7, 0xef, 0xca, 0x48, 0x6f, 0x21, 0xd7, 0x51, 0xc8, 0x21, 0xc1, 0x15,
+0xe8, 0x38, 0x36, 0x58, 0x39, 0xd9, 0x9a, 0xc5, 0xe7, 0x3b, 0xc4, 0x47, 0xe2, 0xbd, 0x80, 0x73,
+0xf8, 0xd1, 0x9a, 0x5e, 0x4b, 0xfb, 0x52, 0x6b, 0x50, 0xaf, 0x8b, 0xb7, 0xb5, 0x2c, 0x52, 0x84
+
+iv =
+0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F
+
+####################
+# sha_hmac_buff_32 #
+####################
+[sha1_hmac_buff_32]
+digest =
+0x8C, 0xD8, 0x0F, 0x6F, 0x32, 0xED, 0x11, 0xFF, 0x3B, 0xC3, 0x1C, 0xA7, 0x62, 0xE2, 0x2B, 0xCB,
+0x87, 0x65, 0x58, 0x92
+
+[sha224_hmac_buff_32]
+digest =
+0x2A, 0x97, 0xC8, 0xF8, 0x95, 0xAB, 0x35, 0x88, 0x88, 0x0F, 0x9B, 0x06, 0xEC ,0xE9, 0x27, 0xA3,
+0x17, 0x99, 0x28, 0xF8, 0xDF, 0xB4, 0xE1, 0x4E, 0x47, 0x0B, 0xDE, 0x8D
+
+[sha256_hmac_buff_32]
+digest =
+0x5C, 0x92, 0xD1, 0x03, 0x49, 0xA5, 0x20, 0x3E, 0x1B, 0x88, 0x6A, 0x30, 0xFB, 0x45, 0x1A, 0x4D,
+0xF7, 0xF2, 0xD0, 0x78, 0x20, 0x61, 0x7C, 0xD6, 0x4E, 0x0E, 0x7B, 0x3B, 0x35, 0xFE, 0xD8, 0x9A
+
+[sha384_hmac_buff_32]
+digest =
+0x8A, 0x39, 0x0D, 0x1C, 0x0C, 0x4A, 0x3C, 0x25, 0xA7, 0x43, 0x2C, 0x26, 0xF3, 0xCF, 0xB4, 0x92,
+0x41, 0x9C, 0x2C, 0xE2, 0x63, 0x40, 0x0B, 0x91, 0xD8, 0xB6, 0x30, 0xE4, 0x9F, 0x96, 0xDE, 0x3C,
+0xED, 0x66, 0x8B, 0x65, 0x5A, 0xA3, 0xB8, 0xD4, 0x01, 0xB3, 0xBC, 0xAA, 0x08, 0x92, 0x5C, 0x2F
+
+[sha512_hmac_buff_32]
+digest =
+0x1E, 0x27, 0xE8, 0xBD, 0xDA, 0x56, 0xC0, 0x5D, 0x04, 0xA0, 0xFC, 0x21, 0xCF, 0x52, 0x07, 0x45,
+0x28, 0xAD, 0x33, 0xC4, 0x3C, 0x07, 0x0B, 0x6B, 0xC9, 0x90, 0x2B, 0xE5, 0xCA, 0x11, 0x7C, 0x86,
+0x95, 0xF4, 0xC4, 0x56, 0xAC, 0x86, 0x0D, 0xF0, 0x62, 0xB8, 0x6C, 0xFC, 0x88, 0xC6, 0xBA, 0xF7,
+0x35, 0xDD, 0xB6, 0x2E, 0x34, 0x09, 0x27, 0x93, 0xB0, 0xF3, 0x0B, 0x7D, 0x9F, 0x74, 0x2D, 0x4F
+
+####################
+# sha_hmac_buff_64 #
+####################
+[sha1_hmac_buff_64]
+digest =
+0xAC, 0xD8, 0x84, 0x6B, 0x21, 0x20, 0xFE, 0x7D, 0x60, 0xA9, 0x6C, 0x0D, 0x64, 0xF9, 0x27, 0x5D,
+0x2F, 0xE9, 0xDF, 0x94
+
+[sha224_hmac_buff_64]
+digest =
+0xB2, 0x30, 0xEC, 0xC5, 0x3A, 0xA5, 0x77, 0x30, 0xDE, 0x64, 0xCE, 0x6D, 0x23, 0xF1, 0x07, 0xBF,
+0x96, 0x2A, 0xFE, 0x3A, 0xFD, 0xA1, 0x97, 0x3E, 0x73, 0x17, 0x42, 0x0B
+
+[sha256_hmac_buff_64]
+digest =
+0xB9, 0x48, 0x3B, 0x99, 0x56, 0x93, 0x0A, 0x4E, 0x11, 0xC8, 0x6D, 0x51, 0x56, 0xD6, 0xFB, 0xC4,
+0x2D, 0x36, 0x0C, 0x3B, 0x18, 0xF6, 0x3E, 0xF8, 0xD2, 0x5D, 0xA5, 0x9F, 0xFB, 0xE8, 0x58, 0x93
+
+[sha384_hmac_buff_64]
+digest =
+0x76, 0x45, 0x45, 0xB5, 0xE5, 0xDE, 0xC2, 0x7B, 0x01, 0xAA, 0x58, 0xB7, 0xD2, 0xCA, 0x0B, 0x6A,
+0xA1, 0x4E, 0x0D, 0xCC, 0xCF, 0x22, 0x9D, 0xBA, 0xA1, 0x6C, 0x54, 0x1A, 0x3B, 0x8B, 0xD9, 0x6F,
+0xB5, 0xA9, 0xC2, 0x80, 0xBF, 0x6C, 0xED, 0xED, 0xA1, 0xB0, 0x15, 0xA6, 0x91, 0x5A, 0xDD, 0x3F
+
+[sha512_hmac_buff_64]
+digest =
+0xED, 0xD9, 0xCA, 0xFE, 0x44, 0x12, 0x8F, 0xF1, 0xCD, 0x91, 0x58, 0x2A, 0x4D, 0xC7, 0x77, 0x50,
+0xD1, 0xBD, 0x9D, 0x33, 0xE3, 0x3A, 0xEA, 0xE1, 0x64, 0x18, 0x48, 0xE9, 0xF0, 0xEC, 0xE0, 0x0F,
+0x13, 0xFD, 0xB9, 0xB2, 0xCF, 0xBC, 0x43, 0x07, 0x66, 0x6E, 0x76, 0x18, 0x27, 0x0D, 0x15, 0x50,
+0x8A, 0x1C, 0x88, 0x8C, 0xC9, 0xDA, 0xD8, 0x30, 0x09, 0xE7, 0xD5, 0x25, 0xB8, 0x09, 0xFF, 0x20
+
+#####################
+# sha_hmac_buff_128 #
+#####################
+[sha1_hmac_buff_128]
+digest =
+0x09, 0x94, 0x8F, 0xD2, 0xE9, 0x08, 0x5B, 0x76, 0xAC, 0xCB, 0x07, 0x60, 0xE7, 0x41, 0xBD, 0x6C,
+0x91, 0x9E, 0xF4, 0x87
+
+[sha224_hmac_buff_128]
+digest =
+0x3A, 0x85, 0x01, 0x4C, 0xF7, 0xA8, 0xB0, 0xF7, 0x74, 0xAB, 0xB0, 0x89, 0x83, 0x2C, 0x3A, 0xA1,
+0x28, 0x87, 0xD7, 0xAB, 0xCF, 0x14, 0xE0, 0x73, 0xFB, 0x19, 0x85, 0xEF
+
+[sha256_hmac_buff_128]
+digest =
+0x7F, 0x79, 0xE4, 0x17, 0x6E, 0xE5, 0x78, 0xA0, 0x26, 0x65, 0x62, 0x7D, 0xB5, 0x69, 0x62, 0xC0,
+0x7B, 0x5C, 0xBA, 0x55, 0x06, 0xAD, 0x3D, 0xDE, 0xAA, 0xA7, 0xED, 0x82, 0x3A, 0xBD, 0xBA, 0xFB
+
+[sha384_hmac_buff_128]
+digest =
+0xEC, 0x68, 0xCB, 0x8E, 0x90, 0xCF, 0x8D, 0x04, 0xAF, 0x1F, 0x4C, 0x0B, 0xE9, 0x9B, 0x03, 0x05,
+0x19, 0x54, 0x4D, 0x28, 0x02, 0x8B, 0x19, 0x39, 0x1D, 0x59, 0xEF, 0x9C, 0xA1, 0xA5, 0x06, 0x89,
+0x7B, 0x81, 0xDB, 0xD2, 0xAC, 0x21, 0x79, 0xFF, 0xE9, 0x5A, 0x8A, 0xEE, 0x28, 0x12, 0x8D, 0xB1
+
+[sha512_hmac_buff_128]
+digest =
+0x98, 0xED, 0x87, 0x00, 0x0B, 0x2E, 0x5C, 0xFA, 0x56, 0x94, 0x86, 0x96, 0x6A, 0x45, 0x99, 0xC4,
+0xD8, 0x7E, 0x69, 0x6E, 0xD0, 0x47, 0x01, 0xA9, 0x03, 0xBE, 0x8A, 0x77, 0xDB, 0x19, 0x29, 0xFA,
+0xB8, 0xBF, 0x7E, 0x3B, 0xB1, 0x0F, 0xF8, 0xED, 0x63, 0xD4, 0x9B, 0x6F, 0xE5, 0xD6, 0xE3, 0xED,
+0x2B, 0x89, 0xB2, 0xBD, 0xF7, 0x36, 0x9C, 0xE8, 0x02, 0x88, 0x42, 0x4A, 0x15, 0x24, 0xBB, 0xAB
+
+#####################
+# sha_hmac_buff_256 #
+#####################
+[sha1_hmac_buff_256]
+digest =
+0x1E, 0x7E, 0x38, 0x4E, 0x76, 0x38, 0x75, 0xFE, 0x02, 0xAB, 0x1C, 0xA2, 0xAE, 0xBC, 0x4B, 0x57,
+0x16, 0xB2, 0xB2, 0x4D
+
+[sha224_hmac_buff_256]
+digest =
+0x49, 0xDA, 0x8E, 0xFB, 0xCD, 0xDF, 0xB8, 0x17, 0x3E, 0xF7, 0xF2, 0x73, 0x03, 0x23, 0x1F, 0x57,
+0x7C, 0x50, 0x89, 0x24, 0x56, 0xF0, 0x54, 0x5D, 0x6A, 0x30, 0xE1, 0x44
+
+[sha256_hmac_buff_256]
+digest =
+0xAB, 0x6D, 0xBF, 0x17, 0x2B, 0xE0, 0xD5, 0xF1, 0xB3, 0xC3, 0x25, 0xFA, 0x99, 0xEF, 0x38, 0x91,
+0x12, 0x3B, 0xDE, 0xD7, 0x48, 0xA3, 0x69, 0x2E, 0xAD, 0xA8, 0xAD, 0x08, 0x42, 0xBC, 0x78, 0xE3
+
+[sha384_hmac_buff_256]
+digest =
+0x4C, 0xF8, 0x22, 0x1B, 0x10, 0xBE, 0xD2, 0xEA, 0xBF, 0x27, 0x7C, 0x11, 0xBC, 0x53, 0x8B, 0xC1,
+0x3B, 0x13, 0xC9, 0xE0, 0xAA, 0x7E, 0x41, 0x17, 0xD0, 0x2C, 0x15, 0x6D, 0x23, 0x2E, 0x4E, 0xA0,
+0x44, 0x45, 0xBC, 0x7E, 0xD3, 0x6D, 0x68, 0xA1, 0xDD, 0xD5, 0xA7, 0x0B, 0x0E, 0x5A, 0x21, 0x41
+
+[sha512_hmac_buff_256]
+digest =
+0x25, 0x03, 0x50, 0xD1, 0x7C, 0x35, 0x33, 0x5C, 0xB5, 0x08, 0xBA, 0xFA, 0x9A, 0x86, 0x8E, 0x95,
+0x67, 0x62, 0xCB, 0x02, 0xEE, 0x3A, 0x1A, 0xD0, 0x0D, 0xD0, 0x3A, 0x79, 0xC9, 0x01, 0x1B, 0x78,
+0xF2, 0xCA, 0x57, 0xA5, 0x3C, 0x1B, 0x44, 0xFA, 0xC0, 0xEF, 0xF7, 0x68, 0xF3, 0xE3, 0x75, 0xFB,
+0x85, 0xFF, 0xD0, 0x8A, 0xE3, 0x43, 0xBE, 0x98, 0x1C, 0xCF, 0xBA, 0x01, 0x84, 0x30, 0xC3, 0xE9
+
+#####################
+# sha_hmac_buff_512 #
+#####################
+[sha1_hmac_buff_512]
+digest =
+0x55, 0x80, 0xC9, 0x15, 0xF4, 0x5D, 0x67, 0xF1, 0xDE, 0x07, 0xF2, 0x91, 0x88, 0x59, 0x95, 0x34,
+0x3A, 0xF5, 0x01, 0x61
+
+[sha224_hmac_buff_512]
+digest =
+0x98, 0x3D, 0x26, 0x3C, 0x62, 0x20, 0x69, 0x12, 0x0A, 0x01, 0x9B, 0x83, 0xC4, 0xD3, 0xE7, 0xAE,
+0xAD, 0xF3, 0x80, 0x35, 0xC7, 0x2A, 0xD7, 0x9B, 0xA9, 0x59, 0x6F, 0x23
+
+[sha256_hmac_buff_512]
+digest =
+0x3B, 0xD9, 0x0C, 0x74, 0x2F, 0x3B, 0xBA, 0xCA, 0x05, 0xA9, 0x17, 0x87, 0xB5, 0x38, 0x68, 0x63,
+0xC6, 0x0D, 0x3B, 0xFA, 0x32, 0x10, 0x29, 0x60, 0xDB, 0x2E, 0xBA, 0x73, 0x5D, 0xF3, 0x8F, 0x9F
+
+[sha384_hmac_buff_512]
+digest =
+0xE9, 0xA4, 0x1A, 0x3B, 0xE1, 0xDD, 0xD8, 0x47, 0x21, 0xDC, 0xEB, 0xB9, 0x22, 0xAA, 0x45, 0xD2,
+0x61, 0x47, 0x63, 0x88, 0x13, 0x6E, 0x1E, 0x8A, 0x7D, 0x37, 0xE0, 0x21, 0xC0, 0x08, 0x66, 0xE7,
+0x84, 0xCA, 0x7A, 0x09, 0x87, 0x84, 0x07, 0xCF, 0x8A, 0x22, 0x41, 0x68, 0x0E, 0x48, 0x11, 0x2A
+
+[sha512_hmac_buff_512]
+digest =
+0xD5, 0x41, 0x0A, 0x48, 0x68, 0x9B, 0xC1, 0x86, 0x16, 0x1A, 0x5D, 0x9E, 0x0E, 0x62, 0x0F, 0xB1,
+0xEE, 0x03, 0xE1, 0x23, 0xFE, 0xF0, 0x0F, 0x3F, 0xB0, 0xE1, 0x9C, 0xBC, 0x3E, 0x6D, 0x28, 0xD6,
+0x59, 0xB6, 0xC6, 0x17, 0x75, 0xD0, 0x2E, 0x7C, 0x1E, 0xCA, 0x40, 0x23, 0x16, 0x93, 0x94, 0xAC,
+0xD2, 0xDD, 0x5B, 0xB5, 0xAB, 0x69, 0x70, 0x84, 0xAB, 0xCF, 0x71, 0x53, 0x45, 0xFC, 0x01, 0x23
+
+######################
+# sha_hmac_buff_1024 #
+######################
+[sha1_hmac_buff_1024]
+digest =
+0x77, 0x5E, 0xFB, 0x4C, 0x35, 0x03, 0x85, 0x7D, 0xBA, 0xBE, 0x9D, 0xD5, 0xD7, 0xC3, 0x62, 0xFB,
+0xC0, 0x11, 0x54, 0xF9
+
+[sha224_hmac_buff_1024]
+digest =
+0x1D, 0xC5, 0xAB, 0xE5, 0xEA, 0xAD, 0x5C, 0x72, 0xB3, 0x3D, 0xF4, 0x21, 0x69, 0x1E, 0x9C, 0xBC,
+0xE1, 0x86, 0x91, 0x80, 0x7D, 0x52, 0x6E, 0x31, 0x14, 0xAE, 0x8A, 0xB7
+
+[sha256_hmac_buff_1024]
+digest =
+0x74, 0xC9, 0x7C, 0x21, 0xF8, 0xCC, 0x4C, 0xCB, 0xD6, 0xC3, 0xED, 0xA5, 0xF4, 0xAE, 0x75, 0x5F,
+0xE7, 0xAA, 0x49, 0x2E, 0x63, 0x7D, 0xF3, 0xD6, 0x9E, 0x46, 0x6F, 0x8A, 0x5C, 0x4B, 0xDF, 0x51
+
+[sha384_hmac_buff_1024]
+digest =
+0x6A, 0xCB, 0xD7, 0x77, 0xC1, 0xC8, 0xF5, 0xF3, 0x4C, 0x6A, 0xF5, 0xFC, 0xD0, 0xC2, 0x68, 0xF1,
+0x45, 0x3C, 0xBA, 0xFF, 0x83, 0x98, 0xB4, 0x0A, 0x29, 0x97, 0x27, 0xE8, 0x74, 0x2B, 0x66, 0xC0,
+0x5B, 0x45, 0x70, 0xA0, 0x8E, 0xD5, 0x16, 0x88, 0x0D, 0xB9, 0xBA, 0x3A, 0x70, 0x3F, 0x4B, 0xD0
+
+[sha512_hmac_buff_1024]
+digest =
+0x6A, 0x8D, 0x3F, 0x10, 0x56, 0xAF, 0xF0, 0xD4, 0x00, 0xE7, 0x4D, 0xBB, 0xCD, 0x3E, 0xD0, 0x39,
+0x21, 0xC4, 0xFD, 0x04, 0xC1, 0x91, 0xB7, 0xE5, 0xDF, 0x52, 0xED, 0xE5, 0xA0, 0x87, 0x76, 0x0E,
+0x44, 0x63, 0xED, 0xDD, 0xEA, 0xBF, 0x2E, 0xBF, 0x6B, 0x87, 0x9E, 0x5C, 0xD7, 0x55, 0x73, 0xD0,
+0xB2, 0xAC, 0x12, 0x87, 0xE1, 0x96, 0xD4, 0x1E, 0xD0, 0x5D, 0x83, 0x88, 0xC2, 0x00, 0xD0, 0xBE
+
+######################
+# sha_hmac_buff_2048 #
+######################
+[sha1_hmac_buff_2048]
+digest =
+0x02, 0xD4, 0x67, 0xF9, 0x41, 0x5C, 0x91, 0x62, 0x7E, 0x39, 0x4B, 0x3C, 0x2D, 0x77, 0x7A, 0x2C,
+0x2D, 0x47, 0x3E, 0x48
+
+[sha224_hmac_buff_2048]
+digest =
+0xF0, 0x8D, 0x1C, 0xF8, 0x7A, 0x5E, 0xA5, 0x48, 0x36, 0x7F, 0x96, 0x4A, 0x66, 0x66, 0x36, 0x32,
+0x5D, 0x68, 0xB8, 0x21, 0x5A, 0xE1, 0x95, 0x4F, 0x22, 0xF4, 0x44, 0x38
+
+[sha256_hmac_buff_2048]
+digest =
+0x82, 0xC2, 0x7C, 0x08, 0xE2, 0x94, 0xD8, 0xA9, 0x3C, 0xBB, 0x54, 0x20, 0xC2, 0x01, 0xBC, 0xF4,
+0xA2, 0xEE, 0x76, 0x06, 0x78, 0xE9, 0x51, 0x2F, 0x4D, 0x7D, 0x20, 0x20, 0x75, 0x1E, 0xB2, 0x8A
+
+[sha384_hmac_buff_2048]
+digest =
+0x59, 0xA5, 0xAA, 0xEE, 0xD8, 0x13, 0xB1, 0xBF, 0x28, 0x83, 0xB8, 0xB2, 0xBC, 0x91, 0x0F, 0x2E,
+0xCB, 0xC4, 0xCD, 0x8F, 0xE4, 0xB1, 0x28, 0xBE, 0xC4, 0x1A, 0xC4, 0x45, 0xF9, 0xCC, 0x6C, 0x6F,
+0x71, 0x59, 0x2C, 0xC4, 0x47, 0x61, 0xFE, 0xBB, 0xDD, 0x2B, 0x99, 0xDD, 0x6A, 0x49, 0x61, 0x33
+
+[sha512_hmac_buff_2048]
+digest =
+0x90, 0xAD, 0xA3, 0xFB, 0xC3, 0x88, 0x1F, 0xD9, 0x53, 0xE4, 0x9C, 0x71, 0x38, 0x3B, 0xFA, 0x99,
+0x82, 0x32, 0xC4, 0xFC, 0x61, 0x36, 0x65, 0x9E, 0xDF, 0x9C, 0xDB, 0xD5, 0xD2, 0xD0, 0xAE, 0x78,
+0x74, 0x08, 0xF0, 0x97, 0x7E, 0x1A, 0x0C, 0xC3, 0xDD, 0x8F, 0xB3, 0x1C, 0x55, 0xAC, 0xA7, 0xC9,
+0x49, 0x1C, 0xA7, 0xF7, 0xBA, 0xC0, 0x93, 0x54, 0xA3, 0x6B, 0xBF, 0xA7, 0x03, 0x40, 0xE0, 0x28
\ No newline at end of file
diff --git a/app/crypto-perf/data/aes_cbc_192_sha.data b/app/crypto-perf/data/aes_cbc_192_sha.data
new file mode 100644
index 0000000..7bfe3da
--- /dev/null
+++ b/app/crypto-perf/data/aes_cbc_192_sha.data
@@ -0,0 +1,504 @@
+# List of tests for AES-192 CBC:
+# 1) [sha1_hmac_buff_x]
+# 2) [sha224_hmac_buff_x]
+# 3) [sha256_hmac_buff_x]
+# 4) [sha384_hmac_buff_x]
+# 5) [sha512_hmac_buff_x]
+# where x is one of the values: 32, 64, 128, 256, 512, 1024, 2048
+
+##########
+# GLOBAL #
+##########
+plaintext =
+0xff, 0xca, 0xfb, 0xf1, 0x38, 0x20, 0x2f, 0x7b, 0x24, 0x98, 0x26, 0x7d, 0x1d, 0x9f, 0xb3, 0x93,
+0xd9, 0xef, 0xbd, 0xad, 0x4e, 0x40, 0xbd, 0x60, 0xe9, 0x48, 0x59, 0x90, 0x67, 0xd7, 0x2b, 0x7b,
+0x8a, 0xe0, 0x4d, 0xb0, 0x70, 0x38, 0xcc, 0x48, 0x61, 0x7d, 0xee, 0xd6, 0x35, 0x49, 0xae, 0xb4,
+0xaf, 0x6b, 0xdd, 0xe6, 0x21, 0xc0, 0x60, 0xce, 0x0a, 0xf4, 0x1c, 0x2e, 0x1c, 0x8d, 0xe8, 0x7b,
+0x59, 0xda, 0x19, 0x4f, 0xec, 0x07, 0x8e, 0xe2, 0xf0, 0x61, 0xf9, 0x27, 0x61, 0x6f, 0xf8, 0xdf,
+0x62, 0x4d, 0xaf, 0x06, 0xfe, 0x41, 0xa6, 0xa6, 0xf9, 0xa2, 0x06, 0x40, 0xb3, 0x04, 0xbd, 0xe6,
+0xc8, 0x17, 0xfb, 0x56, 0x6f, 0xa9, 0x3b, 0x8e, 0xa6, 0x58, 0xdc, 0x91, 0x17, 0x58, 0x42, 0x95,
+0xa3, 0x7c,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
+0xE4, 0x23, 0x33, 0x8A, 0x35, 0x64, 0x61, 0xE2, 0x49, 0x03, 0xDD, 0xC6, 0xB8, 0xCA, 0x55, 0x7A,
+0xd0, 0xe7, 0x4b, 0xfb, 0x5d, 0xe5, 0x0c, 0xe7
+
+auth_key =
+0xaf, 0x96, 0x42, 0xf1, 0x8c, 0x50, 0xdc, 0x67, 0x1a, 0x43, 0x47, 0x62, 0xc7, 0x04, 0xab, 0x05,
+0xf5, 0x0c, 0xe7, 0xa2, 0xa6, 0x23, 0xd5, 0x3d, 0x95, 0xd8, 0xcd, 0x86, 0x79, 0xf5, 0x01, 0x47,
+0x4f, 0xf9, 0x1d, 0x9d, 0x36, 0xf7, 0x68, 0x1a, 0x64, 0x44, 0x58, 0x5d, 0xe5, 0x81, 0x15, 0x2a,
+0x41, 0xe4, 0x0e, 0xaa, 0x1f, 0x04, 0x21, 0xff, 0x2c, 0xf3, 0x73, 0x2b, 0x48, 0x1e, 0xd2, 0xf7,
+0xf6, 0xd9, 0xaf, 0xbf, 0x08, 0x3b, 0xbb, 0x19, 0x5f, 0xf6, 0x7d, 0x25, 0x85, 0xdf, 0x6b, 0x54,
+0xd0, 0xe7, 0x4b, 0x9e, 0xc7, 0xef, 0xca, 0x48, 0x6f, 0x21, 0xd7, 0x51, 0xc8, 0x21, 0xc1, 0x15,
+0xe8, 0x38, 0x36, 0x58, 0x39, 0xd9, 0x9a, 0xc5, 0xe7, 0x3b, 0xc4, 0x47, 0xe2, 0xbd, 0x80, 0x73,
+0xf8, 0xd1, 0x9a, 0x5e, 0x4b, 0xfb, 0x52, 0x6b, 0x50, 0xaf, 0x8b, 0xb7, 0xb5, 0x2c, 0x52, 0x84
+
+iv =
+0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F
+
+####################
+# sha_hmac_buff_32 #
+####################
+[sha1_hmac_buff_32]
+digest =
+0x34, 0xCB, 0xFA, 0xE6, 0xBF, 0x60, 0x88, 0x82, 0x2C, 0x9F, 0x96, 0x4A, 0x5A, 0xD8, 0xAE, 0x48,
+0x1D, 0x2B, 0x0A, 0x22
+
+[sha224_hmac_buff_32]
+digest =
+0x17, 0xDD, 0xF3, 0xC0, 0xFC, 0xBC, 0x89, 0xE1, 0x02, 0x94, 0x51, 0x2B, 0xA0, 0x63, 0x4D, 0x1B,
+0x78, 0xCA, 0x0D, 0xD5, 0x99, 0xC0, 0xB8, 0x8E, 0x7F, 0x8A, 0xCB, 0x92
+
+[sha256_hmac_buff_32]
+digest =
+0xF7, 0xC0, 0xFD, 0x09, 0x94, 0x8F, 0x88, 0xF3, 0x26, 0xE1, 0xB1, 0xA6, 0x70, 0xFD, 0x57, 0xA2,
+0xB7, 0x63, 0x9C, 0x35, 0x97, 0x60, 0x27, 0x6A, 0xCC, 0xD8, 0x4A, 0xAE, 0xFD, 0xEC, 0x14, 0x56
+
+[sha384_hmac_buff_32]
+digest =
+0x01, 0x90, 0x96, 0x95, 0x8B, 0xE8, 0xF8, 0x30, 0xE0, 0xFE, 0xD4, 0x83, 0xE4, 0xE1, 0x48, 0xEB,
+0xEB, 0x3E, 0x6D, 0xBC, 0x72, 0xD8, 0xBF, 0x00, 0x86, 0x0B, 0x80, 0xCB, 0xCF, 0x0E, 0x83, 0x7E,
+0x77, 0x29, 0xA0, 0x71, 0xA9, 0x15, 0x8F, 0xE5, 0xC4, 0x32, 0xC8, 0xDB, 0x0A, 0xD1, 0xE3, 0x79
+
+[sha512_hmac_buff_32]
+digest =
+0x45, 0x72, 0x2B, 0xF4, 0x10, 0x82, 0xB6, 0xBC, 0xDB, 0x44, 0x34, 0x47, 0x55, 0xA7, 0x34, 0x4C,
+0x1C, 0x5D, 0x4D, 0x88, 0x58, 0x0B, 0xC2, 0x3E, 0xE7, 0x49, 0xF4, 0x6A, 0x99, 0x35, 0xE5, 0x2B,
+0xF4, 0x18, 0xD7, 0xD1, 0xAF, 0xC9, 0x81, 0xC5, 0x97, 0xE7, 0x94, 0xC4, 0xFD, 0x95, 0x7E, 0x1D,
+0x4E, 0xF4, 0x88, 0xC0, 0x10, 0x31, 0xB5, 0x1E, 0x39, 0x91, 0x1A, 0x48, 0xC2, 0x2F, 0xFE, 0xF6
+
+####################
+# sha_hmac_buff_64 #
+####################
+[sha1_hmac_buff_64]
+digest =
+0xD5, 0x0D, 0x9A, 0x30, 0xED, 0x71, 0x88, 0xF3, 0x72, 0x5D, 0x1C, 0xEF, 0x44, 0x36, 0xC1, 0x0C,
+0x66, 0x32, 0x15, 0xB5
+
+[sha224_hmac_buff_64]
+digest =
+0x59, 0xF0, 0x38, 0xA5, 0x7F, 0xDC, 0x55, 0xAF, 0x0A, 0x18, 0x0B, 0x34, 0xC1, 0x48, 0xFC, 0xB2,
+0xF8, 0x3B, 0xC2, 0x4A, 0x36, 0x0F, 0xEA, 0x4F, 0xD9, 0x46, 0x25, 0x1F
+
+[sha256_hmac_buff_64]
+digest =
+0x00, 0xD2, 0x5F, 0xAC, 0x89, 0x4B, 0x16, 0x08, 0x89, 0x8D, 0x4F, 0x8F, 0x56, 0xF5, 0xA2, 0x9B,
+0xDB, 0x91, 0x2F, 0xCE, 0x90, 0x0E, 0x4B, 0x17, 0x74, 0x8B, 0xC4, 0x8A, 0x47, 0xF0, 0x7C, 0x7A
+
+[sha384_hmac_buff_64]
+digest =
+0xFE, 0x79, 0x5C, 0x3D, 0xEA, 0x2C, 0x04, 0xB9, 0xE9, 0x37, 0x4E, 0x02, 0xE8, 0x56, 0xE8, 0x7E,
+0xB4, 0xA7, 0x3D, 0x37, 0xDD, 0x05, 0x58, 0x6A, 0x3D, 0x44, 0x0E, 0x84, 0xA9, 0xB4, 0x1F, 0x26,
+0xED, 0xAF, 0xA3, 0x4D, 0xA3, 0x6E, 0x30, 0x8F, 0xE3, 0x79, 0xB9, 0x58, 0x4E, 0xB3, 0x36, 0x1D
+
+[sha512_hmac_buff_64]
+digest =
+0x3A, 0xFE, 0x1E, 0xC8, 0x75, 0x0D, 0xF3, 0x15, 0x03, 0xCC, 0x7B, 0x50, 0xD1, 0x3E, 0x35, 0x97,
+0x4D, 0x80, 0xB8, 0x0B, 0x5E, 0x22, 0x4D, 0xB9, 0xD2, 0xC9, 0x0E, 0x24, 0xC4, 0xD9, 0xDD, 0x95,
+0xA1, 0x7D, 0xED, 0xE4, 0x28, 0x17, 0x7C, 0x50, 0x0B, 0x40, 0x81, 0x18, 0xEA, 0xFF, 0xBA, 0x1C,
+0x8C, 0x5D, 0x17, 0xB3, 0x5B, 0x39, 0x70, 0x93, 0x9A, 0xA0, 0x47, 0x59, 0x06, 0x01, 0xE5, 0xD0
+
+#####################
+# sha_hmac_buff_128 #
+#####################
+[sha1_hmac_buff_128]
+digest =
+0xF6, 0x21, 0x56, 0x15, 0xEC, 0xB6, 0xDE, 0x2B, 0x68, 0x79, 0x30, 0x69, 0x69, 0x82, 0x4B, 0x97,
+0x57, 0x61, 0xED, 0x01
+
+[sha224_hmac_buff_128]
+digest =
+0xC4, 0x5A, 0x48, 0x07, 0xCC, 0xFD, 0x68, 0x28, 0xCC, 0xDA, 0x13, 0x9C, 0xFE, 0x02, 0x22, 0x1C,
+0xD5, 0x2E, 0x9F, 0x0D, 0xED, 0x0B, 0x9B, 0x6D, 0xF3, 0x81, 0xD6, 0xDF
+
+[sha256_hmac_buff_128]
+digest =
+0x44, 0xA6, 0x70, 0x6C, 0xD2, 0xA6, 0x3F, 0xFB, 0x98, 0xB9, 0x6A, 0x71, 0x40, 0xCF, 0xD2, 0x40,
+0xA3, 0xC0, 0xC6, 0x4E, 0xF6, 0xD8, 0x4D, 0x87, 0xF5, 0x9B, 0xAC, 0xB0, 0x7B, 0xB7, 0x35, 0x5B
+
+[sha384_hmac_buff_128]
+digest =
+0xD7, 0xFA, 0xF1, 0xC5, 0xD6, 0xCE, 0xB9, 0x77, 0xD5, 0x6B, 0x4D, 0x7F, 0xFE, 0xAF, 0xDF, 0xCE,
+0x68, 0x1A, 0xB7, 0x3E, 0xA5, 0x9A, 0xF5, 0x79, 0x91, 0x96, 0x7C, 0xED, 0xC9, 0x02, 0x31, 0x67,
+0xC4, 0xD9, 0xD7, 0x5A, 0xD7, 0xF0, 0x82, 0x2C, 0xBD, 0x4A, 0xFF, 0x03, 0x25, 0xB6, 0x50, 0x17
+
+[sha512_hmac_buff_128]
+digest =
+0x78, 0xE1, 0x86, 0x74, 0xC1, 0x83, 0xDB, 0x3C, 0xAC, 0x2B, 0x17, 0xAC, 0x12, 0xAA, 0x30, 0xDE,
+0x2C, 0x86, 0xC4, 0x53, 0x4A, 0xC2, 0x78, 0x86, 0x3A, 0x8A, 0x96, 0x36, 0x2B, 0x09, 0xB1, 0x62,
+0xCA, 0xD0, 0x25, 0xB2, 0x5B, 0x3A, 0x76, 0xFA, 0xED, 0x5B, 0xFB, 0xF0, 0x8F, 0xF2, 0x06, 0x76,
+0x9B, 0xE0, 0x82, 0x25, 0x10, 0x5E, 0x8A, 0x13, 0xA1, 0x25, 0x3B, 0xB7, 0xFC, 0xC3, 0x15, 0xED
+
+#####################
+# sha_hmac_buff_256 #
+#####################
+[sha1_hmac_buff_256]
+digest =
+0x31, 0x36, 0xC8, 0xC7, 0x95, 0xDB, 0xF7, 0xF3, 0xA0, 0xFF, 0x89, 0x94, 0x8D, 0xB2, 0x3D, 0x5F,
+0x7A, 0xC1, 0x38, 0x97
+
+[sha224_hmac_buff_256]
+digest =
+0xAE, 0x1B, 0xA4, 0x42, 0xE6, 0x3C, 0x3D, 0xEE, 0xEE, 0xD1, 0x24, 0xD2, 0xFF, 0xD2, 0x1A, 0xF3,
+0x28, 0x87, 0x8F, 0x00, 0xE3, 0x74, 0xA1, 0xA2, 0xED, 0x70, 0x2D, 0x9D
+
+[sha256_hmac_buff_256]
+digest =
+0x73, 0x89, 0x54, 0x06, 0x65, 0x71, 0x1D, 0xA1, 0xAB, 0x4A, 0x0A, 0x36, 0x63, 0x92, 0xB8, 0x94,
+0x98, 0x98, 0xB5, 0x27, 0x9D, 0x9C, 0xF2, 0x91, 0x0C, 0x56, 0xC4, 0xEE, 0x99, 0xC6, 0xDE, 0xC7
+
+[sha384_hmac_buff_256]
+digest =
+0xFE, 0x6E, 0xA5, 0xDC, 0x82, 0x57, 0xBB, 0x4D, 0xA8, 0xF1, 0x2F, 0xD1, 0xA2, 0x05, 0x0A, 0xFE,
+0xF2, 0x64, 0x8A, 0xB3, 0x96, 0xBA, 0x06, 0x47, 0xA4, 0x40, 0x76, 0x8E, 0xB8, 0xE3, 0xAD, 0xD1,
+0xB2, 0x90, 0x9A, 0x02, 0xD1, 0x13, 0x4F, 0x74, 0x9B, 0xEB, 0x09, 0xFC, 0x7F, 0x99, 0xAC, 0xCD
+
+[sha512_hmac_buff_256]
+digest =
+0x9F, 0x71, 0xE0, 0x86, 0xF9, 0x76, 0x3F, 0xAB, 0x16, 0x4D, 0x9C, 0x28, 0x72, 0x3A, 0x17, 0x8F,
+0x35, 0xD1, 0x44, 0x18, 0xE0, 0x4A, 0xBD, 0x8B, 0x25, 0x9F, 0x6E, 0x5B, 0xE3, 0xF4, 0x1C, 0x40,
+0x2B, 0xF4, 0x61, 0x59, 0x60, 0x8D, 0x55, 0xD8, 0x18, 0x9B, 0x65, 0x8D, 0x9F, 0xAA, 0xB3, 0x71,
+0x3D, 0xB5, 0x70, 0xD2, 0x26, 0xF1, 0x55, 0xDC, 0xCE, 0x49, 0x40, 0xD7, 0x23, 0x6B, 0x20, 0x4A
+
+#####################
+# sha_hmac_buff_512 #
+#####################
+[sha1_hmac_buff_512]
+digest =
+0x0F, 0xF6, 0x33, 0x61, 0x16, 0x5C, 0xD1, 0x9E, 0xE0, 0x3D, 0x95, 0x93, 0xD2, 0x82, 0xDE, 0x2E,
+0xFA, 0x25, 0x56, 0xE4
+
+[sha224_hmac_buff_512]
+digest =
+0x85, 0x61, 0x57, 0x9F, 0x3E, 0x6A, 0xE1, 0x5C, 0x1D, 0xA3, 0x98, 0x9C, 0x28, 0x2C, 0x96, 0x8E,
+0xD0, 0x7D, 0x70, 0x7D, 0xF5, 0x98, 0xA4, 0x7C, 0x88, 0x1C, 0xA4, 0x5C
+
+[sha256_hmac_buff_512]
+digest =
+0xF4, 0x77, 0xB2, 0x2E, 0xAD, 0xBC, 0xA2, 0xCD, 0x49, 0xE0, 0xD2, 0xB0, 0xB3, 0xDE, 0x51, 0xD0,
+0xBC, 0xEF, 0x33, 0x50, 0x4F, 0x39, 0xBC, 0x94, 0x18, 0xF3, 0xDD, 0xFC, 0xB5, 0x8E, 0x44, 0x18
+
+[sha384_hmac_buff_512]
+digest =
+0x03, 0x4F, 0x86, 0xA0, 0xBC, 0x00, 0x44, 0xEB, 0x06, 0x75, 0x61, 0x13, 0x92, 0x60, 0x74, 0x44,
+0x1D, 0xCB, 0x2C, 0x8D, 0xEC, 0xE5, 0x5C, 0xBE, 0xA3, 0xAE, 0x5F, 0xE2, 0x71, 0xED, 0xAC, 0x69,
+0x9C, 0x6C, 0xE3, 0x20, 0x5C, 0x90, 0xC3, 0xF4, 0x36, 0x76, 0x70, 0xAE, 0x2A, 0x9C, 0xF5, 0x0B
+
+[sha512_hmac_buff_512]
+digest =
+0x3B, 0x83, 0x4B, 0x7F, 0x2A, 0x62, 0x9A, 0xF6, 0x42, 0x29, 0x7A, 0xF0, 0xCA, 0xE7, 0xBE, 0x1F,
+0x92, 0x5C, 0x66, 0x88, 0x58, 0xFA, 0xA4, 0xC7, 0xE7, 0xF0, 0xEA, 0x83, 0xB2, 0x0A, 0x2C, 0x3B,
+0xA7, 0xD4, 0xA4, 0x3E, 0x87, 0x00, 0x44, 0x2B, 0x3F, 0xB2, 0x4B, 0xFF, 0xAD, 0x9B, 0x07, 0x7D,
+0xA1, 0x09, 0x09, 0x60, 0x68, 0x2F, 0x7B, 0x16, 0x43, 0x0E, 0x22, 0xAF, 0x78, 0x8D, 0xC7, 0x16
+
+######################
+# sha_hmac_buff_1024 #
+######################
+[sha1_hmac_buff_1024]
+digest =
+0xCD, 0x04, 0x78, 0x4A, 0xD5, 0xFE, 0x95, 0xFB, 0x04, 0x85, 0xD5, 0x25, 0x58, 0xE6, 0x6C, 0x81,
+0xFA, 0x4B, 0xE7, 0x75
+
+[sha224_hmac_buff_1024]
+digest =
+0x10, 0xA5, 0x18, 0x56, 0x66, 0xDE, 0xE6, 0xF6, 0x71, 0xAF, 0x65, 0xEC, 0xE3, 0x77, 0x08, 0x58,
+0xD5, 0x45, 0xE6, 0x21, 0xF5, 0xCC, 0x2B, 0xE2, 0x76, 0x91, 0x51, 0xD9
+
+[sha256_hmac_buff_1024]
+digest =
+0xB4, 0x09, 0xF9, 0xA0, 0x5B, 0x80, 0xFF, 0xBA, 0x21, 0x5F, 0x57, 0xAB, 0x8B, 0x67, 0x89, 0x6D,
+0xB4, 0xE9, 0xEA, 0x5D, 0x77, 0x57, 0xBD, 0x0A, 0x60, 0xA4, 0x6B, 0xE8, 0xAA, 0x8A, 0x9B, 0xC7
+
+[sha384_hmac_buff_1024]
+digest =
+0x9D, 0xAE, 0x37, 0x87, 0x2C, 0x36, 0xFD, 0x51, 0xF1, 0xF2, 0x4C, 0x82, 0x27, 0xB5, 0x99, 0x63,
+0xAB, 0xD7, 0x62, 0x4A, 0x4E, 0xF1, 0xBF, 0xFB, 0xCA, 0x30, 0x55, 0x3F, 0x43, 0x85, 0xDE, 0x6B,
+0xA2, 0xB2, 0x8B, 0x45, 0x2A, 0x9D, 0x39, 0x29, 0x63, 0x1C, 0x04, 0x47, 0x58, 0x94, 0x5C, 0x91
+
+[sha512_hmac_buff_1024]
+digest =
+0xBF, 0x06, 0x94, 0xBB, 0x2E, 0x9C, 0x0A, 0xA4, 0xF3, 0x5F, 0x52, 0x4B, 0x42, 0x6E, 0xE1, 0x6C,
+0xA8, 0xAB, 0xB7, 0xE9, 0x6F, 0xAB, 0x77, 0xF8, 0x94, 0xD0, 0xA1, 0x81, 0xB8, 0x17, 0x21, 0xAC,
+0xB2, 0x3C, 0x73, 0x71, 0xDD, 0x76, 0xF8, 0x58, 0x84, 0xE7, 0xBB, 0xD4, 0x4A, 0x4F, 0x51, 0xF5,
+0x8C, 0x87, 0xAA, 0xAC, 0xCE, 0x5E, 0xFB, 0xD3, 0x1F, 0xA2, 0x49, 0xF2, 0x40, 0xAB, 0xB8, 0x76
+
+######################
+# sha_hmac_buff_2048 #
+######################
+[sha1_hmac_buff_2048]
+digest =
+0x56, 0xE7, 0x86, 0x23, 0x2C, 0x77, 0xBE, 0x2B, 0xE6, 0x76, 0xA1, 0xE9, 0xB1, 0x0F, 0x25, 0x15,
+0x1D, 0x59, 0x7F, 0x4A
+
+[sha224_hmac_buff_2048]
+digest =
+0xFD, 0xEB, 0x9E, 0x04, 0x53, 0xC7, 0xEA, 0x56, 0x21, 0x91, 0x6D, 0x8B, 0xDC, 0xA1, 0x0A, 0x2F,
+0x73, 0x4D, 0x05, 0x36, 0x43, 0x58, 0x71, 0xB2, 0x74, 0x6E, 0x7B, 0xAF
+
+[sha256_hmac_buff_2048]
+digest =
+0x25, 0x76, 0xA5, 0x64, 0x00, 0x13, 0xF7, 0xE7, 0x2D, 0x6D, 0x17, 0x36, 0x13, 0xF3, 0xC7, 0x57,
+0x70, 0x30, 0xB2, 0x76, 0x7A, 0xF4, 0x8F, 0xAF, 0x6B, 0x8C, 0x26, 0x88, 0x73, 0x2E, 0x49, 0xC0
+
+[sha384_hmac_buff_2048]
+digest =
+0xF0, 0x69, 0x78, 0x9A, 0x34, 0x88, 0x25, 0x3C, 0x3D, 0xF5, 0x42, 0x65, 0x25, 0x79, 0xB2, 0xFC,
+0x3B, 0x92, 0x46, 0xF9, 0x0D, 0x6D, 0xC1, 0x8E, 0x45, 0xBE, 0x8B, 0x70, 0x7D, 0x1B, 0x7E, 0xDE,
+0x93, 0x04, 0xC8, 0x59, 0x4B, 0x37, 0x2C, 0x20, 0x51, 0xB1, 0x91, 0x4F, 0xA4, 0x30, 0x09, 0xED
+
+[sha512_hmac_buff_2048]
+digest =
+0xAE, 0x8A, 0x42, 0x03, 0x11, 0x25, 0xE8, 0xC3, 0x4B, 0x4B, 0xC0, 0x29, 0x27, 0xE0, 0x0D, 0x27,
+0x13, 0x8F, 0x7D, 0x82, 0x72, 0x94, 0x4B, 0xF8, 0xC3, 0x1A, 0xE1, 0x5A, 0xF3, 0x8E, 0x23, 0x27,
+0x76, 0xE4, 0xF5, 0x3E, 0x24, 0x5B, 0xA3, 0xFA, 0x49, 0x8E, 0x57, 0xE3, 0x88, 0x15, 0x1D, 0xF6,
+0x27, 0xA5, 0xC8, 0xFB, 0x34, 0x44, 0x18, 0x6A, 0x64, 0xBE, 0xFB, 0x1E, 0x87, 0xA8, 0x36, 0x1E
diff --git a/app/crypto-perf/data/aes_cbc_256_sha.data b/app/crypto-perf/data/aes_cbc_256_sha.data
new file mode 100644
index 0000000..e46a21e
--- /dev/null
+++ b/app/crypto-perf/data/aes_cbc_256_sha.data
@@ -0,0 +1,504 @@
+# List of tests for AES-256 CBC:
+# 1) [sha1_hmac_buff_x]
+# 2) [sha224_hmac_buff_x]
+# 3) [sha256_hmac_buff_x]
+# 4) [sha384_hmac_buff_x]
+# 5) [sha512_hmac_buff_x]
+# where x is one of the values: 32, 64, 128, 256, 512, 1024, 2048
+
+##########
+# GLOBAL #
+##########
+plaintext =
+0xff, 0xca, 0xfb, 0xf1, 0x38, 0x20, 0x2f, 0x7b, 0x24, 0x98, 0x26, 0x7d, 0x1d, 0x9f, 0xb3, 0x93,
+0xd9, 0xef, 0xbd, 0xad, 0x4e, 0x40, 0xbd, 0x60, 0xe9, 0x48, 0x59, 0x90, 0x67, 0xd7, 0x2b, 0x7b,
+0x8a, 0xe0, 0x4d, 0xb0, 0x70, 0x38, 0xcc, 0x48, 0x61, 0x7d, 0xee, 0xd6, 0x35, 0x49, 0xae, 0xb4,
+0xaf, 0x6b, 0xdd, 0xe6, 0x21, 0xc0, 0x60, 0xce, 0x0a, 0xf4, 0x1c, 0x2e, 0x1c, 0x8d, 0xe8, 0x7b,
+0x59, 0xda, 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, 0xee, 0xbc, 0xc5, 0x94, 0x4b, 0xc3, 0x15, 0xa1,
+0x7e, 0x07, 0x07, 0x2b, 0xb7, 0x43, 0x2a, 0xb4, 0xb8, 0x25, 0x88, 0x86, 0x23, 0xab, 0xdf, 0x05,
+0xbe, 0x46, 0x56, 0xd7, 0xda, 0xd6, 0x75, 0x53, 0xd9, 0xc8, 0x26, 0x8f, 0x39, 0x67, 0xed, 0x21,
+0x53, 0x1c, 0x9c, 0x89, 0x46, 0xd3, 0xfe, 0x54, 0xe6, 0x1d, 0x02, 0xb9, 0x25, 0x82, 0x66, 0xe6,
+0xf9, 0x45, 0xd9, 0x3f, 0xa5, 0x71, 0xc1, 0x46, 0x66, 0x7a, 0x27, 0x8a, 0x82, 0xc9, 0x21, 0xe9,
+0x17, 0xab, 0x6c, 0xef, 0x45, 0xe5, 0x88, 0x93, 0x87, 0x80, 0xb3, 0x85, 0x25, 0x96, 0x19, 0x41,
+0xab, 0xd6, 0xba, 0x92, 0x76, 0x21, 0x8a, 0x58, 0xbd, 0xe2, 0x4b, 0xec, 0x45, 0x59, 0x2c, 0x13,
+0x1a, 0xb5, 0x13, 0x25, 0x44, 0xe7, 0x71, 0x26, 0x0a, 0x34, 0x33, 0xb9, 0x57, 0x15, 0xa4, 0x90,
+0x60, 0x11, 0x05, 0x8e, 0xc8, 0x8e, 0x74, 0x52, 0x4b, 0x31, 0x71, 0xeb, 0x66, 0x7e, 0xee, 0xb1,
+0x0a, 0x21, 0x52, 0xc0, 0x1a, 0xe9, 0xa1, 0x5a, 0xe3, 0x3a, 0x24, 0xfb, 0xf3, 0x1e, 0xd6, 0x83,
+0x1d, 0xfb, 0x81, 0xa8, 0x91, 0x60, 0x9e, 0xbc, 0x59, 0x20, 0xc9, 0x9e, 0x71, 0x19, 0x83, 0x2b,
+0x6a, 0x48, 0x4e, 0x6b, 0x46, 0x82, 0x89, 0xda, 0x60, 0xff, 0x1a, 0x46, 0x94, 0x55, 0xda, 0xe5,
+0x99, 0xf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x80, 0x73,
+0xf8, 0xd1, 0x9a, 0x5e, 0x4b, 0xfb, 0x52, 0x6b, 0x50, 0xaf, 0x8b, 0xb7, 0xb5, 0x2c, 0x52, 0x84
+
+iv =
+0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F
+
+####################
+# sha_hmac_buff_32 #
+####################
+[sha1_hmac_buff_32]
+digest =
+0x36, 0xCA, 0x49, 0x6A, 0xE3, 0x54, 0xD8, 0x4F, 0x0B, 0x76, 0xD8, 0xAA, 0x78, 0xEB, 0x9D, 0x65,
+0x2C, 0xCA, 0x1F, 0x97
+
+[sha224_hmac_buff_32]
+digest =
+0x48, 0xC1, 0x45, 0x25, 0x29, 0xA0, 0x8B, 0x88, 0x72, 0x7A, 0xBC, 0x00, 0x94, 0x37, 0xE1, 0x22,
+0xEB, 0xFA, 0x1B, 0x7D, 0x89, 0x81, 0x31, 0xC8, 0x64, 0x76, 0x55, 0xA4
+
+[sha256_hmac_buff_32]
+digest =
+0x1C, 0xB2, 0x3D, 0xD1, 0xF9, 0xC7, 0x6C, 0x49, 0x2E, 0xDA, 0x94, 0x8B, 0xF1, 0xCF, 0x96, 0x43,
+0x67, 0x50, 0x39, 0x76, 0xB5, 0xA1, 0xCE, 0xA1, 0xD7, 0x77, 0x10, 0x07, 0x43, 0x37, 0x05, 0xB4
+
+[sha384_hmac_buff_32]
+digest =
+0x6C, 0xBD, 0x1E, 0x2E, 0x75, 0xA7, 0x2C, 0x98, 0xC4, 0x1E, 0x03, 0x4E, 0x39, 0x4B, 0x27, 0x41,
+0xFB, 0xC6, 0x56, 0x87, 0x84, 0xEB, 0xFA, 0xB1, 0x20, 0x1F, 0x11, 0x81, 0x8D, 0xDC, 0xB6, 0xA7,
+0xAD, 0x1F, 0xAC, 0xA9, 0x43, 0x1D, 0x2B, 0xEB, 0x5F, 0x27, 0xC6, 0x0F, 0x9E, 0xFB, 0x1E, 0xB1
+
+[sha512_hmac_buff_32]
+digest =
+0xA4, 0x60, 0x7E, 0xBE, 0x5F, 0x47, 0x58, 0x3B, 0x41, 0x5F, 0x29, 0xDF, 0xE4, 0xD2, 0xFB, 0x30,
+0xF0, 0x2B, 0x09, 0x4E, 0x09, 0x50, 0xEC, 0x1C, 0x0E, 0x34, 0x79, 0xAE, 0xD8, 0x6D, 0xAC, 0xB6,
+0x9B, 0x7C, 0xB9, 0x06, 0xC2, 0x4A, 0x4E, 0x22, 0x14, 0x4D, 0x42, 0x46, 0x20, 0xE0, 0x6C, 0xEE,
+0x2F, 0xE1, 0x23, 0xA2, 0x7A, 0x2F, 0xDB, 0xAF, 0x78, 0x75, 0x56, 0xF7, 0x3A, 0x5E, 0x74, 0xEF
+
+####################
+# sha_hmac_buff_64 #
+####################
+[sha1_hmac_buff_64]
+digest =
+0xFC, 0x17, 0x7E, 0x0E, 0x52, 0x94, 0xE3, 0x27, 0xC0, 0x9B, 0x72, 0xAD, 0xC0, 0x5B, 0xCF, 0xFF,
+0x65, 0x88, 0x43, 0xE7
+
+[sha224_hmac_buff_64]
+digest =
+0xD7, 0x55, 0x25, 0xC0, 0x26, 0xDD, 0x8E, 0x14, 0x17, 0x8B, 0x89, 0x59, 0x8A, 0xBB, 0xEA, 0xD6,
+0x7D, 0x85, 0x00, 0x9F, 0xC2, 0x8A, 0xCB, 0x01, 0x7F, 0x8C, 0x6E, 0x24
+
+[sha256_hmac_buff_64]
+digest =
+0x8F, 0x4B, 0x3B, 0x4C, 0x58, 0x25, 0x3B, 0x07, 0xEB, 0xF8, 0x20, 0x81, 0xD9, 0xD9, 0x92, 0x8F,
+0xF4, 0x32, 0x7C, 0x2A, 0xD9, 0xEC, 0x92, 0x60, 0x8F, 0xE3, 0x90, 0x7F, 0xC5, 0x75, 0x05, 0xB6
+
+[sha384_hmac_buff_64]
+digest =
+0xD1, 0xC7, 0x64, 0x27, 0xF0, 0x30, 0x43, 0x8E, 0xD6, 0xA6, 0x78, 0xF7, 0xE9, 0xCC, 0x8E, 0x69,
+0x6D, 0xB8, 0x3E, 0xFA, 0xA0, 0x81, 0x9C, 0x61, 0x78, 0x72, 0xF0, 0x1C, 0x29, 0x35, 0x51, 0x3E,
+0x4A, 0x95, 0xDE, 0x2C, 0x6A, 0x3F, 0x56, 0xA8, 0x12, 0xBA, 0x44, 0x39, 0x1E, 0xDB, 0xF7, 0xF5
+
+[sha512_hmac_buff_64]
+digest =
+0xE6, 0xE9, 0xD8, 0x1D, 0x90, 0xAE, 0x32, 0x0E, 0xBA, 0x55, 0x58, 0xD5, 0x55, 0x97, 0x40, 0xB3,
+0xE9, 0x12, 0xD3, 0x08, 0xEF, 0x21, 0xED, 0xA5, 0x94, 0x8D, 0xF2, 0x4C, 0x52, 0x2C, 0x50, 0xB2,
+0xD2, 0xEC, 0xB7, 0xE1, 0x95, 0x2D, 0x68, 0xDB, 0xAD, 0xB5, 0x94, 0x50, 0x67, 0xF3, 0x0A, 0x83,
+0x54, 0x03, 0x33, 0x1C, 0xD5, 0x42, 0x7D, 0xB4, 0x3E, 0x69, 0x7C, 0x36, 0x7E, 0x96, 0x0D, 0x3E
+
+#####################
+# sha_hmac_buff_128 #
+#####################
+[sha1_hmac_buff_128]
+digest =
+0xAA, 0x90, 0x55, 0xA5, 0x71, 0xC4, 0x2B, 0xA3, 0x02, 0xAA, 0xB1, 0x1C, 0xB3, 0x88, 0x38, 0x6E,
+0xAD, 0x26, 0x98, 0xA7
+
+[sha224_hmac_buff_128]
+digest =
+0xBE, 0xCC, 0x83, 0x48, 0x4C, 0x58, 0xF9, 0x86, 0xFA, 0x93, 0x5F, 0xD1, 0x3C, 0x11, 0x8A, 0x37,
+0xA6, 0xEE, 0x52, 0x4D, 0xA3, 0x98, 0x3E, 0x35, 0xF1, 0x4F, 0xD9, 0xDB
+
+[sha256_hmac_buff_128]
+digest =
+0xE2, 0x9C, 0xE1, 0xDF, 0xCD, 0xAE, 0x50, 0x4B, 0x9A, 0xA6, 0x41, 0xAC, 0x0C, 0xF1, 0x66, 0xED,
+0xA1, 0x22, 0x05, 0x72, 0x49, 0x97, 0xA1, 0x30, 0xB8, 0xF9, 0xED, 0x36, 0x0A, 0x19, 0xE4, 0x2A
+
+[sha384_hmac_buff_128]
+digest =
+0xD9, 0x3C, 0xEB, 0xF4, 0x20, 0xC6, 0x4F, 0xC7, 0xBD, 0x34, 0xBA, 0xFD, 0x7C, 0xA9, 0xCE, 0xFF,
+0x26, 0x2E, 0xB4, 0x4A, 0xB7, 0x47, 0x71, 0x2C, 0x9E, 0xCF, 0x44, 0x0B, 0xD9, 0xAF, 0x8D, 0x17,
+0x0A, 0x3A, 0x02, 0xD0, 0xE9, 0xDF, 0xCF, 0x52, 0x5F, 0xDA, 0xA7, 0xB6, 0x51, 0x7C, 0x59, 0x09
+
+[sha512_hmac_buff_128]
+digest =
+0xAD, 0x7E, 0xB7, 0x33, 0xFB, 0x8A, 0x17, 0xD0, 0x3C, 0xB0, 0x80, 0x19, 0xF3, 0x9A, 0x6F, 0x90,
+0xDE, 0xF3, 0x53, 0xEA, 0x48, 0x75, 0x0A, 0x1E, 0x49, 0x02, 0xA0, 0x94, 0xC4, 0xE8, 0xFB, 0x87,
+0x83, 0x80, 0xD3, 0xFF, 0x6B, 0x79, 0x73, 0x54, 0xF9, 0x2F, 0x2D, 0x59, 0x69, 0x0E, 0x50, 0x29,
+0x2A, 0xDA, 0x59, 0x38, 0xDD, 0x62, 0xF9, 0x1A, 0x18, 0xA9, 0x51, 0x5A, 0xFE, 0x8E, 0xFD, 0xBF
+
+#####################
+# sha_hmac_buff_256 #
+#####################
+[sha1_hmac_buff_256]
+digest =
+0xB1, 0x18, 0x31, 0xBF, 0xEE, 0x81, 0x7E, 0xFC, 0x68, 0xDA, 0xB6, 0x8A, 0x5D, 0xDE, 0x39, 0x65,
+0xC8, 0xF8, 0xC3, 0xE5
+
+[sha224_hmac_buff_256]
+digest =
+0xCD, 0xF6, 0xC2, 0x6D, 0xFD, 0x33, 0x1A, 0xD8, 0x2F, 0x07, 0x4F, 0x1A, 0xE8, 0x18, 0xBD, 0x04,
+0xB1, 0xE5, 0x8D, 0xC1, 0x21, 0x95, 0x87, 0x75, 0xC2, 0x27, 0x4B, 0xF2
+
+[sha256_hmac_buff_256]
+digest =
+0xC0, 0xFA, 0x8F, 0x6F, 0x55, 0xFC, 0xF3, 0xDF, 0x8E, 0x5D, 0x93, 0x5E, 0x6B, 0x20, 0x0A, 0x9A,
+0x84, 0x3D, 0xCD, 0x4B, 0x57, 0x63, 0x2D, 0x93, 0x51, 0x45, 0xF2, 0x1E, 0xC7, 0xA4, 0xD4, 0x69
+
+[sha384_hmac_buff_256]
+digest =
+0x2B, 0x92, 0x9E, 0x85, 0x5A, 0x89, 0xB5, 0x12, 0x4A, 0x9B, 0x2D, 0xD2, 0xB2, 0x3E, 0xAB, 0xC1,
+0x1E, 0x7F, 0x53, 0xD9, 0x88, 0xEB, 0xEE, 0xA2, 0x49, 0x14, 0xDE, 0x1A, 0x9E, 0x20, 0xCE, 0xEC,
+0x7A, 0x5D, 0x25, 0xD8, 0x8F, 0xFE, 0x8B, 0xB1, 0xB1, 0x04, 0x5F, 0x46, 0x2D, 0x34, 0x2D, 0x72
+
+[sha512_hmac_buff_256]
+digest =
+0x4F, 0x96, 0x89, 0x9E, 0x9D, 0x53, 0xAC, 0x05, 0xC7, 0xA0, 0x0F, 0x4D, 0xB6, 0x3E, 0x06, 0x03,
+0x19, 0x68, 0x41, 0x4F, 0x11, 0x57, 0x77, 0x21, 0xBD, 0x60, 0x3E, 0xB4, 0xFE, 0x6A, 0x0D, 0xBF,
+0xE0, 0x4F, 0x32, 0x5B, 0xF9, 0xDF, 0x13, 0xBD, 0x02, 0x73, 0xD4, 0x0C, 0xE9, 0x9D, 0xB7, 0xD5,
+0x38, 0xA0, 0x20, 0xD9, 0xD1, 0x66, 0x17, 0x19, 0x54, 0x36, 0x18, 0xE1, 0xF5, 0x34, 0x12, 0x9E
+
+#####################
+# sha_hmac_buff_512 #
+#####################
+[sha1_hmac_buff_512]
+digest =
+0x78, 0x14, 0x01, 0xED, 0x93, 0x6F, 0x22, 0xB6, 0x96, 0x5A, 0x32, 0x05, 0xA9, 0xD3, 0x49, 0x04,
+0x55, 0xB0, 0x00, 0x06
+
+[sha224_hmac_buff_512]
+digest =
+0x25, 0xD4, 0x8F, 0x92, 0xE1, 0xD0, 0x4E, 0x3F, 0x34, 0x38, 0x01, 0xB8, 0xFE, 0x57, 0x3D, 0x34,
+0x39, 0x98, 0x82, 0x8D, 0x68, 0x04, 0x5A, 0x74, 0x28, 0x4F, 0x18, 0xCE
+
+[sha256_hmac_buff_512]
+digest =
+0x90, 0x06, 0x97, 0x8A, 0x7A, 0xEF, 0x62, 0x14, 0x4C, 0x14, 0xAA, 0x25, 0x4C, 0xE3, 0x5D, 0xE4,
+0xAD, 0x6C, 0xD6, 0x82, 0x2B, 0x87, 0x53, 0x3E, 0xE9, 0xE4, 0x97, 0x82, 0x82, 0x76, 0xE7, 0xF1
+
+[sha384_hmac_buff_512]
+digest =
+0xD5, 0xDA, 0x7C, 0x8A, 0x0D, 0x1B, 0xBE, 0x3E, 0x25, 0x1E, 0x6C, 0xA4, 0x50, 0x32, 0x92, 0x13,
+0x91, 0x4F, 0xA2, 0x29, 0x2A, 0x0A, 0x57, 0x62, 0x3D, 0x93, 0xF2, 0x45, 0x96, 0x22, 0xF8, 0x0D,
+0xA9, 0xE9, 0xAB, 0xAC, 0x7B, 0x2E, 0x42, 0xC2, 0x3E, 0x75, 0x23, 0xD0, 0xD2, 0xAA, 0x1E, 0xEE
+
+[sha512_hmac_buff_512]
+digest =
+0x57, 0x34, 0x65, 0x3D, 0xDE, 0x8B, 0x7B, 0x99, 0x62, 0x24, 0xF3, 0xAF, 0xA6, 0xB1, 0xF0, 0x01,
+0x23, 0xD4, 0x94, 0xC2, 0x06, 0x70, 0xA5, 0x8C, 0x80, 0x93, 0x49, 0x88, 0xB4, 0xB6, 0x45, 0xE5,
+0x37, 0xC9, 0xE4, 0xA1, 0xAB, 0x6C, 0xA5, 0x23, 0xD2, 0x07, 0x9B, 0x10, 0x4D, 0xFD, 0x75, 0xC0,
+0x28, 0xA1, 0x8A, 0x84, 0x03, 0x35, 0x22, 0xCC, 0xAC, 0x6C, 0x97, 0x93, 0x57, 0x08, 0x48, 0x51
+
+######################
+# sha_hmac_buff_1024 #
+######################
+[sha1_hmac_buff_1024]
+digest =
+0x74, 0xF7, 0x91, 0x04, 0x06, 0xDB, 0xA9, 0xF0, 0x08, 0x0E, 0x93, 0xCE, 0x55, 0xA8, 0x54, 0xF0,
+0x4B, 0x5E, 0x3F, 0xC7
+
+[sha224_hmac_buff_1024]
+digest =
+0x45, 0xDA, 0x2E, 0x83, 0xBD, 0x35, 0xA4, 0x58, 0x14, 0x74, 0xCB, 0xA4, 0x48, 0xA6, 0xBA, 0xDC,
+0x7D, 0x56, 0x6A, 0x44, 0xA7, 0xE9, 0x2F, 0x75, 0x20, 0x47, 0x2A, 0x5A
+
+[sha256_hmac_buff_1024]
+digest =
+0xA2, 0x81, 0xFE, 0x1A, 0x5C, 0x4F, 0x02, 0x72, 0xEF, 0x4F, 0xC6, 0xEE, 0x54, 0x71, 0x69, 0xAF,
+0x5C, 0x71, 0x9F, 0xB0, 0xAC, 0x5B, 0x7F, 0x51, 0xD6, 0x0D, 0x64, 0xD2, 0x2E, 0x0E, 0x30, 0x55
+
+[sha384_hmac_buff_1024]
+digest =
+0x26, 0x44, 0x13, 0x01, 0x25, 0x6E, 0xC7, 0xC3, 0x88, 0x25, 0xD5, 0xDD, 0x1D, 0xCA, 0x0C, 0xB1,
+0xB8, 0x82, 0xB2, 0xB8, 0x15, 0x3F, 0xE5, 0x54, 0x43, 0x47, 0x32, 0x3B, 0xB2, 0xE0, 0xC8, 0x58,
+0x64, 0xE7, 0x78, 0xC9, 0x1F, 0x81, 0x7B, 0xBD, 0x0D, 0x6D, 0x37, 0x9C, 0x01, 0x20, 0x6A, 0x8E
+
+[sha512_hmac_buff_1024]
+digest =
+0xBE, 0xDA, 0x0D, 0x3B, 0x47, 0x24, 0xBA, 0x45, 0xBA, 0xCA, 0x84, 0x5F, 0xEA, 0xAC, 0x33, 0x84,
+0x00, 0x62, 0xA5, 0x29, 0xB6, 0x2F, 0xB7, 0x86, 0xD0, 0x94, 0xFF, 0xFF, 0xE4, 0x1E, 0x5C, 0xFD,
+0xC8, 0xD5, 0x3A, 0xD4, 0xFC, 0xA6, 0x1C, 0x66, 0x4A, 0x6D, 0xF9, 0x2B, 0x1D, 0x7F, 0xA0, 0xCF,
+0x3D, 0x0F, 0x1F, 0x5B, 0xDD, 0x21, 0x12, 0xA8, 0x76, 0xB0, 0xD7, 0x30, 0x66, 0xA6, 0xA0, 0x6C
+
+######################
+# sha_hmac_buff_2048 #
+######################
+[sha1_hmac_buff_2048]
+digest =
+0x99, 0x32, 0xCD, 0xC3, 0xC9, 0x7F, 0x98, 0x1A, 0x96, 0xF6, 0x52, 0xC8, 0xA2, 0x16, 0x9C, 0x29,
+0x9D, 0x6E, 0x96, 0xF5
+
+[sha224_hmac_buff_2048]
+digest =
+0x1A, 0xC4, 0xDC, 0x46, 0xE5, 0x87, 0xFE, 0xE0, 0x47, 0x64, 0x53, 0xA3, 0x6A, 0x1F, 0x78, 0xC0,
+0xC0, 0x02, 0x03, 0x64, 0xB1, 0x55, 0x50, 0x66, 0xDA, 0xD6, 0x9E, 0xBC
+
+[sha256_hmac_buff_2048]
+digest =
+0xA6, 0xC6, 0x4B, 0x0C, 0x95, 0xDE, 0xD5, 0xE2, 0x40, 0x7D, 0x44, 0xC5, 0xBF, 0x00, 0x5A, 0xFB,
+0x6F, 0x3F, 0x5E, 0x69, 0xB1, 0x32, 0x91, 0xAB, 0x6C, 0x90, 0x25, 0xAB, 0xD9, 0x1B, 0x8F, 0x80
+
+[sha384_hmac_buff_2048]
+digest =
+0x16, 0xF1, 0x1B, 0xC1, 0x22, 0xDB, 0x21, 0x90, 0x08, 0xE3, 0x42, 0x0C, 0x9A, 0xF1, 0x0F, 0xF8,
+0x7A, 0xE9, 0x50, 0x09, 0xC6, 0x0C, 0x71, 0x65, 0x3A, 0x40, 0xB3, 0x78, 0x11, 0xE8, 0xD2, 0xD4,
+0xB0, 0x6C, 0xA9, 0x6A, 0x0C, 0xCD, 0xE1, 0x70, 0x7E, 0x90, 0x86, 0x34, 0xC1, 0x08, 0x9E, 0xFC
+
+[sha512_hmac_buff_2048]
+digest =
+0xDF, 0x7F, 0xC3, 0x26, 0x3E, 0x55, 0x80, 0x7D, 0x02, 0x06, 0x5A, 0x4B, 0x8C, 0xFD, 0x2F, 0x33,
+0xF8, 0x0E, 0x9C, 0x59, 0xAE, 0x56, 0xAE, 0x86, 0xA9, 0x25, 0x3F, 0xB7, 0xF7, 0x4C, 0x7A, 0xB4,
+0xD8, 0x0E, 0x43, 0xC0, 0x86, 0xDF, 0xDB, 0xBA, 0xA8, 0xCB, 0x46, 0x2A, 0x92, 0x34, 0xF5, 0x3B,
+0xBD, 0x59, 0x64, 0xDF, 0x30, 0x20, 0xF5, 0x13, 0xD7, 0x78, 0xB9, 0x27, 0xE6, 0xB6, 0x56, 0x19
\ No newline at end of file
diff --git a/app/crypto-perf/main.c b/app/crypto-perf/main.c
new file mode 100644
index 0000000..4d75485
--- /dev/null
+++ b/app/crypto-perf/main.c
@@ -0,0 +1,411 @@
+#include <stdio.h>
+#include <unistd.h>
+
+#include <rte_eal.h>
+#include <rte_cryptodev.h>
+
+#include "cperf.h"
+#include "cperf_options.h"
+#include "cperf_test_vector_parsing.h"
+#include "cperf_test_throughput.h"
+#include "cperf_test_latency.h"
+
+const char *cperf_test_type_strs[] = {
+	[CPERF_TEST_TYPE_THROUGHPUT] = "throughput",
+	[CPERF_TEST_TYPE_CYCLECOUNT] = "cycle-count",
+	[CPERF_TEST_TYPE_LATENCY] = "latency"
+};
+
+const char *cperf_op_type_strs[] = {
+	[CPERF_CIPHER_ONLY] = "cipher-only",
+	[CPERF_AUTH_ONLY] = "auth-only",
+	[CPERF_CIPHER_THEN_AUTH] = "cipher-then-auth",
+	[CPERF_AUTH_THEN_CIPHER] = "auth-then-cipher",
+	[CPERF_AEAD] = "aead"
+};
+
+const struct cperf_test cperf_testmap[] = {
+		[CPERF_TEST_TYPE_THROUGHPUT] = {
+				cperf_throughput_test_constructor,
+				cperf_throughput_test_runner,
+				cperf_throughput_test_destructor
+		},
+		[CPERF_TEST_TYPE_CYCLECOUNT] =  { NULL },
+		[CPERF_TEST_TYPE_LATENCY] = {
+				cperf_latency_test_constructor,
+				cperf_latency_test_runner,
+				cperf_latency_test_destructor
+		}
+};
+
+static int
+cperf_initialize_cryptodev(struct cperf_options *opts, uint8_t *enabled_cdevs)
+{
+	uint8_t cdev_id, enabled_cdev_count = 0, nb_lcores;
+	int ret;
+
+	enabled_cdev_count = rte_cryptodev_devices_get(opts->device_type,
+			enabled_cdevs, RTE_DIM(enabled_cdevs));
+	if (enabled_cdev_count == 0) {
+		printf("No crypto devices type %s available\n",
+				opts->device_type);
+		return -EINVAL;
+	}
+
+	nb_lcores = rte_lcore_count() - 1;
+
+	if (enabled_cdev_count > nb_lcores) {
+		printf("Number of capable crypto devices (%d) "
+				"has to be less or equal to number of slave "
+				"cores (%d)\n", enabled_cdev_count, nb_lcores);
+		return -EINVAL;
+	}
+
+	for (cdev_id = 0; cdev_id < enabled_cdev_count &&
+			cdev_id < RTE_CRYPTO_MAX_DEVS; cdev_id++) {
+
+		struct rte_cryptodev_config conf = {
+				.nb_queue_pairs = 1,
+				.socket_id = SOCKET_ID_ANY,
+				.session_mp = {
+					.nb_objs = 2048,
+					.cache_size = 64
+				}
+			};
+		struct rte_cryptodev_qp_conf qp_conf = {
+				.nb_descriptors = 2048
+		};
+
+		ret = rte_cryptodev_configure(enabled_cdevs[cdev_id], &conf);
+		if (ret < 0) {
+			printf("Failed to configure cryptodev %u",
+					enabled_cdevs[cdev_id]);
+			return -EINVAL;
+		}
+
+		ret = rte_cryptodev_queue_pair_setup(enabled_cdevs[cdev_id], 0,
+				&qp_conf, SOCKET_ID_ANY);
+			if (ret < 0) {
+				printf("Failed to setup queue pair %u on "
+					"cryptodev %u",	0, cdev_id);
+				return -EINVAL;
+			}
+
+		ret = rte_cryptodev_start(enabled_cdevs[cdev_id]);
+		if (ret < 0) {
+			printf("Failed to start device %u: error %d\n",
+					enabled_cdevs[cdev_id], ret);
+			return -EPERM;
+		}
+	}
+
+	return enabled_cdev_count;
+}
+
+static int
+cperf_verify_devices_capabilities(struct cperf_options *opts,
+		uint8_t *enabled_cdevs, uint8_t nb_cryptodevs)
+{
+	struct rte_cryptodev_capability_idx cap_idx;
+	const struct rte_cryptodev_symmetric_capability *capability;
+
+	uint8_t i, cdev_id;
+	int ret;
+
+	for (i = 0; i < nb_cryptodevs; i++) {
+
+		cdev_id = enabled_cdevs[i];
+
+		if (opts->op_type == CPERF_AUTH_ONLY ||
+				opts->op_type == CPERF_CIPHER_THEN_AUTH ||
+				opts->op_type == CPERF_AUTH_THEN_CIPHER)  {
+
+			cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH;
+			cap_idx.algo.auth = opts->auth_algo;
+
+			capability = rte_cryptodev_capability_get(cdev_id,
+					&cap_idx);
+			if (capability == NULL)
+				return -1;
+
+			ret = rte_cryptodev_capability_check_auth(capability,
+					opts->auth_key_sz, opts->auth_digest_sz,
+					opts->auth_aad_sz);
+			if (ret != 0)
+				return ret;
+		}
+
+		if (opts->op_type == CPERF_CIPHER_ONLY ||
+				opts->op_type == CPERF_CIPHER_THEN_AUTH ||
+				opts->op_type == CPERF_AUTH_THEN_CIPHER) {
+
+			cap_idx.type = RTE_CRYPTO_SYM_XFORM_CIPHER;
+			cap_idx.algo.cipher = opts->cipher_algo;
+
+			capability = rte_cryptodev_capability_get(cdev_id,
+					&cap_idx);
+			if (capability == NULL)
+				return -1;
+
+			ret = rte_cryptodev_capability_check_cipher(capability,
+					opts->cipher_key_sz,
+					opts->cipher_iv_sz);
+			if (ret != 0)
+				return ret;
+		}
+	}
+
+	return 0;
+}
+
+static int
+cperf_check_test_vector(struct cperf_options opts,
+		struct cperf_test_vector test_vec)
+{
+	if (opts.op_type == CPERF_CIPHER_ONLY) {
+		if (opts.cipher_algo == RTE_CRYPTO_CIPHER_NULL) {
+			if (test_vec.plaintext.data == NULL)
+				return -1;
+		} else if (opts.cipher_algo != RTE_CRYPTO_CIPHER_NULL) {
+			if (test_vec.plaintext.data == NULL)
+				return -1;
+			if (test_vec.plaintext.length != opts.buffer_sz)
+				return -1;
+			if (test_vec.ciphertext.data == NULL)
+				return -1;
+			if (test_vec.ciphertext.length != opts.buffer_sz)
+				return -1;
+			if (test_vec.iv.data == NULL)
+				return -1;
+			if (test_vec.iv.length != opts.cipher_iv_sz)
+				return -1;
+			if (test_vec.cipher_key.data == NULL)
+				return -1;
+			if (test_vec.cipher_key.length != opts.cipher_key_sz)
+				return -1;
+		}
+	} else if (opts.op_type == CPERF_AUTH_ONLY) {
+		if (opts.auth_algo != RTE_CRYPTO_AUTH_NULL) {
+			if (test_vec.plaintext.data == NULL)
+				return -1;
+			if (test_vec.plaintext.length != opts.buffer_sz)
+				return -1;
+			if (test_vec.auth_key.data == NULL)
+				return -1;
+			if (test_vec.auth_key.length != opts.auth_key_sz)
+				return -1;
+			if (test_vec.digest.data == NULL)
+				return -1;
+			if (test_vec.digest.length != opts.auth_digest_sz)
+				return -1;
+		}
+
+	} else if (opts.op_type == CPERF_CIPHER_THEN_AUTH ||
+			opts.op_type == CPERF_AUTH_THEN_CIPHER) {
+		if (opts.cipher_algo == RTE_CRYPTO_CIPHER_NULL) {
+			if (test_vec.plaintext.data == NULL)
+				return -1;
+			if (test_vec.plaintext.length != opts.buffer_sz)
+				return -1;
+		} else if (opts.cipher_algo != RTE_CRYPTO_CIPHER_NULL) {
+			if (test_vec.plaintext.data == NULL)
+				return -1;
+			if (test_vec.plaintext.length != opts.buffer_sz)
+				return -1;
+			if (test_vec.ciphertext.data == NULL)
+				return -1;
+			if (test_vec.ciphertext.length != opts.buffer_sz)
+				return -1;
+			if (test_vec.iv.data == NULL)
+				return -1;
+			if (test_vec.iv.length != opts.cipher_iv_sz)
+				return -1;
+			if (test_vec.cipher_key.data == NULL)
+				return -1;
+			if (test_vec.cipher_key.length != opts.cipher_key_sz)
+				return -1;
+		}
+		if (opts.auth_algo != RTE_CRYPTO_AUTH_NULL) {
+			if (test_vec.auth_key.data == NULL)
+				return -1;
+			if (test_vec.auth_key.length != opts.auth_key_sz)
+				return -1;
+			if (test_vec.digest.data == NULL)
+				return -1;
+			if (test_vec.digest.length != opts.auth_digest_sz)
+				return -1;
+		}
+	} else if (opts.op_type == CPERF_AEAD) {
+		if (test_vec.plaintext.data == NULL)
+			return -1;
+		if (test_vec.plaintext.length != opts.buffer_sz)
+			return -1;
+		if (test_vec.aad.data == NULL)
+			return -1;
+		if (test_vec.aad.length != opts.auth_aad_sz)
+			return -1;
+		if (test_vec.digest.data == NULL)
+			return -1;
+		if (test_vec.digest.length != opts.auth_digest_sz)
+			return -1;
+	}
+	return 0;
+}
+
+int
+main(int argc, char **argv)
+{
+	struct cperf_options opts;
+	struct cperf_test_vector *t_vec = NULL;
+	const struct cperf_op_fns *op_fns;
+
+	void *ctx[RTE_MAX_LCORE] = { };
+
+	uint8_t nb_cryptodevs, cdev_id, i;
+	uint8_t enabled_cdevs[RTE_CRYPTO_MAX_DEVS] = { 0 };
+
+	int ret;
+	uint32_t lcore_id;
+
+	/* Initialise DPDK EAL */
+	ret = rte_eal_init(argc, argv);
+	if (ret < 0)
+		rte_exit(EXIT_FAILURE, "Invalid EAL arguments!\n");
+	argc -= ret;
+	argv += ret;
+
+	cperf_options_default(&opts);
+
+	ret = cperf_options_parse(&opts, argc, argv);
+	if (ret) {
+		RTE_LOG(ERR, USER1, "Parsing on or more user options failed\n");
+		goto err;
+	}
+
+	ret = cperf_options_check(&opts);
+	if (ret) {
+		RTE_LOG(ERR, USER1,
+				"Checking on or more user options failed\n");
+		goto err;
+	}
+
+	if (!opts.silent)
+		cperf_options_dump(&opts);
+
+	nb_cryptodevs = cperf_initialize_cryptodev(&opts, enabled_cdevs);
+	if (nb_cryptodevs < 1) {
+		RTE_LOG(ERR, USER1, "Failed to initialise requested crypto "
+				"device type\n");
+		goto err;
+	}
+
+	ret = cperf_verify_devices_capabilities(&opts, enabled_cdevs,
+			nb_cryptodevs);
+	if (ret) {
+		RTE_LOG(ERR, USER1, "Crypto device type does not support "
+				"capabilities requested\n");
+		goto err;
+	}
+
+	if (opts.test_file != NULL) {
+		t_vec = cperf_test_vector_get_from_file(&opts);
+		if (t_vec == NULL) {
+			RTE_LOG(ERR, USER1,
+					"Failed to create test vector for"
+					" specified file\n");
+			goto err;
+		}
+
+		if (cperf_check_test_vector(opts, *t_vec)) {
+			RTE_LOG(ERR, USER1, "Incomplete necessary test vectors"
+					"\n");
+			goto err;
+		}
+	} else {
+		t_vec = cperf_test_vector_get_dummy(&opts);
+		if (t_vec == NULL) {
+			RTE_LOG(ERR, USER1,
+					"Failed to create test vector for"
+					" specified algorithms\n");
+			goto err;
+		}
+	}
+
+	op_fns = cperf_get_op_functions(&opts);
+	if (op_fns == NULL) {
+		RTE_LOG(ERR, USER1, "Failed to find function ops set for "
+				"specified algorithms combination\n");
+		goto err;
+	}
+
+	if (!opts.silent)
+		show_test_vector(t_vec);
+
+	i = 0;
+	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+
+		if (i == nb_cryptodevs)
+			break;
+
+		cdev_id = enabled_cdevs[i];
+
+		ctx[cdev_id] = cperf_testmap[opts.test].constructor(cdev_id, 0,
+				&opts, t_vec, op_fns);
+		if (ctx[cdev_id] == NULL) {
+			RTE_LOG(ERR, USER1, "Test run constructor failed\n");
+			goto err;
+		}
+		i++;
+	}
+
+	i = 0;
+	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+
+		if (i == nb_cryptodevs)
+			break;
+
+		cdev_id = enabled_cdevs[i];
+
+		rte_eal_remote_launch(cperf_testmap[opts.test].runner,
+				ctx[cdev_id], lcore_id);
+		i++;
+	}
+
+	rte_eal_mp_wait_lcore();
+
+	i = 0;
+	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+
+		if (i == nb_cryptodevs)
+			break;
+
+		cdev_id = enabled_cdevs[i];
+
+		cperf_testmap[opts.test].destructor(ctx[cdev_id]);
+		i++;
+	}
+
+	free_test_vector(t_vec, &opts);
+
+	printf("\n");
+	return EXIT_SUCCESS;
+
+err:
+	i = 0;
+	RTE_LCORE_FOREACH_SLAVE(lcore_id) {
+
+		if (i == nb_cryptodevs)
+			break;
+
+		cdev_id = enabled_cdevs[i];
+
+		if (ctx[cdev_id] && cperf_testmap[opts.test].destructor)
+			cperf_testmap[opts.test].destructor(ctx[cdev_id]);
+		i++;
+	}
+
+	free_test_vector(t_vec, &opts);
+
+	printf("\n");
+	return EXIT_FAILURE;
+}
diff --git a/config/common_base b/config/common_base
index edb6a54..96fd7bf 100644
--- a/config/common_base
+++ b/config/common_base
@@ -585,3 +585,9 @@ CONFIG_RTE_APP_TEST_RESOURCE_TAR=n
 CONFIG_RTE_TEST_PMD=y
 CONFIG_RTE_TEST_PMD_RECORD_CORE_CYCLES=n
 CONFIG_RTE_TEST_PMD_RECORD_BURST_STATS=n
+
+#
+# Compile the crypto performance application
+#
+CONFIG_RTE_APP_CRYPTO_PERF=y
+
diff --git a/doc/guides/rel_notes/release_17_02.rst b/doc/guides/rel_notes/release_17_02.rst
index 5ab7019..cbd2e26 100644
--- a/doc/guides/rel_notes/release_17_02.rst
+++ b/doc/guides/rel_notes/release_17_02.rst
@@ -67,6 +67,11 @@ New Features
 
   * Support for single operations (cipher only and authentication only).
 
+* **Added performance test application.**
+
+  A new performance test application allows measuring performance parameters
+  of PMDs available in crypto tree.
+
 
 Resolved Issues
 ---------------
diff --git a/doc/guides/tools/cryptoperf.rst b/doc/guides/tools/cryptoperf.rst
new file mode 100644
index 0000000..8f2a08a
--- /dev/null
+++ b/doc/guides/tools/cryptoperf.rst
@@ -0,0 +1,397 @@
+..  BSD LICENSE
+    Copyright(c) 2016 Intel Corporation. All rights reserved.
+    All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+
+    * Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+    * Neither the name of Intel Corporation nor the names of its
+    contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+    OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+dpdk-crypto-perf Application
+============================
+
+The ``dpdk-crypto-perf`` tool is a Data Plane Development Kit (DPDK) utility
+that allows measuring performance parameters of PMDs available in the
+crypto tree. There are available two measurement types: throughput and latency.
+User can use multiply cores to run tests on but only
+one type of crypto PMD can be measured during single application
+execution. Cipher parameters, type of device, type of operation and
+chain mode have to be specified in the command line as application
+parameters. These parameters are checked using device capabilities
+structure.
+
+Compiling the Application
+-------------------------
+
+**Step 1: PMD setting**
+
+The ``dpdk-crypto-perf`` tool depends on crypto device drivers PMD which are
+disabled by default in the build configuration file ``common_base``.
+The crypto device drivers PMD which should be tested can be enabled by setting::
+
+   CONFIG_RTE_LIBRTE_PMD_<name>=y
+
+Setting example for open ssl PMD::
+
+   CONFIG_RTE_LIBRTE_PMD_OPENSSL=y
+
+**Step 2: Linearization setting**
+
+It is possible linearized input segmented packets just before crypto operation
+for devices which doesn't support scatter-gather, and allows to measure
+performance also for this use case.
+
+To set on the linearization options add below definition to the
+``cperf_ops.h`` file::
+
+   #define CPERF_LINEARIZATION_ENABLE
+
+**Step 3: Build the application**
+
+Execute the ``dpdk-setup.sh`` script to build the DPDK library together with the
+``dpdk-crypto-perf`` applcation.
+
+Initially, the user must select a DPDK target to choose the correct target type
+and compiler options to use when building the libraries.
+The user must have all libraries, modules, updates and compilers installed
+in the system prior to this,
+as described in the earlier chapters in this Getting Started Guide.
+
+Running the Application
+-----------------------
+
+The tool application has a number of command line options:
+
+.. code-block:: console
+
+   dpdk-crypto-perf [EAL Options] -- [Application Options]
+
+EAL Options
+~~~~~~~~~~~
+
+The following are the EAL command-line options that can be used in conjunction
+with the ``dpdk-crypto-perf`` applcation.
+See the DPDK Getting Started Guides for more information on these options.
+
+*   ``-c <COREMASK>``
+
+        Set the hexadecimal bitmask of the cores to run on.
+
+*   ``-w <PCI>``
+
+        Add a PCI device in white list.
+
+*   ``--vdev <driver><id>``
+
+        Add a virtual device.
+
+Appication Options
+~~~~~~~~~~~~~~~~~~
+
+The following are the appication command-line options:
+
+* ``--ptest type``
+
+        Set test type, where ``type`` is one of the following::
+
+           throughput
+           latency
+
+* ``--silent``
+
+        Disable options dump.
+
+* ``--pool-sz <n>``
+
+        Set the number of mbufs to be allocated in the mbuf pool.
+
+* ``--total-ops <n>``
+
+        Set the number of total operations performed.
+
+* ``--burst-sz <n>``
+
+        Set the number of packets per burst.
+
+* ``--buffer-sz <n>``
+
+        Set the size of single packet (plaintext or ciphertext in it).
+
+* ``--segments-nb <n>``
+
+        Set the number of segments per packet.
+
+* ``--devtype <name>``
+
+        Set device type, where ``name`` is one of the following::
+
+           crypto_null
+           crypto_aesni_mb
+           crypto_aesni_gcm
+           crypto_openssl
+           crypto_qat
+           crypto_snow3g
+           crypto_kasumi
+           crypto_zuc
+
+* ``--optype <name>``
+
+        Set operation type, where ``name`` is one of the following::
+
+           cipher-only
+           auth-only
+           cipher-then-auth
+           auth-then-cipher
+           aead
+
+* ``--sessionless``
+
+        Enable session-less crypto operations mode.
+
+* ``--out-of-place``
+
+        Enable out-of-place crypto operations mode.
+
+* ``--verify``
+
+        Enable verify that all crypto operations were successful.
+        The verification is done after the performance test.
+
+* ``--test-file <name>``
+
+        Set test vector file path. See the Test Vector File chapter.
+
+* ``--test-name <name>``
+
+        Set specific test name section in the test vector file.
+
+* ``--cipher-algo <name>``
+
+        Set cipher algorithm name, where ``name`` is one of the following::
+
+           3des-cbc
+           3des-ecb
+           3des-ctr
+           aes-cbc
+           aes-ccm
+           aes-ctr
+           aes-ecb
+           aes-gcm
+           aes-f8
+           aes-xts
+           arc4
+           null
+           kasumi-f8
+           snow3g-uea2
+           zuc-eea3
+
+* ``--cipher-op <mode>``
+
+        Set cipher operation mode, where ``mode`` is one of the following::
+
+           encrypt
+           decrypt
+
+* ``--cipher-key-sz <n>``
+
+        Set the size of cipher key.
+
+* ``--cipher-iv-sz <n>``
+
+        Set the size of cipher iv.
+
+* ``--auth-algo <name>``
+
+        Set authentication algorithm name, where ``name`` is one
+        of the following::
+
+           3des-cbc
+           aes-cbc-mac
+           aes-ccm
+           aes-cmac
+           aes-gcm
+           aes-gmac
+           aes-xcbc-mac
+           md5
+           md5-hmac
+           sha1
+           sha1-hmac
+           sha2-224
+           sha2-224-hmac
+           sha2-256
+           sha2-256-hmac
+           sha2-384
+           sha2-384-hmac
+           sha2-512
+           sha2-512-hmac
+           kasumi-f9
+           snow3g-uia2
+           zuc-eia3
+
+* ``--auth-op <mode>``
+
+        Set authentication operation mode, where ``mode`` is one of
+        the following::
+
+           verify
+           generate
+
+* ``--auth-key-sz <n>``
+
+        Set the size of authentication key.
+
+* ``--auth-digest-sz <n>``
+
+        Set the size of authentication digest.
+
+* ``--auth-aad-sz <n>``
+
+        Set the size of authentication aad.
+
+* ``--csv-friendly``
+
+        Enable test result output CSV friendly rather than human friendly.
+
+Test Vector File
+~~~~~~~~~~~~~~~~
+
+The test vector file is a text file contain information about test vectors.
+The file is made of the sections. The first section doesn't have header.
+It contain global information used in each test variant vectors -
+typicaly information about plaintext, ciphertext, cipher key, aut key,
+initial vector. All other sections begin header.
+The sections contain particular information typicaly digest.
+
+**Format of the file:**
+
+Each line beginig with sign '#' contain comment and it is ignored by parser::
+
+   # <comment>
+
+Header line is just name in square bracket::
+
+   [<section name>]
+
+Data line contain information tocken then sign '=' and
+a string of bytes in C byte array format::
+
+   <tocken> = <C byte array>
+
+**Tockens list:**
+
+* ``plaintext``
+
+        Original plaintext to be crypted.
+
+* ``ciphertext``
+
+        Encrypted plaintext string.
+
+* ``cipher_key``
+
+        Key used in cipher operation.
+
+* ``auth_key``
+
+        Key used in auth operation.
+
+* ``iv``
+
+        Initial vector.
+
+* ``aad``
+
+        Additional data.
+
+* ``digest``
+
+        Digest string.
+
+Examples
+--------
+
+Call application for performance throughput test of single Aesni MB PMD
+for cipher encryption aes-cbc and auth generation sha1-hmac,
+one milion operations, burst size 32, packet size 64::
+
+   dpdk-crypto-perf -c 0xc0 --vdev crypto_aesni_mb_pmd -w 0000:00:00.0 --
+   --ptest throughput --devtype crypto_aesni_mb --optype cipher-then-auth
+   --cipher-algo aes-cbc --cipher-op encrypt --cipher-key-sz 16 --auth-algo
+   sha1-hmac --auth-op generate --auth-key-sz 64 --auth-digest-sz 12
+   --total-ops 10000000 --burst-sz 32 --buffer-sz 64
+
+Call application for performance latency test of two Aesni MB PMD executed
+on two cores for cipher encryption aes-cbc, ten operations in silent mode::
+
+   dpdk-crypto-perf -c 0xf0 --vdev crypto_aesni_mb_pmd1
+   --vdev crypto_aesni_mb_pmd2 -w 0000:00:00.0 -- --devtype crypto_aesni_mb
+   --cipher-algo aes-cbc --cipher-key-sz 16 --cipher-iv-sz 16
+   --cipher-op encrypt --optype cipher-only --silent
+   --ptest latency --total-ops 10
+
+Call application for performance latency test of single open ssl PMD
+for cipher encryption aes-gcm and auth generation aes-gcm,ten operations
+in silent mode, test vector provide in file "test_aes_gcm.data"
+with packet verification::
+
+   dpdk-crypto-perf -c 0xf0 --vdev crypto_openssl -w 0000:00:00.0 --
+   --devtype crypto_openssl --cipher-algo aes-gcm --cipher-key-sz 16
+   --cipher-iv-sz 16 --cipher-op encrypt --auth-algo aes-gcm --auth-key-sz 16
+   --auth-digest-sz 16 --auth-aad-sz 16 --auth-op generate --optype aead
+   --silent --ptest latency --total-ops 10
+   --test-file test_aes_gcm.data --verify
+
+Test vector file for cipher algorithm aes cbc 256 with authorization sha::
+
+   # Global Section
+   plaintext =
+   0xff, 0xca, 0xfb, 0xf1, 0x38, 0x20, 0x2f, 0x7b, 0x24, 0x98, 0x26, 0x7d, 0x1d, 0x9f, 0xb3, 0x93,
+   0xd9, 0xef, 0xbd, 0xad, 0x4e, 0x40, 0xbd, 0x60, 0xe9, 0x48, 0x59, 0x90, 0x67, 0xd7, 0x2b, 0x7b,
+   0x8a, 0xe0, 0x4d, 0xb0, 0x70, 0x38, 0xcc, 0x48, 0x61, 0x7d, 0xee, 0xd6, 0x35, 0x49, 0xae, 0xb4,
+   0xaf, 0x6b, 0xdd, 0xe6, 0x21, 0xc0, 0x60, 0xce, 0x0a, 0xf4, 0x1c, 0x2e, 0x1c, 0x8d, 0xe8, 0x7b
+   ciphertext =
+   0x77, 0xF9, 0xF7, 0x7A, 0xA3, 0xCB, 0x68, 0x1A, 0x11, 0x70, 0xD8, 0x7A, 0xB6, 0xE2, 0x37, 0x7E,
+   0xD1, 0x57, 0x1C, 0x8E, 0x85, 0xD8, 0x08, 0xBF, 0x57, 0x1F, 0x21, 0x6C, 0xAD, 0xAD, 0x47, 0x1E,
+   0x0D, 0x6B, 0x79, 0x39, 0x15, 0x4E, 0x5B, 0x59, 0x2D, 0x76, 0x87, 0xA6, 0xD6, 0x47, 0x8F, 0x82,
+   0xB8, 0x51, 0x91, 0x32, 0x60, 0xCB, 0x97, 0xDE, 0xBE, 0xF0, 0xAD, 0xFC, 0x23, 0x2E, 0x22, 0x02
+   cipher_key =
+   0xE4, 0x23, 0x33, 0x8A, 0x35, 0x64, 0x61, 0xE2, 0x49, 0x03, 0xDD, 0xC6, 0xB8, 0xCA, 0x55, 0x7A,
+   0xd0, 0xe7, 0x4b, 0xfb, 0x5d, 0xe5, 0x0c, 0xe7, 0x6f, 0x21, 0xb5, 0x52, 0x2a, 0xbb, 0xc7, 0xf7
+   auth_key =
+   0xaf, 0x96, 0x42, 0xf1, 0x8c, 0x50, 0xdc, 0x67, 0x1a, 0x43, 0x47, 0x62, 0xc7, 0x04, 0xab, 0x05,
+   0xf5, 0x0c, 0xe7, 0xa2, 0xa6, 0x23, 0xd5, 0x3d, 0x95, 0xd8, 0xcd, 0x86, 0x79, 0xf5, 0x01, 0x47,
+   0x4f, 0xf9, 0x1d, 0x9d, 0x36, 0xf7, 0x68, 0x1a, 0x64, 0x44, 0x58, 0x5d, 0xe5, 0x81, 0x15, 0x2a,
+   0x41, 0xe4, 0x0e, 0xaa, 0x1f, 0x04, 0x21, 0xff, 0x2c, 0xf3, 0x73, 0x2b, 0x48, 0x1e, 0xd2, 0xf7
+   iv =
+   0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F
+   # Section sha 1 hmac buff 32
+   [sha1_hmac_buff_32]
+   digest =
+   0x36, 0xCA, 0x49, 0x6A, 0xE3, 0x54, 0xD8, 0x4F, 0x0B, 0x76, 0xD8, 0xAA, 0x78, 0xEB, 0x9D, 0x65,
+   0x2C, 0xCA, 0x1F, 0x97
+   # Section sha 256 hmac buff 32
+   [sha256_hmac_buff_32]
+   digest =
+   0x1C, 0xB2, 0x3D, 0xD1, 0xF9, 0xC7, 0x6C, 0x49, 0x2E, 0xDA, 0x94, 0x8B, 0xF1, 0xCF, 0x96, 0x43,
+   0x67, 0x50, 0x39, 0x76, 0xB5, 0xA1, 0xCE, 0xA1, 0xD7, 0x77, 0x10, 0x07, 0x43, 0x37, 0x05, 0xB4
diff --git a/doc/guides/tools/index.rst b/doc/guides/tools/index.rst
index 513221c..6dc5d20 100644
--- a/doc/guides/tools/index.rst
+++ b/doc/guides/tools/index.rst
@@ -39,4 +39,5 @@ DPDK Tools User Guides
     pdump
     pmdinfo
     devbind
+    cryptoperf
 
-- 
2.5.0

^ permalink raw reply related

* Re: Running DPDK as an unprivileged user
From: Tan, Jianfeng @ 2017-01-05 14:58 UTC (permalink / raw)
  To: Sergio Gonzalez Monroy, Walker, Benjamin, dev@dpdk.org
In-Reply-To: <e554e14f-6e3a-7d12-2df0-690a6a06df80@intel.com>

Hi,


On 1/5/2017 6:16 PM, Sergio Gonzalez Monroy wrote:
> On 05/01/2017 10:09, Sergio Gonzalez Monroy wrote:
>> On 04/01/2017 21:34, Walker, Benjamin wrote:
>>> On Wed, 2017-01-04 at 19:39 +0800, Tan, Jianfeng wrote:
>>>> Hi Benjamin,
>>>>
>>>>
>>>> On 12/30/2016 4:41 AM, Walker, Benjamin wrote:
>>>>> DPDK today begins by allocating all of the required
>>>>> hugepages, then finds all of the physical addresses for
>>>>> those hugepages using /proc/self/pagemap, sorts the
>>>>> hugepages by physical address, then remaps the pages to
>>>>> contiguous virtual addresses. Later on and if vfio is
>>>>> enabled, it asks vfio to pin the hugepages and to set their
>>>>> DMA addresses in the IOMMU to be the physical addresses
>>>>> discovered earlier. Of course, running as an unprivileged
>>>>> user means all of the physical addresses in
>>>>> /proc/self/pagemap are just 0, so this doesn't end up
>>>>> working. Further, there is no real reason to choose the
>>>>> physical address as the DMA address in the IOMMU - it would
>>>>> be better to just count up starting at 0.
>>>> Why not just using virtual address as the DMA address in this case to
>>>> avoid maintaining another kind of addresses?
>>> That's a valid choice, although I'm just storing the DMA address in the
>>> physical address field that already exists. You either have a physical
>>> address or a DMA address and never both.
>>>
>>>>>    Also, because the
>>>>> pages are pinned after the virtual to physical mapping is
>>>>> looked up, there is a window where a page could be moved.
>>>>> Hugepage mappings can be moved on more recent kernels (at
>>>>> least 4.x), and the reliability of hugepages having static
>>>>> mappings decreases with every kernel release.
>>>> Do you mean kernel might take back a physical page after mapping it 
>>>> to a
>>>> virtual page (maybe copy the data to another physical page)? Could you
>>>> please show some links or kernel commits?
>>> Yes - the kernel can move a physical page to another physical page
>>> and change the virtual mapping at any time. For a concise example
>>> see 'man migrate_pages(2)', or for a more serious example the code
>>> that performs memory page compaction in the kernel which was
>>> recently extended to support hugepages.
>>>
>>> Before we go down the path of me proving that the mapping isn't static,
>>> let me turn that line of thinking around. Do you have any documentation
>>> demonstrating that the mapping is static? It's not static for 4k 
>>> pages, so
>>> why are we assuming that it is static for 2MB pages? I understand that
>>> it happened to be static for some versions of the kernel, but my 
>>> understanding
>>> is that this was purely by coincidence and never by intention.
>>
>> It looks to me as if you are talking about Transparent hugepages, and 
>> not hugetlbfs managed hugepages (DPDK usecase).
>> AFAIK memory (hugepages) managed by hugetlbfs is not compacted and/or 
>> moved, they are not part of the kernel memory management.
>>
>
> Please forgive my loose/poor use of words here when saying that "they 
> are not part of the kernel memory management", I mean to say that
> they are not part of the kernel memory management process you were 
> mentioning, ie. compacting, moving, etc.
>
> Sergio
>
>> So again, do you have some references to code/articles where this 
>> "dynamic" behavior of hugepages managed by hugetlbfs is mentioned?
>>
>> Sergio

According to the information Benjamin provided, I did some home work and 
find this macro in kernel config, CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION, 
and further the function, hugepage_migration_supported().

Seems that there are at least three ways to make this behavior happen 
(I'm basing on Linux 4.8.1):

a) Through a syscall migrate_pages();
b) through a syscall move_pages();
c) Since some version of kernel, there's a kthread named kcompactd for 
each numa socket, to perform memory compaction.

Thanks,
Jianfeng

>>
>>>>> Note that this
>>>>> probably means that using uio on recent kernels is subtly
>>>>> broken and cannot be supported going forward because there
>>>>> is no uio mechanism to pin the memory.
>>>>>
>>>>> The first open question I have is whether DPDK should allow
>>>>> uio at all on recent (4.x) kernels. My current understanding
>>>>> is that there is no way to pin memory and hugepages can now
>>>>> be moved around, so uio would be unsafe. What does the
>>>>> community think here?
>>>>>
>>>>> My second question is whether the user should be allowed to
>>>>> mix uio and vfio usage simultaneously. For vfio, the
>>>>> physical addresses are really DMA addresses and are best
>>>>> when arbitrarily chosen to appear sequential relative to
>>>>> their virtual addresses.
>>>> Why "sequential relative to their virtual addresses"? IOMMU table 
>>>> is for
>>>> DMA addr -> physical addr mapping. So we need to DMA addresses
>>>> "sequential relative to their physical addresses"? Based on your above
>>>> analysis on how hugepages are initialized, virtual addresses is a good
>>>> candidate for DMA address?
>>> The code already goes through a separate organizational step on all of
>>> the pages that remaps the virtual addresses such that they're 
>>> sequential
>>> relative to the physical backing pages, so this mostly ends up as 
>>> the same
>>> thing.
>>> Choosing to use the virtual address is a totally valid choice, but I 
>>> worry it
>>> may lead to confusion during debugging or in a multi-process scenario.
>>> I'm open to making this choice instead of starting from zero, though.
>>>
>>>> Thanks,
>>>> Jianfeng
>>
>>
>

^ permalink raw reply

* [PATCH] app/test: add sgl gcm performance test
From: Arek Kusztal @ 2017-01-05 15:02 UTC (permalink / raw)
  To: dev
  Cc: fiona.trahe, pablo.de.lara.guarch, john.griffin, deepak.k.jain,
	Arek Kusztal

This patch adds scatter-gather list performance test
using AES GCM algorithm

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
 app/test/test_cryptodev_perf.c | 71 +++++++++++++++++++++++++++++++-----------
 1 file changed, 53 insertions(+), 18 deletions(-)

diff --git a/app/test/test_cryptodev_perf.c b/app/test/test_cryptodev_perf.c
index 7751ff2..26940ed 100644
--- a/app/test/test_cryptodev_perf.c
+++ b/app/test/test_cryptodev_perf.c
@@ -3793,13 +3793,17 @@ perf_gcm_set_crypto_op(struct rte_crypto_op *op, struct rte_mbuf *m,
 
 	return op;
 }
-
+#define SGL_NO		2
 static struct rte_mbuf *
 test_perf_create_pktmbuf_fill(struct rte_mempool *mpool,
 		struct perf_test_params *params,
-		unsigned buf_sz, struct crypto_params *m_hlp)
+		unsigned buf_sz, struct crypto_params *m_hlp,
+		int sgl)
 {
-	struct rte_mbuf *m = rte_pktmbuf_alloc(mpool);
+	struct rte_mbuf *m = rte_pktmbuf_alloc(mpool), *m_2 = NULL;
+
+	if (sgl)
+		m_2 = rte_pktmbuf_alloc(mpool);
 	uint16_t iv_pad_len =
 			ALIGN_POW2_ROUNDUP(params->symmetric_op->iv_len, 16);
 	uint16_t aad_len = params->symmetric_op->aad_len;
@@ -3820,14 +3824,38 @@ test_perf_create_pktmbuf_fill(struct rte_mempool *mpool,
 	}
 	m_hlp->iv = (uint8_t *)p;
 
-	p = rte_pktmbuf_append(m, buf_sz);
-	if (p == NULL) {
-		rte_pktmbuf_free(m);
-		return NULL;
+	if (!sgl) {
+		p = rte_pktmbuf_append(m, buf_sz);
+		if (p == NULL) {
+			rte_pktmbuf_free(m);
+			return NULL;
+		}
+		rte_memcpy(p, params->symmetric_op->p_data, buf_sz);
+	} else {
+		/* 1st */
+		p = rte_pktmbuf_append(m, buf_sz / SGL_NO);
+		if (p == NULL) {
+			rte_pktmbuf_free(m);
+			return NULL;
+		}
+		rte_memcpy(p, params->symmetric_op->p_data, buf_sz / SGL_NO);
+
+		/* 2nd */
+		p = rte_pktmbuf_append(m_2, buf_sz / SGL_NO);
+		if (p == NULL) {
+			rte_pktmbuf_free(m);
+			return NULL;
+		}
+		rte_memcpy(p, params->symmetric_op->p_data + buf_sz / SGL_NO,
+				buf_sz / SGL_NO);
+
+		m->next = m_2;
 	}
-	rte_memcpy(p, params->symmetric_op->p_data, buf_sz);
+	if (!sgl)
+		p = rte_pktmbuf_append(m, digest_size);
+	else
+		p = rte_pktmbuf_append(m_2, digest_size);
 
-	p = rte_pktmbuf_append(m, digest_size);
 	if (p == NULL) {
 		rte_pktmbuf_free(m);
 		return NULL;
@@ -3839,7 +3867,7 @@ test_perf_create_pktmbuf_fill(struct rte_mempool *mpool,
 
 static int
 perf_AES_GCM(uint8_t dev_id, uint16_t queue_id,
-	     struct perf_test_params *pparams, uint32_t test_ops)
+	     struct perf_test_params *pparams, uint32_t test_ops, int sgl)
 {
 	int j = 0;
 	struct crypto_testsuite_params *ts_params = &testsuite_params;
@@ -3872,7 +3900,7 @@ perf_AES_GCM(uint8_t dev_id, uint16_t queue_id,
 		mbufs[i] = test_perf_create_pktmbuf_fill(
 				ts_params->mbuf_mp,
 				pparams, pparams->symmetric_op->p_len,
-				&m_hlp[i]);
+				&m_hlp[i], sgl);
 	}
 
 	if (test_ops)
@@ -3985,7 +4013,7 @@ perf_AES_GCM(uint8_t dev_id, uint16_t queue_id,
 }
 
 static int
-test_perf_AES_GCM(int continual_buf_len, int continual_size)
+test_perf_AES_GCM(int continual_buf_len, int continual_size, int sgl)
 {
 	uint16_t i, j, k, loops = 1;
 
@@ -4086,10 +4114,10 @@ test_perf_AES_GCM(int continual_buf_len, int continual_size)
 			ops_set[i].t_len = gcm_tests[i]->auth_tags[j].len;
 
 			/* Run is twice, one for encryption/hash checks,
-			 * one for perf
+			 * one for perf, dont check for sgl
 			 */
-			if (perf_AES_GCM(testsuite_params.dev_id, 0,
-					&params_set[i], 1))
+			if (!sgl && perf_AES_GCM(testsuite_params.dev_id, 0,
+					&params_set[i], 1, sgl))
 				return TEST_FAILED;
 
 			for (k = 0; k < loops; k++) {
@@ -4098,7 +4126,7 @@ test_perf_AES_GCM(int continual_buf_len, int continual_size)
 						"Throughput(Gbps)\t"
 						"Retries\tEmptyPolls");
 				if (perf_AES_GCM(testsuite_params.dev_id, 0,
-						&params_set[i], 0))
+						&params_set[i], 0, sgl))
 					return TEST_FAILED;
 				if (continual_buf_len)
 					printf("\n\nCompleted loop %i of %i ...",
@@ -4113,7 +4141,12 @@ test_perf_AES_GCM(int continual_buf_len, int continual_size)
 
 static int test_cryptodev_perf_AES_GCM(void)
 {
-	return test_perf_AES_GCM(0, 0);
+	return test_perf_AES_GCM(0, 0, 0);
+}
+
+static int test_cryptodev_perf_AES_GCM_SGL_2_bufs(void)
+{
+	return test_perf_AES_GCM(0, 0, 1);
 }
 /*
  * This function calls AES GCM performance tests providing
@@ -4122,7 +4155,7 @@ static int test_cryptodev_perf_AES_GCM(void)
  */
 static int test_continual_perf_AES_GCM(void)
 {
-	return test_perf_AES_GCM(1024, 10);
+	return test_perf_AES_GCM(1024, 10, 0);
 }
 
 static int
@@ -4186,6 +4219,8 @@ static struct unit_test_suite cryptodev_testsuite  = {
 				test_cryptodev_perf_AES_GCM),
 		TEST_CASE_ST(ut_setup, ut_teardown,
 				test_perf_aes_cbc_vary_burst_size),
+		TEST_CASE_ST(ut_setup, ut_teardown,
+				test_cryptodev_perf_AES_GCM_SGL_2_bufs),
 		TEST_CASES_END() /**< NULL terminate unit test array */
 	}
 };
-- 
2.1.0

^ permalink raw reply related

* Re: [PATCH v4] crypto/aesni_gcm: migration from MB library to ISA-L
From: Thomas Monjalon @ 2017-01-05 15:12 UTC (permalink / raw)
  To: Piotr Azarewicz; +Cc: dev, pablo.de.lara.guarch
In-Reply-To: <1483624286-92526-1-git-send-email-piotrx.t.azarewicz@intel.com>

2017-01-05 14:51, Piotr Azarewicz:
> Current Cryptodev AES-NI GCM PMD is implemented using Multi Buffer
> Crypto library.This patch reimplement the device using ISA-L Crypto
> library: https://github.com/01org/isa-l_crypto.
> 
> The migration entailed the following additional support for:
>   * GMAC algorithm.
>   * 256-bit cipher key.
>   * Session-less mode.
>   * Out-of place processing
>   * Scatter-gatter support for chained mbufs (only out-of place and
>     destination mbuf must be contiguous)
> 
> Verified current unit tests and added new unit tests to verify new
> functionalities.
> 
> PERFORMANCE COMPARISON
> ----------------------
> Comparison the new and old implementation is made by running app/test
> and calling cryptodev_aesni_gcm_perftest.
> As we may see below, the new implementation has small performance drop
> when buffer size is above 64B.

I am a bit surprised that you change for lower performance.
I understand that it brings new features.
Is it possible to add such features without performance impact?


> Old implementation with MB library:
> Cipher algo: AES_GCM Cipher hash: AES_GCM ciphr key: 128b burst size: 32
> Buffer Size(B)  OPS(M)  Throughput(Gbps)         Retries      EmptyPolls
> 64                4.57              2.34               0               0
> 128               4.28              4.39               0               0
> 256               2.76              5.66               0               0
> 512               1.60              6.56               0               0
> 1024              0.90              7.34               0               0
> 1536              0.62              7.66               0               0
> 2048              0.48              7.84               0               0
> 
> New implementation with ISA-L library:
> Cipher algo: AES_GCM Cipher hash: AES_GCM ciphr key: 128b burst size: 32
> Buffer Size(B)  OPS(M)  Throughput(Gbps)         Retries      EmptyPolls
> 64                4.62              2.37               0               0
> 128               4.06              4.16               0               0
> 256               2.65              5.44               0               0
> 512               1.57              6.45               0               0
> 1024              0.89              7.26               0               0
> 1536              0.62              7.58               0               0
> 2048              0.47              7.77               0               0
> 

^ permalink raw reply

* Re: [PATCH] net/mlx5: fix Tx doorbell
From: Ferruh Yigit @ 2017-01-05 15:19 UTC (permalink / raw)
  To: Nelio Laranjeiro, dev
In-Reply-To: <1481290078-4530-1-git-send-email-nelio.laranjeiro@6wind.com>

On 12/9/2016 1:27 PM, Nelio Laranjeiro wrote:
> Too much data is uselessly written to the Tx doorbell.
> 
> Fixes: 1d88ba171942 ("net/mlx5: refactor Tx data path")
> 
> Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> 

Applied to dpdk-next-net/master, thanks.

Is not CC'ing stable intentional, since this patch depends on a patch
introduced in this release? If not intentional, please CC stable.

^ permalink raw reply

* Re: [RFC] igb_uio: deprecate iomem and ioport mapping
From: Ferruh Yigit @ 2017-01-05 15:23 UTC (permalink / raw)
  To: Tan, Jianfeng, Stephen Hemminger; +Cc: dev@dpdk.org, david.marchand@6wind.com
In-Reply-To: <ED26CBA2FAD1BF48A8719AEF02201E364E6FC0CF@SHSMSX103.ccr.corp.intel.com>

On 12/5/2016 7:04 AM, Tan, Jianfeng wrote:
> Hi Stephen,
> 
>> -----Original Message-----
>> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
>> Sent: Saturday, December 3, 2016 7:47 AM
>> To: Tan, Jianfeng
>> Cc: dev@dpdk.org; david.marchand@6wind.com; Yigit, Ferruh
>> Subject: Re: [RFC] igb_uio: deprecate iomem and ioport mapping
>>
>> On Thu,  1 Sep 2016 02:16:37 +0000
>> Jianfeng Tan <jianfeng.tan@intel.com> wrote:
>>
>>> Previously in igb_uio, iomem is mapped, and both ioport and io mem
>>> are recorded into uio framework, which is duplicated and makes the
>>> code too complex.
>>>
>>> For iomem, DPDK user space code never opens or reads files under
>>> /sys/pci/bus/devices/xxxx:xx:xx.x/uio/uioY/maps/. Instead,
>>> /sys/pci/bus/devices/xxxx:xx:xx.x/resourceY are used to map device
>>> memory.
>>>
>>> For ioport, non-x86 platforms cannot read from files under
>>> /sys/pci/bus/devices/xxxx:xx:xx.x/uio/uioY/portio/ directly, because
>>> non-x86 platforms need to map port region for access in user space,
>>> see non-x86 version pci_uio_ioport_map(). x86 platforms can use the
>>> the same way as uio_pci_generic.
>>>
>>> This patch deprecates iomem and ioport mapping in igb_uio kernel
>>> module, and adjusts the iomem implementation in both igb_uio and
>>> uio_pci_generic:
>>>   - for x86 platform, get ports info from /proc/ioports;
>>>   - for non-x86 platform, map and get ports info by pci_uio_ioport_map().
>>>
>>> Note: this will affect those applications who are using files under
>>> /sys/pci/bus/devices/xxxx:xx:xx.x/uio/uioY/maps/ and
>>> /sys/pci/bus/devices/xxxx:xx:xx.x/uio/uioY/portio/.
>>>
>>> Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
>>
>> What about people using older kernels with the new DPDK EAL and
>> vice versa? 
> 
> There are two things planned in this proposal:
> (1) deprecating iomem mapping in igb_uio, which is not used in DPDK code anyway.
> (2) deprecating ioport mapping in igb_uio, which has effect on ioport mapping for x86 platforms. The way we use to make up is to leverage how uio_pci_generic does, aka, based on /proc/ioports, and this proc file is available at very early stage of Linux (Even before 2.6.32).
> 
> So I don't see a problem there when running the new DPDK EAL on older kernels.
> 
> On the other way, running old DPDK EAL on new kernels, and using new igb_uio, right? Oops, this should have problem. Thank you for pointing out this. So how about just removing iomem? And my motivation to clean igb_uio like this way is to fix a problem here: http://dpdk.org/dev/patchwork/patch/17495/.
> 
>> It makes sense to make igb_uio generic for non DPDK
>> usage, so it should probably follow the other UIO drivers.
>>
> 
> Then the problem would be backward compatibility. I might need to reconsider this.

Hi Jianfeng,

Taking into account that this patch is for cleanup, and there may be
some backward compatibility issues mentioned by Stephen, would you mind
dropping this patch?

If you agree to drop, would you mind sending a patch to remove existing
deprecation notice?

Thanks,
ferruh

> 
> Thank you for reviewing!
> 
> Thanks,
> Jianfeng
> 

^ permalink raw reply

* [PATCH v2] doc: announce API and ABI change for ethdev
From: Bernard Iremonger @ 2017-01-05 15:25 UTC (permalink / raw)
  To: dev, john.mcnamara; +Cc: Bernard Iremonger
In-Reply-To: <1483613049-25155-1-git-send-email-bernard.iremonger@intel.com>

In 17.05 nine rte_eth_dev_* functions will be removed from
librte_ether, renamed and moved to the ixgbe PMD.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
v2:
Used comma's to shorten lists.

 doc/guides/rel_notes/deprecation.rst | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 1438c77..985cda8 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -79,3 +79,22 @@ Deprecation Notices
   PMDs that implement the latter.
   Target release for removal of the legacy API will be defined once most
   PMDs have switched to rte_flow.
+
+* ethdev: for 17.05 it is planned to deprecate the following nine rte_eth_dev_* functions
+  and move them into the ixgbe PMD:
+
+  ``rte_eth_dev_bypass_init``, ``rte_eth_dev_bypass_state_set``, ``rte_eth_dev_bypass_state_show``,
+  ``rte_eth_dev_bypass_event_store``, ``rte_eth_dev_bypass_event_show``, ``rte_eth_dev_wd_timeout_store``,
+  ``rte_eth_dev_bypass_wd_timeout_show``, ``rte_eth_dev_bypass_ver_show``, ``rte_eth_dev_bypass_wd_reset``.
+
+  The following fields will be removed from ``struct eth_dev_ops``:
+
+  ``bypass_init_t``, ``bypass_state_set_t``, ``bypass_state_show_t``, ``bypass_event_set_t``,
+  ``bypass_event_show_t``, ``bypass_wd_timeout_set_t``, ``bypass_wd_timeout_show_t``,
+  ``bypass_ver_show_t``, ``bypass_wd_reset_t``.
+
+  The functions will be renamed to the following, and moved to the ``ixgbe`` PMD:
+
+  ``rte_pmd_ixgbe_bypass_init``, ``rte_pmd_ixgbe_bypass_state_set``, ``rte_pmd_ixgbe_bypass_state_show``,
+  ``rte_pmd_ixgbe_bypass_event_set``, ``rte_pmd_ixgbe_bypass_event_show``, ``rte_pmd_ixgbe_bypass_wd_timeout_set``,
+  ``rte_pmd_ixgbe_bypass_wd_timeout_show``, ``rte_pmd_ixgbe_bypass_ver_show``, ``rte_pmd_ixgbe_bypass_wd_reset``.
-- 
2.10.1

^ permalink raw reply related

* Re: [PATCH v3 1/5] rte_mbuf: add rte_pktmbuf_linearize
From: De Lara Guarch, Pablo @ 2017-01-05 15:37 UTC (permalink / raw)
  To: Kulasek, TomaszX, dev@dpdk.org
In-Reply-To: <1483607556-21460-2-git-send-email-tomaszx.kulasek@intel.com>

Hi Tomasz,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Tomasz Kulasek
> Sent: Thursday, January 05, 2017 9:13 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH v3 1/5] rte_mbuf: add rte_pktmbuf_linearize
> 
> This patch adds function rte_pktmbuf_linearize to let crypto PMD coalesce
> chained mbuf before crypto operation and extend their capabilities to
> support segmented mbufs when device cannot handle them natively.
> 
> Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>

Could you separate this patch and patch 2/5 out of this patchset and CC Olivier,
the mbuf maintainer, so it can be better reviewed?
(you can send it as a single patch, both lib and test code)
Then, send another patchset with the other 3 patches,
stating that it depends on that patchset.

Thanks,
Pablo

^ permalink raw reply

* Re: [PATCH v2 1/3] eal: add quiet mode to suppress log output to stdout
From: Thomas Monjalon @ 2017-01-05 15:40 UTC (permalink / raw)
  To: Slawomir Mrozowicz, Declan Doherty; +Cc: dev
In-Reply-To: <1483635001-15473-2-git-send-email-slawomirx.mrozowicz@intel.com>

2017-01-05 17:49, Slawomir Mrozowicz:
> Add EAL option to suppresses all log output to stdout.
> 
> Signed-off-by: Declan Doherty <declan.doherty@intel.com>
[...]
>  	       "  --"OPT_LOG_LEVEL"         Set default log level\n"
> +		"  -s, --"OPT_LOG_STDOUT_SILENT" Silent mode, suppresses log "
> +		"output to stdout\n"

How does it behave when the app configure a custom log function which
prints to stdout?

Generally speaking, we should stop adding such options in DPDK and
move this kind of responsibility to the applications (providing some API
and helpers).

^ permalink raw reply

* Re: [PATCH v15 0/8] add Tx preparation
From: Avi Kivity @ 2017-01-05 15:43 UTC (permalink / raw)
  To: Thomas Monjalon, Tomasz Kulasek; +Cc: dev
In-Reply-To: <3356827.uYmqDsGWUk@xps13>

On 01/04/2017 09:41 PM, Thomas Monjalon wrote:
> 2016-12-23 19:40, Tomasz Kulasek:
>> v15 changes:
>>   - marked rte_eth_tx_prepare api as experimental
>>   - improved doxygen comments for nb_seg_max and nb_mtu_seg_max fields
>>   - removed unused "uint8_t tx_prepare" declaration from testpmd
> No you didn't remove this useless declaration. I did it for you.
>
> This feature is now applied! Thanks and congratulations :)


Congrats and thanks!  This will allow us to remove some hacks from seastar.

^ permalink raw reply

* [PATCH v6 00/17] net/i40e: consistent filter API
From: Beilei Xing @ 2017-01-05 15:45 UTC (permalink / raw)
  To: jingjing.wu, helin.zhang; +Cc: dev
In-Reply-To: <1483500187-124740-1-git-send-email-beilei.xing@intel.com>

The patch set depends on Adrien's Generic flow API(rte_flow).

The patches mainly finish following functions:
1) Store and restore all kinds of filters.
2) Parse all kinds of filters.
3) Add flow validate function.
4) Add flow create function.
5) Add flow destroy function.
6) Add flow flush function.

v6 changes:
 Change functions' name to be more readable.
 Add comments for parse_pattern functions to list supported rules.
 Add comments for parse_action functions to list supported actions.
 Add ETHTYPE check when parsing ethertype pattern.

v5 changes:
 Change some local variable name.
 Add removing i40e_flow_list during device unint.
 Fix compile error when gcc compile option isn't '-O0'.

v4 changes:
 Change I40E_TCI_MASK with 0xFFFF to align with testpmd.
 Modidy the stats show when restoring filters.

v3 changes:
 Set the related cause pointer to a non-NULL value when error happens.
 Change return value when error happens.
 Modify filter_del parameter with key.
 Malloc filter after checking when delete a filter.
 Delete meaningless initialization.
 Add return value when there's error.
 Change global variable definition.
 Modify some function declaration.

v2 changes:
 Add i40e_flow.c, all flow ops are implemented in the file.
 Change the whole implementation of all parse flow functions.
 Update error info for all flow ops.
 Add flow_list to store flows created.

Beilei Xing (17):
  net/i40e: store ethertype filter
  net/i40e: store tunnel filter
  net/i40e: store flow director filter
  net/i40e: restore ethertype filter
  net/i40e: restore tunnel filter
  net/i40e: restore flow director filter
  net/i40e: add flow validate function
  net/i40e: parse flow director filter
  net/i40e: parse tunnel filter
  net/i40e: add flow create function
  net/i40e: add flow destroy function
  net/i40e: destroy ethertype filter
  net/i40e: destroy tunnel filter
  net/i40e: destroy flow directory filter
  net/i40e: add flow flush function
  net/i40e: flush ethertype filters
  net/i40e: flush tunnel filters

 drivers/net/i40e/Makefile      |    2 +
 drivers/net/i40e/i40e_ethdev.c |  531 ++++++++++--
 drivers/net/i40e/i40e_ethdev.h |  178 ++++
 drivers/net/i40e/i40e_fdir.c   |  140 ++-
 drivers/net/i40e/i40e_flow.c   | 1850 ++++++++++++++++++++++++++++++++++++++++
 5 files changed, 2630 insertions(+), 71 deletions(-)
 create mode 100644 drivers/net/i40e/i40e_flow.c

-- 
2.5.5

^ permalink raw reply

* [PATCH v6 01/17] net/i40e: store ethertype filter
From: Beilei Xing @ 2017-01-05 15:45 UTC (permalink / raw)
  To: jingjing.wu, helin.zhang; +Cc: dev
In-Reply-To: <1483631170-16681-1-git-send-email-beilei.xing@intel.com>

Currently there's no ethertype filter stored in SW.
This patch stores ethertype filter with cuckoo hash
in SW, also adds protection if an ethertype filter
has been added.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/Makefile      |   1 +
 drivers/net/i40e/i40e_ethdev.c | 166 ++++++++++++++++++++++++++++++++++++++++-
 drivers/net/i40e/i40e_ethdev.h |  31 ++++++++
 3 files changed, 197 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/Makefile b/drivers/net/i40e/Makefile
index 66997b6..11175c4 100644
--- a/drivers/net/i40e/Makefile
+++ b/drivers/net/i40e/Makefile
@@ -117,5 +117,6 @@ DEPDIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += lib/librte_eal lib/librte_ether
 DEPDIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += lib/librte_mempool lib/librte_mbuf
 DEPDIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += lib/librte_net
 DEPDIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += lib/librte_kvargs
+DEPDIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += lib/librte_hash
 
 include $(RTE_SDK)/mk/rte.lib.mk
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 7b8e6c0..bd13780 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -51,6 +51,7 @@
 #include <rte_dev.h>
 #include <rte_eth_ctrl.h>
 #include <rte_tailq.h>
+#include <rte_hash_crc.h>
 
 #include "i40e_logs.h"
 #include "base/i40e_prototype.h"
@@ -461,6 +462,12 @@ static void i40e_set_default_mac_addr(struct rte_eth_dev *dev,
 
 static int i40e_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu);
 
+static int i40e_ethertype_filter_convert(
+	const struct rte_eth_ethertype_filter *input,
+	struct i40e_ethertype_filter *filter);
+static int i40e_sw_ethertype_filter_insert(struct i40e_pf *pf,
+				   struct i40e_ethertype_filter *filter);
+
 static const struct rte_pci_id pci_id_i40e_map[] = {
 	{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_SFP_XL710) },
 	{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_QEMU) },
@@ -939,9 +946,18 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
 	int ret;
 	uint32_t len;
 	uint8_t aq_fail = 0;
+	struct i40e_ethertype_rule *ethertype_rule = &pf->ethertype;
 
 	PMD_INIT_FUNC_TRACE();
 
+	char ethertype_hash_name[RTE_HASH_NAMESIZE];
+	struct rte_hash_parameters ethertype_hash_params = {
+		.name = ethertype_hash_name,
+		.entries = I40E_MAX_ETHERTYPE_FILTER_NUM,
+		.key_len = sizeof(struct i40e_ethertype_filter_input),
+		.hash_func = rte_hash_crc,
+	};
+
 	dev->dev_ops = &i40e_eth_dev_ops;
 	dev->rx_pkt_burst = i40e_recv_pkts;
 	dev->tx_pkt_burst = i40e_xmit_pkts;
@@ -1182,8 +1198,33 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
 		pf->flags &= ~I40E_FLAG_DCB;
 	}
 
+	/* Initialize ethertype filter rule list and hash */
+	TAILQ_INIT(&ethertype_rule->ethertype_list);
+	snprintf(ethertype_hash_name, RTE_HASH_NAMESIZE,
+		 "ethertype_%s", dev->data->name);
+	ethertype_rule->hash_table = rte_hash_create(&ethertype_hash_params);
+	if (!ethertype_rule->hash_table) {
+		PMD_INIT_LOG(ERR, "Failed to create ethertype hash table!");
+		ret = -EINVAL;
+		goto err_ethertype_hash_table_create;
+	}
+	ethertype_rule->hash_map = rte_zmalloc("i40e_ethertype_hash_map",
+				       sizeof(struct i40e_ethertype_filter *) *
+				       I40E_MAX_ETHERTYPE_FILTER_NUM,
+				       0);
+	if (!ethertype_rule->hash_map) {
+		PMD_INIT_LOG(ERR,
+		     "Failed to allocate memory for ethertype hash map!");
+		ret = -ENOMEM;
+		goto err_ethertype_hash_map_alloc;
+	}
+
 	return 0;
 
+err_ethertype_hash_map_alloc:
+	rte_hash_free(ethertype_rule->hash_table);
+err_ethertype_hash_table_create:
+	rte_free(dev->data->mac_addrs);
 err_mac_alloc:
 	i40e_vsi_release(pf->main_vsi);
 err_setup_pf_switch:
@@ -1206,25 +1247,42 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
 static int
 eth_i40e_dev_uninit(struct rte_eth_dev *dev)
 {
+	struct i40e_pf *pf;
 	struct rte_pci_device *pci_dev;
 	struct rte_intr_handle *intr_handle;
 	struct i40e_hw *hw;
 	struct i40e_filter_control_settings settings;
+	struct i40e_ethertype_filter *p_ethertype;
 	int ret;
 	uint8_t aq_fail = 0;
+	struct i40e_ethertype_rule *ethertype_rule;
 
 	PMD_INIT_FUNC_TRACE();
 
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
 		return 0;
 
+	pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 	pci_dev = I40E_DEV_TO_PCI(dev);
 	intr_handle = &pci_dev->intr_handle;
+	ethertype_rule = &pf->ethertype;
 
 	if (hw->adapter_stopped == 0)
 		i40e_dev_close(dev);
 
+	/* Remove all ethertype director rules and hash */
+	if (ethertype_rule->hash_map)
+		rte_free(ethertype_rule->hash_map);
+	if (ethertype_rule->hash_table)
+		rte_hash_free(ethertype_rule->hash_table);
+
+	while ((p_ethertype = TAILQ_FIRST(&ethertype_rule->ethertype_list))) {
+		TAILQ_REMOVE(&ethertype_rule->ethertype_list,
+			     p_ethertype, rules);
+		rte_free(p_ethertype);
+	}
+
 	dev->dev_ops = NULL;
 	dev->rx_pkt_burst = NULL;
 	dev->tx_pkt_burst = NULL;
@@ -7970,6 +8028,82 @@ i40e_hash_filter_ctrl(struct rte_eth_dev *dev,
 	return ret;
 }
 
+/* Convert ethertype filter structure */
+static int
+i40e_ethertype_filter_convert(const struct rte_eth_ethertype_filter *input,
+			      struct i40e_ethertype_filter *filter)
+{
+	rte_memcpy(&filter->input.mac_addr, &input->mac_addr, ETHER_ADDR_LEN);
+	filter->input.ether_type = input->ether_type;
+	filter->flags = input->flags;
+	filter->queue = input->queue;
+
+	return 0;
+}
+
+/* Check if there exists the ehtertype filter */
+struct i40e_ethertype_filter *
+i40e_sw_ethertype_filter_lookup(struct i40e_ethertype_rule *ethertype_rule,
+				const struct i40e_ethertype_filter_input *input)
+{
+	int ret;
+
+	ret = rte_hash_lookup(ethertype_rule->hash_table, (const void *)input);
+	if (ret < 0)
+		return NULL;
+
+	return ethertype_rule->hash_map[ret];
+}
+
+/* Add ethertype filter in SW list */
+static int
+i40e_sw_ethertype_filter_insert(struct i40e_pf *pf,
+				struct i40e_ethertype_filter *filter)
+{
+	struct i40e_ethertype_rule *rule = &pf->ethertype;
+	int ret;
+
+	ret = rte_hash_add_key(rule->hash_table, &filter->input);
+	if (ret < 0) {
+		PMD_DRV_LOG(ERR,
+			    "Failed to insert ethertype filter"
+			    " to hash table %d!",
+			    ret);
+		return ret;
+	}
+	rule->hash_map[ret] = filter;
+
+	TAILQ_INSERT_TAIL(&rule->ethertype_list, filter, rules);
+
+	return 0;
+}
+
+/* Delete ethertype filter in SW list */
+int
+i40e_sw_ethertype_filter_del(struct i40e_pf *pf,
+			     struct i40e_ethertype_filter_input *input)
+{
+	struct i40e_ethertype_rule *rule = &pf->ethertype;
+	struct i40e_ethertype_filter *filter;
+	int ret;
+
+	ret = rte_hash_del_key(rule->hash_table, input);
+	if (ret < 0) {
+		PMD_DRV_LOG(ERR,
+			    "Failed to delete ethertype filter"
+			    " to hash table %d!",
+			    ret);
+		return ret;
+	}
+	filter = rule->hash_map[ret];
+	rule->hash_map[ret] = NULL;
+
+	TAILQ_REMOVE(&rule->ethertype_list, filter, rules);
+	rte_free(filter);
+
+	return 0;
+}
+
 /*
  * Configure ethertype filter, which can director packet by filtering
  * with mac address and ether_type or only ether_type
@@ -7980,6 +8114,9 @@ i40e_ethertype_filter_set(struct i40e_pf *pf,
 			bool add)
 {
 	struct i40e_hw *hw = I40E_PF_TO_HW(pf);
+	struct i40e_ethertype_rule *ethertype_rule = &pf->ethertype;
+	struct i40e_ethertype_filter *ethertype_filter, *node;
+	struct i40e_ethertype_filter check_filter;
 	struct i40e_control_filter_stats stats;
 	uint16_t flags = 0;
 	int ret;
@@ -7998,6 +8135,21 @@ i40e_ethertype_filter_set(struct i40e_pf *pf,
 		PMD_DRV_LOG(WARNING, "filter vlan ether_type in first tag is"
 			" not supported.");
 
+	/* Check if there is the filter in SW list */
+	memset(&check_filter, 0, sizeof(check_filter));
+	i40e_ethertype_filter_convert(filter, &check_filter);
+	node = i40e_sw_ethertype_filter_lookup(ethertype_rule,
+					       &check_filter.input);
+	if (add && node) {
+		PMD_DRV_LOG(ERR, "Conflict with existing ethertype rules!");
+		return -EINVAL;
+	}
+
+	if (!add && !node) {
+		PMD_DRV_LOG(ERR, "There's no corresponding ethertype filter!");
+		return -EINVAL;
+	}
+
 	if (!(filter->flags & RTE_ETHTYPE_FLAGS_MAC))
 		flags |= I40E_AQC_ADD_CONTROL_PACKET_FLAGS_IGNORE_MAC;
 	if (filter->flags & RTE_ETHTYPE_FLAGS_DROP)
@@ -8018,7 +8170,19 @@ i40e_ethertype_filter_set(struct i40e_pf *pf,
 			 stats.mac_etype_free, stats.etype_free);
 	if (ret < 0)
 		return -ENOSYS;
-	return 0;
+
+	/* Add or delete a filter in SW list */
+	if (add) {
+		ethertype_filter = rte_zmalloc("ethertype_filter",
+				       sizeof(*ethertype_filter), 0);
+		rte_memcpy(ethertype_filter, &check_filter,
+			   sizeof(check_filter));
+		ret = i40e_sw_ethertype_filter_insert(pf, ethertype_filter);
+	} else {
+		ret = i40e_sw_ethertype_filter_del(pf, &node->input);
+	}
+
+	return ret;
 }
 
 /*
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index b0363f9..dbfcf9f 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -37,6 +37,7 @@
 #include <rte_eth_ctrl.h>
 #include <rte_time.h>
 #include <rte_kvargs.h>
+#include <rte_hash.h>
 
 #define I40E_VLAN_TAG_SIZE        4
 
@@ -396,6 +397,30 @@ struct i40e_fdir_info {
 	struct i40e_fdir_flex_mask flex_mask[I40E_FILTER_PCTYPE_MAX];
 };
 
+/* Ethertype filter number HW supports */
+#define I40E_MAX_ETHERTYPE_FILTER_NUM 768
+
+/* Ethertype filter struct */
+struct i40e_ethertype_filter_input {
+	struct ether_addr mac_addr;   /* Mac address to match */
+	uint16_t ether_type;          /* Ether type to match */
+};
+
+struct i40e_ethertype_filter {
+	TAILQ_ENTRY(i40e_ethertype_filter) rules;
+	struct i40e_ethertype_filter_input input;
+	uint16_t flags;              /* Flags from RTE_ETHTYPE_FLAGS_* */
+	uint16_t queue;              /* Queue assigned to when match */
+};
+
+TAILQ_HEAD(i40e_ethertype_filter_list, i40e_ethertype_filter);
+
+struct i40e_ethertype_rule {
+	struct i40e_ethertype_filter_list ethertype_list;
+	struct i40e_ethertype_filter  **hash_map;
+	struct rte_hash *hash_table;
+};
+
 #define I40E_MIRROR_MAX_ENTRIES_PER_RULE   64
 #define I40E_MAX_MIRROR_RULES           64
 /*
@@ -466,6 +491,7 @@ struct i40e_pf {
 	struct i40e_vmdq_info *vmdq;
 
 	struct i40e_fdir_info fdir; /* flow director info */
+	struct i40e_ethertype_rule ethertype; /* Ethertype filter rule */
 	struct i40e_fc_conf fc_conf; /* Flow control conf */
 	struct i40e_mirror_rule_list mirror_list;
 	uint16_t nb_mirror_rule;   /* The number of mirror rules */
@@ -616,6 +642,11 @@ void i40e_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
 	struct rte_eth_rxq_info *qinfo);
 void i40e_txq_info_get(struct rte_eth_dev *dev, uint16_t queue_id,
 	struct rte_eth_txq_info *qinfo);
+struct i40e_ethertype_filter *
+i40e_sw_ethertype_filter_lookup(struct i40e_ethertype_rule *ethertype_rule,
+			const struct i40e_ethertype_filter_input *input);
+int i40e_sw_ethertype_filter_del(struct i40e_pf *pf,
+				 struct i40e_ethertype_filter_input *input);
 
 #define I40E_DEV_TO_PCI(eth_dev) \
 	RTE_DEV_TO_PCI((eth_dev)->device)
-- 
2.5.5

^ permalink raw reply related

* [PATCH v6 02/17] net/i40e: store tunnel filter
From: Beilei Xing @ 2017-01-05 15:45 UTC (permalink / raw)
  To: jingjing.wu, helin.zhang; +Cc: dev
In-Reply-To: <1483631170-16681-1-git-send-email-beilei.xing@intel.com>

Currently there's no tunnel filter stored in SW.
This patch stores tunnel filter in SW with cuckoo
hash, also adds protection if a tunnel filter has
been added.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 169 ++++++++++++++++++++++++++++++++++++++++-
 drivers/net/i40e/i40e_ethdev.h |  32 ++++++++
 2 files changed, 198 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index bd13780..fc2d98a 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -468,6 +468,12 @@ static int i40e_ethertype_filter_convert(
 static int i40e_sw_ethertype_filter_insert(struct i40e_pf *pf,
 				   struct i40e_ethertype_filter *filter);
 
+static int i40e_tunnel_filter_convert(
+	struct i40e_aqc_add_remove_cloud_filters_element_data *cld_filter,
+	struct i40e_tunnel_filter *tunnel_filter);
+static int i40e_sw_tunnel_filter_insert(struct i40e_pf *pf,
+				struct i40e_tunnel_filter *tunnel_filter);
+
 static const struct rte_pci_id pci_id_i40e_map[] = {
 	{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_SFP_XL710) },
 	{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_QEMU) },
@@ -947,6 +953,7 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
 	uint32_t len;
 	uint8_t aq_fail = 0;
 	struct i40e_ethertype_rule *ethertype_rule = &pf->ethertype;
+	struct i40e_tunnel_rule *tunnel_rule = &pf->tunnel;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -958,6 +965,14 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
 		.hash_func = rte_hash_crc,
 	};
 
+	char tunnel_hash_name[RTE_HASH_NAMESIZE];
+	struct rte_hash_parameters tunnel_hash_params = {
+		.name = tunnel_hash_name,
+		.entries = I40E_MAX_TUNNEL_FILTER_NUM,
+		.key_len = sizeof(struct i40e_tunnel_filter_input),
+		.hash_func = rte_hash_crc,
+	};
+
 	dev->dev_ops = &i40e_eth_dev_ops;
 	dev->rx_pkt_burst = i40e_recv_pkts;
 	dev->tx_pkt_burst = i40e_xmit_pkts;
@@ -1219,8 +1234,33 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
 		goto err_ethertype_hash_map_alloc;
 	}
 
+	/* Initialize tunnel filter rule list and hash */
+	TAILQ_INIT(&tunnel_rule->tunnel_list);
+	snprintf(tunnel_hash_name, RTE_HASH_NAMESIZE,
+		 "tunnel_%s", dev->data->name);
+	tunnel_rule->hash_table = rte_hash_create(&tunnel_hash_params);
+	if (!tunnel_rule->hash_table) {
+		PMD_INIT_LOG(ERR, "Failed to create tunnel hash table!");
+		ret = -EINVAL;
+		goto err_tunnel_hash_table_create;
+	}
+	tunnel_rule->hash_map = rte_zmalloc("i40e_tunnel_hash_map",
+				    sizeof(struct i40e_tunnel_filter *) *
+				    I40E_MAX_TUNNEL_FILTER_NUM,
+				    0);
+	if (!tunnel_rule->hash_map) {
+		PMD_INIT_LOG(ERR,
+			     "Failed to allocate memory for tunnel hash map!");
+		ret = -ENOMEM;
+		goto err_tunnel_hash_map_alloc;
+	}
+
 	return 0;
 
+err_tunnel_hash_map_alloc:
+	rte_hash_free(tunnel_rule->hash_table);
+err_tunnel_hash_table_create:
+	rte_free(ethertype_rule->hash_map);
 err_ethertype_hash_map_alloc:
 	rte_hash_free(ethertype_rule->hash_table);
 err_ethertype_hash_table_create:
@@ -1253,9 +1293,11 @@ eth_i40e_dev_uninit(struct rte_eth_dev *dev)
 	struct i40e_hw *hw;
 	struct i40e_filter_control_settings settings;
 	struct i40e_ethertype_filter *p_ethertype;
+	struct i40e_tunnel_filter *p_tunnel;
 	int ret;
 	uint8_t aq_fail = 0;
 	struct i40e_ethertype_rule *ethertype_rule;
+	struct i40e_tunnel_rule *tunnel_rule;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -1267,6 +1309,7 @@ eth_i40e_dev_uninit(struct rte_eth_dev *dev)
 	pci_dev = I40E_DEV_TO_PCI(dev);
 	intr_handle = &pci_dev->intr_handle;
 	ethertype_rule = &pf->ethertype;
+	tunnel_rule = &pf->tunnel;
 
 	if (hw->adapter_stopped == 0)
 		i40e_dev_close(dev);
@@ -1283,6 +1326,17 @@ eth_i40e_dev_uninit(struct rte_eth_dev *dev)
 		rte_free(p_ethertype);
 	}
 
+	/* Remove all tunnel director rules and hash */
+	if (tunnel_rule->hash_map)
+		rte_free(tunnel_rule->hash_map);
+	if (tunnel_rule->hash_table)
+		rte_hash_free(tunnel_rule->hash_table);
+
+	while ((p_tunnel = TAILQ_FIRST(&tunnel_rule->tunnel_list))) {
+		TAILQ_REMOVE(&tunnel_rule->tunnel_list, p_tunnel, rules);
+		rte_free(p_tunnel);
+	}
+
 	dev->dev_ops = NULL;
 	dev->rx_pkt_burst = NULL;
 	dev->tx_pkt_burst = NULL;
@@ -6493,6 +6547,85 @@ i40e_dev_get_filter_type(uint16_t filter_type, uint16_t *flag)
 	return 0;
 }
 
+/* Convert tunnel filter structure */
+static int
+i40e_tunnel_filter_convert(struct i40e_aqc_add_remove_cloud_filters_element_data
+			   *cld_filter,
+			   struct i40e_tunnel_filter *tunnel_filter)
+{
+	ether_addr_copy((struct ether_addr *)&cld_filter->outer_mac,
+			(struct ether_addr *)&tunnel_filter->input.outer_mac);
+	ether_addr_copy((struct ether_addr *)&cld_filter->inner_mac,
+			(struct ether_addr *)&tunnel_filter->input.inner_mac);
+	tunnel_filter->input.inner_vlan = cld_filter->inner_vlan;
+	tunnel_filter->input.flags = cld_filter->flags;
+	tunnel_filter->input.tenant_id = cld_filter->tenant_id;
+	tunnel_filter->queue = cld_filter->queue_number;
+
+	return 0;
+}
+
+/* Check if there exists the tunnel filter */
+struct i40e_tunnel_filter *
+i40e_sw_tunnel_filter_lookup(struct i40e_tunnel_rule *tunnel_rule,
+			     const struct i40e_tunnel_filter_input *input)
+{
+	int ret;
+
+	ret = rte_hash_lookup(tunnel_rule->hash_table, (const void *)input);
+	if (ret < 0)
+		return NULL;
+
+	return tunnel_rule->hash_map[ret];
+}
+
+/* Add a tunnel filter into the SW list */
+static int
+i40e_sw_tunnel_filter_insert(struct i40e_pf *pf,
+			     struct i40e_tunnel_filter *tunnel_filter)
+{
+	struct i40e_tunnel_rule *rule = &pf->tunnel;
+	int ret;
+
+	ret = rte_hash_add_key(rule->hash_table, &tunnel_filter->input);
+	if (ret < 0) {
+		PMD_DRV_LOG(ERR,
+			    "Failed to insert tunnel filter to hash table %d!",
+			    ret);
+		return ret;
+	}
+	rule->hash_map[ret] = tunnel_filter;
+
+	TAILQ_INSERT_TAIL(&rule->tunnel_list, tunnel_filter, rules);
+
+	return 0;
+}
+
+/* Delete a tunnel filter from the SW list */
+int
+i40e_sw_tunnel_filter_del(struct i40e_pf *pf,
+			  struct i40e_tunnel_filter_input *input)
+{
+	struct i40e_tunnel_rule *rule = &pf->tunnel;
+	struct i40e_tunnel_filter *tunnel_filter;
+	int ret;
+
+	ret = rte_hash_del_key(rule->hash_table, input);
+	if (ret < 0) {
+		PMD_DRV_LOG(ERR,
+			    "Failed to delete tunnel filter to hash table %d!",
+			    ret);
+		return ret;
+	}
+	tunnel_filter = rule->hash_map[ret];
+	rule->hash_map[ret] = NULL;
+
+	TAILQ_REMOVE(&rule->tunnel_list, tunnel_filter, rules);
+	rte_free(tunnel_filter);
+
+	return 0;
+}
+
 static int
 i40e_dev_tunnel_filter_set(struct i40e_pf *pf,
 			struct rte_eth_tunnel_filter_conf *tunnel_filter,
@@ -6508,6 +6641,9 @@ i40e_dev_tunnel_filter_set(struct i40e_pf *pf,
 	struct i40e_vsi *vsi = pf->main_vsi;
 	struct i40e_aqc_add_remove_cloud_filters_element_data  *cld_filter;
 	struct i40e_aqc_add_remove_cloud_filters_element_data  *pfilter;
+	struct i40e_tunnel_rule *tunnel_rule = &pf->tunnel;
+	struct i40e_tunnel_filter *tunnel, *node;
+	struct i40e_tunnel_filter check_filter; /* Check if filter exists */
 
 	cld_filter = rte_zmalloc("tunnel_filter",
 		sizeof(struct i40e_aqc_add_remove_cloud_filters_element_data),
@@ -6570,11 +6706,38 @@ i40e_dev_tunnel_filter_set(struct i40e_pf *pf,
 	pfilter->tenant_id = rte_cpu_to_le_32(tunnel_filter->tenant_id);
 	pfilter->queue_number = rte_cpu_to_le_16(tunnel_filter->queue_id);
 
-	if (add)
+	/* Check if there is the filter in SW list */
+	memset(&check_filter, 0, sizeof(check_filter));
+	i40e_tunnel_filter_convert(cld_filter, &check_filter);
+	node = i40e_sw_tunnel_filter_lookup(tunnel_rule, &check_filter.input);
+	if (add && node) {
+		PMD_DRV_LOG(ERR, "Conflict with existing tunnel rules!");
+		return -EINVAL;
+	}
+
+	if (!add && !node) {
+		PMD_DRV_LOG(ERR, "There's no corresponding tunnel filter!");
+		return -EINVAL;
+	}
+
+	if (add) {
 		ret = i40e_aq_add_cloud_filters(hw, vsi->seid, cld_filter, 1);
-	else
+		if (ret < 0) {
+			PMD_DRV_LOG(ERR, "Failed to add a tunnel filter.");
+			return ret;
+		}
+		tunnel = rte_zmalloc("tunnel_filter", sizeof(*tunnel), 0);
+		rte_memcpy(tunnel, &check_filter, sizeof(check_filter));
+		ret = i40e_sw_tunnel_filter_insert(pf, tunnel);
+	} else {
 		ret = i40e_aq_remove_cloud_filters(hw, vsi->seid,
-						cld_filter, 1);
+						   cld_filter, 1);
+		if (ret < 0) {
+			PMD_DRV_LOG(ERR, "Failed to delete a tunnel filter.");
+			return ret;
+		}
+		ret = i40e_sw_tunnel_filter_del(pf, &node->input);
+	}
 
 	rte_free(cld_filter);
 	return ret;
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index dbfcf9f..349e865 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -421,6 +421,32 @@ struct i40e_ethertype_rule {
 	struct rte_hash *hash_table;
 };
 
+/* Tunnel filter number HW supports */
+#define I40E_MAX_TUNNEL_FILTER_NUM 400
+
+/* Tunnel filter struct */
+struct i40e_tunnel_filter_input {
+	uint8_t outer_mac[6];    /* Outer mac address to match */
+	uint8_t inner_mac[6];    /* Inner mac address to match */
+	uint16_t inner_vlan;     /* Inner vlan address to match */
+	uint16_t flags;          /* Filter type flag */
+	uint32_t tenant_id;      /* Tenant id to match */
+};
+
+struct i40e_tunnel_filter {
+	TAILQ_ENTRY(i40e_tunnel_filter) rules;
+	struct i40e_tunnel_filter_input input;
+	uint16_t queue; /* Queue assigned to when match */
+};
+
+TAILQ_HEAD(i40e_tunnel_filter_list, i40e_tunnel_filter);
+
+struct i40e_tunnel_rule {
+	struct i40e_tunnel_filter_list tunnel_list;
+	struct i40e_tunnel_filter  **hash_map;
+	struct rte_hash *hash_table;
+};
+
 #define I40E_MIRROR_MAX_ENTRIES_PER_RULE   64
 #define I40E_MAX_MIRROR_RULES           64
 /*
@@ -492,6 +518,7 @@ struct i40e_pf {
 
 	struct i40e_fdir_info fdir; /* flow director info */
 	struct i40e_ethertype_rule ethertype; /* Ethertype filter rule */
+	struct i40e_tunnel_rule tunnel; /* Tunnel filter rule */
 	struct i40e_fc_conf fc_conf; /* Flow control conf */
 	struct i40e_mirror_rule_list mirror_list;
 	uint16_t nb_mirror_rule;   /* The number of mirror rules */
@@ -647,6 +674,11 @@ i40e_sw_ethertype_filter_lookup(struct i40e_ethertype_rule *ethertype_rule,
 			const struct i40e_ethertype_filter_input *input);
 int i40e_sw_ethertype_filter_del(struct i40e_pf *pf,
 				 struct i40e_ethertype_filter_input *input);
+struct i40e_tunnel_filter *
+i40e_sw_tunnel_filter_lookup(struct i40e_tunnel_rule *tunnel_rule,
+			     const struct i40e_tunnel_filter_input *input);
+int i40e_sw_tunnel_filter_del(struct i40e_pf *pf,
+			      struct i40e_tunnel_filter_input *input);
 
 #define I40E_DEV_TO_PCI(eth_dev) \
 	RTE_DEV_TO_PCI((eth_dev)->device)
-- 
2.5.5

^ permalink raw reply related

* [PATCH v6 03/17] net/i40e: store flow director filter
From: Beilei Xing @ 2017-01-05 15:45 UTC (permalink / raw)
  To: jingjing.wu, helin.zhang; +Cc: dev
In-Reply-To: <1483631170-16681-1-git-send-email-beilei.xing@intel.com>

Currently there's no flow director filter stored in SW. This
patch stores flow director filters in SW with cuckoo hash,
also adds protection if a flow director filter has been added.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c |  48 +++++++++++++++++++
 drivers/net/i40e/i40e_ethdev.h |  14 ++++++
 drivers/net/i40e/i40e_fdir.c   | 105 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 167 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index fc2d98a..3212c76 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -954,6 +954,7 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
 	uint8_t aq_fail = 0;
 	struct i40e_ethertype_rule *ethertype_rule = &pf->ethertype;
 	struct i40e_tunnel_rule *tunnel_rule = &pf->tunnel;
+	struct i40e_fdir_info *fdir_info = &pf->fdir;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -973,6 +974,14 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
 		.hash_func = rte_hash_crc,
 	};
 
+	char fdir_hash_name[RTE_HASH_NAMESIZE];
+	struct rte_hash_parameters fdir_hash_params = {
+		.name = fdir_hash_name,
+		.entries = I40E_MAX_FDIR_FILTER_NUM,
+		.key_len = sizeof(struct rte_eth_fdir_input),
+		.hash_func = rte_hash_crc,
+	};
+
 	dev->dev_ops = &i40e_eth_dev_ops;
 	dev->rx_pkt_burst = i40e_recv_pkts;
 	dev->tx_pkt_burst = i40e_xmit_pkts;
@@ -1255,8 +1264,33 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
 		goto err_tunnel_hash_map_alloc;
 	}
 
+	/* Initialize flow director filter rule list and hash */
+	TAILQ_INIT(&fdir_info->fdir_list);
+	snprintf(fdir_hash_name, RTE_HASH_NAMESIZE,
+		 "fdir_%s", dev->data->name);
+	fdir_info->hash_table = rte_hash_create(&fdir_hash_params);
+	if (!fdir_info->hash_table) {
+		PMD_INIT_LOG(ERR, "Failed to create fdir hash table!");
+		ret = -EINVAL;
+		goto err_fdir_hash_table_create;
+	}
+	fdir_info->hash_map = rte_zmalloc("i40e_fdir_hash_map",
+					  sizeof(struct i40e_fdir_filter *) *
+					  I40E_MAX_FDIR_FILTER_NUM,
+					  0);
+	if (!fdir_info->hash_map) {
+		PMD_INIT_LOG(ERR,
+			     "Failed to allocate memory for fdir hash map!");
+		ret = -ENOMEM;
+		goto err_fdir_hash_map_alloc;
+	}
+
 	return 0;
 
+err_fdir_hash_map_alloc:
+	rte_hash_free(fdir_info->hash_table);
+err_fdir_hash_table_create:
+	rte_free(tunnel_rule->hash_map);
 err_tunnel_hash_map_alloc:
 	rte_hash_free(tunnel_rule->hash_table);
 err_tunnel_hash_table_create:
@@ -1294,10 +1328,12 @@ eth_i40e_dev_uninit(struct rte_eth_dev *dev)
 	struct i40e_filter_control_settings settings;
 	struct i40e_ethertype_filter *p_ethertype;
 	struct i40e_tunnel_filter *p_tunnel;
+	struct i40e_fdir_filter *p_fdir;
 	int ret;
 	uint8_t aq_fail = 0;
 	struct i40e_ethertype_rule *ethertype_rule;
 	struct i40e_tunnel_rule *tunnel_rule;
+	struct i40e_fdir_info *fdir_info;
 
 	PMD_INIT_FUNC_TRACE();
 
@@ -1310,6 +1346,7 @@ eth_i40e_dev_uninit(struct rte_eth_dev *dev)
 	intr_handle = &pci_dev->intr_handle;
 	ethertype_rule = &pf->ethertype;
 	tunnel_rule = &pf->tunnel;
+	fdir_info = &pf->fdir;
 
 	if (hw->adapter_stopped == 0)
 		i40e_dev_close(dev);
@@ -1337,6 +1374,17 @@ eth_i40e_dev_uninit(struct rte_eth_dev *dev)
 		rte_free(p_tunnel);
 	}
 
+	/* Remove all flow director rules and hash */
+	if (fdir_info->hash_map)
+		rte_free(fdir_info->hash_map);
+	if (fdir_info->hash_table)
+		rte_hash_free(fdir_info->hash_table);
+
+	while ((p_fdir = TAILQ_FIRST(&fdir_info->fdir_list))) {
+		TAILQ_REMOVE(&fdir_info->fdir_list, p_fdir, rules);
+		rte_free(p_fdir);
+	}
+
 	dev->dev_ops = NULL;
 	dev->rx_pkt_burst = NULL;
 	dev->tx_pkt_burst = NULL;
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index 349e865..43a3dbb 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -377,6 +377,14 @@ struct i40e_fdir_flex_mask {
 };
 
 #define I40E_FILTER_PCTYPE_MAX 64
+#define I40E_MAX_FDIR_FILTER_NUM (1024 * 8)
+
+struct i40e_fdir_filter {
+	TAILQ_ENTRY(i40e_fdir_filter) rules;
+	struct rte_eth_fdir_filter fdir;
+};
+
+TAILQ_HEAD(i40e_fdir_filter_list, i40e_fdir_filter);
 /*
  *  A structure used to define fields of a FDIR related info.
  */
@@ -395,6 +403,10 @@ struct i40e_fdir_info {
 	 */
 	struct i40e_fdir_flex_pit flex_set[I40E_MAX_FLXPLD_LAYER * I40E_MAX_FLXPLD_FIED];
 	struct i40e_fdir_flex_mask flex_mask[I40E_FILTER_PCTYPE_MAX];
+
+	struct i40e_fdir_filter_list fdir_list;
+	struct i40e_fdir_filter **hash_map;
+	struct rte_hash *hash_table;
 };
 
 /* Ethertype filter number HW supports */
@@ -674,6 +686,8 @@ i40e_sw_ethertype_filter_lookup(struct i40e_ethertype_rule *ethertype_rule,
 			const struct i40e_ethertype_filter_input *input);
 int i40e_sw_ethertype_filter_del(struct i40e_pf *pf,
 				 struct i40e_ethertype_filter_input *input);
+int i40e_sw_fdir_filter_del(struct i40e_pf *pf,
+			    struct rte_eth_fdir_input *input);
 struct i40e_tunnel_filter *
 i40e_sw_tunnel_filter_lookup(struct i40e_tunnel_rule *tunnel_rule,
 			     const struct i40e_tunnel_filter_input *input);
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 335bf15..4a29b37 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -121,6 +121,14 @@ static int i40e_fdir_filter_programming(struct i40e_pf *pf,
 			bool add);
 static int i40e_fdir_flush(struct rte_eth_dev *dev);
 
+static int i40e_fdir_filter_convert(const struct rte_eth_fdir_filter *input,
+			 struct i40e_fdir_filter *filter);
+static struct i40e_fdir_filter *
+i40e_sw_fdir_filter_lookup(struct i40e_fdir_info *fdir_info,
+			const struct rte_eth_fdir_input *input);
+static int i40e_sw_fdir_filter_insert(struct i40e_pf *pf,
+				   struct i40e_fdir_filter *filter);
+
 static int
 i40e_fdir_rx_queue_init(struct i40e_rx_queue *rxq)
 {
@@ -1017,6 +1025,74 @@ i40e_check_fdir_programming_status(struct i40e_rx_queue *rxq)
 	return ret;
 }
 
+static int
+i40e_fdir_filter_convert(const struct rte_eth_fdir_filter *input,
+			 struct i40e_fdir_filter *filter)
+{
+	rte_memcpy(&filter->fdir, input, sizeof(struct rte_eth_fdir_filter));
+	return 0;
+}
+
+/* Check if there exists the flow director filter */
+static struct i40e_fdir_filter *
+i40e_sw_fdir_filter_lookup(struct i40e_fdir_info *fdir_info,
+			const struct rte_eth_fdir_input *input)
+{
+	int ret;
+
+	ret = rte_hash_lookup(fdir_info->hash_table, (const void *)input);
+	if (ret < 0)
+		return NULL;
+
+	return fdir_info->hash_map[ret];
+}
+
+/* Add a flow director filter into the SW list */
+static int
+i40e_sw_fdir_filter_insert(struct i40e_pf *pf, struct i40e_fdir_filter *filter)
+{
+	struct i40e_fdir_info *fdir_info = &pf->fdir;
+	int ret;
+
+	ret = rte_hash_add_key(fdir_info->hash_table,
+			       &filter->fdir.input);
+	if (ret < 0) {
+		PMD_DRV_LOG(ERR,
+			    "Failed to insert fdir filter to hash table %d!",
+			    ret);
+		return ret;
+	}
+	fdir_info->hash_map[ret] = filter;
+
+	TAILQ_INSERT_TAIL(&fdir_info->fdir_list, filter, rules);
+
+	return 0;
+}
+
+/* Delete a flow director filter from the SW list */
+int
+i40e_sw_fdir_filter_del(struct i40e_pf *pf, struct rte_eth_fdir_input *input)
+{
+	struct i40e_fdir_info *fdir_info = &pf->fdir;
+	struct i40e_fdir_filter *filter;
+	int ret;
+
+	ret = rte_hash_del_key(fdir_info->hash_table, input);
+	if (ret < 0) {
+		PMD_DRV_LOG(ERR,
+			    "Failed to delete fdir filter to hash table %d!",
+			    ret);
+		return ret;
+	}
+	filter = fdir_info->hash_map[ret];
+	fdir_info->hash_map[ret] = NULL;
+
+	TAILQ_REMOVE(&fdir_info->fdir_list, filter, rules);
+	rte_free(filter);
+
+	return 0;
+}
+
 /*
  * i40e_add_del_fdir_filter - add or remove a flow director filter.
  * @pf: board private structure
@@ -1032,6 +1108,9 @@ i40e_add_del_fdir_filter(struct rte_eth_dev *dev,
 	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
 	unsigned char *pkt = (unsigned char *)pf->fdir.prg_pkt;
 	enum i40e_filter_pctype pctype;
+	struct i40e_fdir_info *fdir_info = &pf->fdir;
+	struct i40e_fdir_filter *fdir_filter, *node;
+	struct i40e_fdir_filter check_filter; /* Check if the filter exists */
 	int ret = 0;
 
 	if (dev->data->dev_conf.fdir_conf.mode != RTE_FDIR_MODE_PERFECT) {
@@ -1054,6 +1133,22 @@ i40e_add_del_fdir_filter(struct rte_eth_dev *dev,
 		return -EINVAL;
 	}
 
+	/* Check if there is the filter in SW list */
+	memset(&check_filter, 0, sizeof(check_filter));
+	i40e_fdir_filter_convert(filter, &check_filter);
+	node = i40e_sw_fdir_filter_lookup(fdir_info, &check_filter.fdir.input);
+	if (add && node) {
+		PMD_DRV_LOG(ERR,
+			    "Conflict with existing flow director rules!");
+		return -EINVAL;
+	}
+
+	if (!add && !node) {
+		PMD_DRV_LOG(ERR,
+			    "There's no corresponding flow firector filter!");
+		return -EINVAL;
+	}
+
 	memset(pkt, 0, I40E_FDIR_PKT_LEN);
 
 	ret = i40e_fdir_construct_pkt(pf, &filter->input, pkt);
@@ -1077,6 +1172,16 @@ i40e_add_del_fdir_filter(struct rte_eth_dev *dev,
 			    pctype);
 		return ret;
 	}
+
+	if (add) {
+		fdir_filter = rte_zmalloc("fdir_filter",
+					  sizeof(*fdir_filter), 0);
+		rte_memcpy(fdir_filter, &check_filter, sizeof(check_filter));
+		ret = i40e_sw_fdir_filter_insert(pf, fdir_filter);
+	} else {
+		ret = i40e_sw_fdir_filter_del(pf, &node->fdir.input);
+	}
+
 	return ret;
 }
 
-- 
2.5.5

^ permalink raw reply related

* [PATCH v6 04/17] net/i40e: restore ethertype filter
From: Beilei Xing @ 2017-01-05 15:45 UTC (permalink / raw)
  To: jingjing.wu, helin.zhang; +Cc: dev
In-Reply-To: <1483631170-16681-1-git-send-email-beilei.xing@intel.com>

Add support of restoring ethertype filter in case filter
dropped accidentally, as all filters need to be added and
removed by user obviously for generic filter API.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 44 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 3212c76..6e6fc55 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -474,6 +474,9 @@ static int i40e_tunnel_filter_convert(
 static int i40e_sw_tunnel_filter_insert(struct i40e_pf *pf,
 				struct i40e_tunnel_filter *tunnel_filter);
 
+static void i40e_ethertype_filter_restore(struct i40e_pf *pf);
+static void i40e_filter_restore(struct i40e_pf *pf);
+
 static const struct rte_pci_id pci_id_i40e_map[] = {
 	{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_SFP_XL710) },
 	{ RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_QEMU) },
@@ -1964,6 +1967,8 @@ i40e_dev_start(struct rte_eth_dev *dev)
 	/* enable uio intr after callback register */
 	rte_intr_enable(intr_handle);
 
+	i40e_filter_restore(pf);
+
 	return I40E_SUCCESS;
 
 err_up:
@@ -10089,3 +10094,42 @@ i40e_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu)
 
 	return ret;
 }
+
+/* Restore ethertype filter */
+static void
+i40e_ethertype_filter_restore(struct i40e_pf *pf)
+{
+	struct i40e_hw *hw = I40E_PF_TO_HW(pf);
+	struct i40e_ethertype_filter_list
+		*ethertype_list = &pf->ethertype.ethertype_list;
+	struct i40e_ethertype_filter *f;
+	struct i40e_control_filter_stats stats;
+	uint16_t flags;
+
+	TAILQ_FOREACH(f, ethertype_list, rules) {
+		flags = 0;
+		if (!(f->flags & RTE_ETHTYPE_FLAGS_MAC))
+			flags |= I40E_AQC_ADD_CONTROL_PACKET_FLAGS_IGNORE_MAC;
+		if (f->flags & RTE_ETHTYPE_FLAGS_DROP)
+			flags |= I40E_AQC_ADD_CONTROL_PACKET_FLAGS_DROP;
+		flags |= I40E_AQC_ADD_CONTROL_PACKET_FLAGS_TO_QUEUE;
+
+		memset(&stats, 0, sizeof(stats));
+		i40e_aq_add_rem_control_packet_filter(hw,
+					    f->input.mac_addr.addr_bytes,
+					    f->input.ether_type,
+					    flags, pf->main_vsi->seid,
+					    f->queue, 1, &stats, NULL);
+	}
+	PMD_DRV_LOG(INFO, "Ethertype filter:"
+		    " mac_etype_used = %u, etype_used = %u,"
+		    " mac_etype_free = %u, etype_free = %u\n",
+		    stats.mac_etype_used, stats.etype_used,
+		    stats.mac_etype_free, stats.etype_free);
+}
+
+static void
+i40e_filter_restore(struct i40e_pf *pf)
+{
+	i40e_ethertype_filter_restore(pf);
+}
-- 
2.5.5

^ permalink raw reply related

* [PATCH v6 05/17] net/i40e: restore tunnel filter
From: Beilei Xing @ 2017-01-05 15:45 UTC (permalink / raw)
  To: jingjing.wu, helin.zhang; +Cc: dev
In-Reply-To: <1483631170-16681-1-git-send-email-beilei.xing@intel.com>

Add support of restoring tunnel filter.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 6e6fc55..a636dc0 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -475,6 +475,7 @@ static int i40e_sw_tunnel_filter_insert(struct i40e_pf *pf,
 				struct i40e_tunnel_filter *tunnel_filter);
 
 static void i40e_ethertype_filter_restore(struct i40e_pf *pf);
+static void i40e_tunnel_filter_restore(struct i40e_pf *pf);
 static void i40e_filter_restore(struct i40e_pf *pf);
 
 static const struct rte_pci_id pci_id_i40e_map[] = {
@@ -10128,8 +10129,28 @@ i40e_ethertype_filter_restore(struct i40e_pf *pf)
 		    stats.mac_etype_free, stats.etype_free);
 }
 
+/* Restore tunnel filter */
+static void
+i40e_tunnel_filter_restore(struct i40e_pf *pf)
+{
+	struct i40e_hw *hw = I40E_PF_TO_HW(pf);
+	struct i40e_vsi *vsi = pf->main_vsi;
+	struct i40e_tunnel_filter_list
+		*tunnel_list = &pf->tunnel.tunnel_list;
+	struct i40e_tunnel_filter *f;
+	struct i40e_aqc_add_remove_cloud_filters_element_data cld_filter;
+
+	TAILQ_FOREACH(f, tunnel_list, rules) {
+		memset(&cld_filter, 0, sizeof(cld_filter));
+		rte_memcpy(&cld_filter, &f->input, sizeof(f->input));
+		cld_filter.queue_number = f->queue;
+		i40e_aq_add_cloud_filters(hw, vsi->seid, &cld_filter, 1);
+	}
+}
+
 static void
 i40e_filter_restore(struct i40e_pf *pf)
 {
 	i40e_ethertype_filter_restore(pf);
+	i40e_tunnel_filter_restore(pf);
 }
-- 
2.5.5

^ permalink raw reply related

* [PATCH v6 06/17] net/i40e: restore flow director filter
From: Beilei Xing @ 2017-01-05 15:45 UTC (permalink / raw)
  To: jingjing.wu, helin.zhang; +Cc: dev
In-Reply-To: <1483631170-16681-1-git-send-email-beilei.xing@intel.com>

Add support of restoring flow director filter.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c |  1 +
 drivers/net/i40e/i40e_ethdev.h |  1 +
 drivers/net/i40e/i40e_fdir.c   | 31 +++++++++++++++++++++++++++++++
 3 files changed, 33 insertions(+)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index a636dc0..02331d2 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -10153,4 +10153,5 @@ i40e_filter_restore(struct i40e_pf *pf)
 {
 	i40e_ethertype_filter_restore(pf);
 	i40e_tunnel_filter_restore(pf);
+	i40e_fdir_filter_restore(pf);
 }
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index 43a3dbb..82baab6 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -670,6 +670,7 @@ int i40e_fdir_ctrl_func(struct rte_eth_dev *dev,
 int i40e_select_filter_input_set(struct i40e_hw *hw,
 				 struct rte_eth_input_set_conf *conf,
 				 enum rte_filter_type filter);
+void i40e_fdir_filter_restore(struct i40e_pf *pf);
 int i40e_hash_filter_inset_select(struct i40e_hw *hw,
 			     struct rte_eth_input_set_conf *conf);
 int i40e_fdir_filter_inset_select(struct i40e_pf *pf,
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 4a29b37..f89dbc9 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -1586,3 +1586,34 @@ i40e_fdir_ctrl_func(struct rte_eth_dev *dev,
 	}
 	return ret;
 }
+
+/* Restore flow director filter */
+void
+i40e_fdir_filter_restore(struct i40e_pf *pf)
+{
+	struct rte_eth_dev *dev = I40E_VSI_TO_ETH_DEV(pf->main_vsi);
+	struct i40e_fdir_filter_list *fdir_list = &pf->fdir.fdir_list;
+	struct i40e_fdir_filter *f;
+#ifdef RTE_LIBRTE_I40E_DEBUG_DRIVER
+	struct i40e_hw *hw = I40E_PF_TO_HW(pf);
+	uint32_t fdstat;
+	uint32_t guarant_cnt;  /**< Number of filters in guaranteed spaces. */
+	uint32_t best_cnt;     /**< Number of filters in best effort spaces. */
+#endif /* RTE_LIBRTE_I40E_DEBUG_DRIVER */
+
+	TAILQ_FOREACH(f, fdir_list, rules)
+		i40e_add_del_fdir_filter(dev, &f->fdir, TRUE);
+
+#ifdef RTE_LIBRTE_I40E_DEBUG_DRIVER
+	fdstat = I40E_READ_REG(hw, I40E_PFQF_FDSTAT);
+	guarant_cnt =
+		(uint32_t)((fdstat & I40E_PFQF_FDSTAT_GUARANT_CNT_MASK) >>
+			   I40E_PFQF_FDSTAT_GUARANT_CNT_SHIFT);
+	best_cnt =
+		(uint32_t)((fdstat & I40E_PFQF_FDSTAT_BEST_CNT_MASK) >>
+			   I40E_PFQF_FDSTAT_BEST_CNT_SHIFT);
+#endif /* RTE_LIBRTE_I40E_DEBUG_DRIVER */
+
+	PMD_DRV_LOG(INFO, "FDIR: Guarant count: %d,  Best count: %d\n",
+		    guarant_cnt, best_cnt);
+}
-- 
2.5.5

^ permalink raw reply related

* [PATCH v6 07/17] net/i40e: add flow validate function
From: Beilei Xing @ 2017-01-05 15:46 UTC (permalink / raw)
  To: jingjing.wu, helin.zhang; +Cc: dev
In-Reply-To: <1483631170-16681-1-git-send-email-beilei.xing@intel.com>

This patch adds i40e_flow_validation function to check if
a flow is valid according to the flow pattern.
i40e_flow_parse_ethertype_filter is added first, it also
gets the ethertype info.
i40e_flow.c is added to handle all generic filter events.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/Makefile      |   1 +
 drivers/net/i40e/i40e_ethdev.c |  12 +-
 drivers/net/i40e/i40e_ethdev.h |  23 ++
 drivers/net/i40e/i40e_flow.c   | 492 +++++++++++++++++++++++++++++++++++++++++
 4 files changed, 523 insertions(+), 5 deletions(-)
 create mode 100644 drivers/net/i40e/i40e_flow.c

diff --git a/drivers/net/i40e/Makefile b/drivers/net/i40e/Makefile
index 11175c4..89bd85a 100644
--- a/drivers/net/i40e/Makefile
+++ b/drivers/net/i40e/Makefile
@@ -105,6 +105,7 @@ endif
 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_ethdev_vf.c
 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_pf.c
 SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_fdir.c
+SRCS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e_flow.c
 
 # vector PMD driver needs SSE4.1 support
 ifeq ($(findstring RTE_MACHINE_CPUFLAG_SSE4_1,$(CFLAGS)),)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 02331d2..01338ca 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -285,11 +285,6 @@
 #define I40E_INSET_IPV6_HOP_LIMIT_MASK  0x000CFF00UL
 #define I40E_INSET_IPV6_NEXT_HDR_MASK   0x000C00FFUL
 
-#define I40E_GL_SWT_L2TAGCTRL(_i)             (0x001C0A70 + ((_i) * 4))
-#define I40E_GL_SWT_L2TAGCTRL_ETHERTYPE_SHIFT 16
-#define I40E_GL_SWT_L2TAGCTRL_ETHERTYPE_MASK  \
-	I40E_MASK(0xFFFF, I40E_GL_SWT_L2TAGCTRL_ETHERTYPE_SHIFT)
-
 /* PCI offset for querying capability */
 #define PCI_DEV_CAP_REG            0xA4
 /* PCI offset for enabling/disabling Extended Tag */
@@ -8441,6 +8436,8 @@ i40e_ethertype_filter_handle(struct rte_eth_dev *dev,
 	return ret;
 }
 
+extern const struct rte_flow_ops i40e_flow_ops;
+
 static int
 i40e_dev_filter_ctrl(struct rte_eth_dev *dev,
 		     enum rte_filter_type filter_type,
@@ -8472,6 +8469,11 @@ i40e_dev_filter_ctrl(struct rte_eth_dev *dev,
 	case RTE_ETH_FILTER_FDIR:
 		ret = i40e_fdir_ctrl_func(dev, filter_op, arg);
 		break;
+	case RTE_ETH_FILTER_GENERIC:
+		if (filter_op != RTE_ETH_FILTER_GET)
+			return -EINVAL;
+		*(const void **)arg = &i40e_flow_ops;
+		break;
 	default:
 		PMD_DRV_LOG(WARNING, "Filter type (%d) not supported",
 							filter_type);
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index 82baab6..00c2a0a 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -38,6 +38,7 @@
 #include <rte_time.h>
 #include <rte_kvargs.h>
 #include <rte_hash.h>
+#include <rte_flow_driver.h>
 
 #define I40E_VLAN_TAG_SIZE        4
 
@@ -189,6 +190,11 @@ enum i40e_flxpld_layer_idx {
 #define FLOATING_VEB_SUPPORTED_FW_MAJ 5
 #define FLOATING_VEB_SUPPORTED_FW_MIN 0
 
+#define I40E_GL_SWT_L2TAGCTRL(_i)             (0x001C0A70 + ((_i) * 4))
+#define I40E_GL_SWT_L2TAGCTRL_ETHERTYPE_SHIFT 16
+#define I40E_GL_SWT_L2TAGCTRL_ETHERTYPE_MASK  \
+	I40E_MASK(0xFFFF, I40E_GL_SWT_L2TAGCTRL_ETHERTYPE_SHIFT)
+
 struct i40e_adapter;
 
 /**
@@ -629,6 +635,23 @@ struct i40e_adapter {
 	struct rte_timecounter tx_tstamp_tc;
 };
 
+union i40e_filter_t {
+	struct rte_eth_ethertype_filter ethertype_filter;
+	struct rte_eth_fdir_filter fdir_filter;
+	struct rte_eth_tunnel_filter_conf tunnel_filter;
+};
+
+typedef int (*parse_filter_t)(struct rte_eth_dev *dev,
+			      const struct rte_flow_attr *attr,
+			      const struct rte_flow_item pattern[],
+			      const struct rte_flow_action actions[],
+			      struct rte_flow_error *error,
+			      union i40e_filter_t *filter);
+struct i40e_valid_pattern {
+	enum rte_flow_item_type *items;
+	parse_filter_t parse_filter;
+};
+
 int i40e_dev_switch_queues(struct i40e_pf *pf, bool on);
 int i40e_vsi_release(struct i40e_vsi *vsi);
 struct i40e_vsi *i40e_vsi_setup(struct i40e_pf *pf,
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
new file mode 100644
index 0000000..5ca7a42
--- /dev/null
+++ b/drivers/net/i40e/i40e_flow.c
@@ -0,0 +1,492 @@
+/*-
+ *   BSD LICENSE
+ *
+ *   Copyright (c) 2016 Intel Corporation. All rights reserved.
+ *
+ *   Redistribution and use in source and binary forms, with or without
+ *   modification, are permitted provided that the following conditions
+ *   are met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ *       notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above copyright
+ *       notice, this list of conditions and the following disclaimer in
+ *       the documentation and/or other materials provided with the
+ *       distribution.
+ *     * Neither the name of Intel Corporation nor the names of its
+ *       contributors may be used to endorse or promote products derived
+ *       from this software without specific prior written permission.
+ *
+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/queue.h>
+#include <stdio.h>
+#include <errno.h>
+#include <stdint.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdarg.h>
+
+#include <rte_ether.h>
+#include <rte_ethdev.h>
+#include <rte_log.h>
+#include <rte_memzone.h>
+#include <rte_malloc.h>
+#include <rte_eth_ctrl.h>
+#include <rte_tailq.h>
+#include <rte_flow_driver.h>
+
+#include "i40e_logs.h"
+#include "base/i40e_type.h"
+#include "base/i40e_prototype.h"
+#include "i40e_ethdev.h"
+
+static int i40e_flow_validate(struct rte_eth_dev *dev,
+			      const struct rte_flow_attr *attr,
+			      const struct rte_flow_item pattern[],
+			      const struct rte_flow_action actions[],
+			      struct rte_flow_error *error);
+static int
+i40e_flow_parse_ethertype_pattern(struct rte_eth_dev *dev,
+				  const struct rte_flow_item *pattern,
+				  struct rte_flow_error *error,
+				  struct rte_eth_ethertype_filter *filter);
+static int i40e_flow_parse_ethertype_action(struct rte_eth_dev *dev,
+				    const struct rte_flow_action *actions,
+				    struct rte_flow_error *error,
+				    struct rte_eth_ethertype_filter *filter);
+static int i40e_flow_parse_attr(const struct rte_flow_attr *attr,
+				struct rte_flow_error *error);
+static int i40e_flow_parse_ethertype_filter(struct rte_eth_dev *dev,
+				    const struct rte_flow_attr *attr,
+				    const struct rte_flow_item pattern[],
+				    const struct rte_flow_action actions[],
+				    struct rte_flow_error *error,
+				    union i40e_filter_t *filter);
+
+const struct rte_flow_ops i40e_flow_ops = {
+	.validate = i40e_flow_validate,
+};
+
+union i40e_filter_t cons_filter;
+
+/* Pattern matched ethertype filter */
+static enum rte_flow_item_type pattern_ethertype[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+static struct i40e_valid_pattern i40e_supported_patterns[] = {
+	/* Ethertype */
+	{ pattern_ethertype, i40e_flow_parse_ethertype_filter },
+};
+
+#define NEXT_ITEM_OF_ACTION(act, actions, index)                        \
+	do {                                                            \
+		act = actions + index;                                  \
+		while (act->type == RTE_FLOW_ACTION_TYPE_VOID) {        \
+			index++;                                        \
+			act = actions + index;                          \
+		}                                                       \
+	} while (0)
+
+/* Find the first VOID or non-VOID item pointer */
+static const struct rte_flow_item *
+i40e_find_first_item(const struct rte_flow_item *item, bool is_void)
+{
+	bool is_find;
+
+	while (item->type != RTE_FLOW_ITEM_TYPE_END) {
+		if (is_void)
+			is_find = item->type == RTE_FLOW_ITEM_TYPE_VOID;
+		else
+			is_find = item->type != RTE_FLOW_ITEM_TYPE_VOID;
+		if (is_find)
+			break;
+		item++;
+	}
+	return item;
+}
+
+/* Skip all VOID items of the pattern */
+static void
+i40e_pattern_skip_void_item(struct rte_flow_item *items,
+			    const struct rte_flow_item *pattern)
+{
+	uint32_t cpy_count = 0;
+	const struct rte_flow_item *pb = pattern, *pe = pattern;
+
+	for (;;) {
+		/* Find a non-void item first */
+		pb = i40e_find_first_item(pb, false);
+		if (pb->type == RTE_FLOW_ITEM_TYPE_END) {
+			pe = pb;
+			break;
+		}
+
+		/* Find a void item */
+		pe = i40e_find_first_item(pb + 1, true);
+
+		cpy_count = pe - pb;
+		rte_memcpy(items, pb, sizeof(struct rte_flow_item) * cpy_count);
+
+		items += cpy_count;
+
+		if (pe->type == RTE_FLOW_ITEM_TYPE_END) {
+			pb = pe;
+			break;
+		}
+
+		pb = pe + 1;
+	}
+	/* Copy the END item. */
+	rte_memcpy(items, pe, sizeof(struct rte_flow_item));
+}
+
+/* Check if the pattern matches a supported item type array */
+static bool
+i40e_match_pattern(enum rte_flow_item_type *item_array,
+		   struct rte_flow_item *pattern)
+{
+	struct rte_flow_item *item = pattern;
+
+	while ((*item_array == item->type) &&
+	       (*item_array != RTE_FLOW_ITEM_TYPE_END)) {
+		item_array++;
+		item++;
+	}
+
+	return (*item_array == RTE_FLOW_ITEM_TYPE_END &&
+		item->type == RTE_FLOW_ITEM_TYPE_END);
+}
+
+/* Find if there's parse filter function matched */
+static parse_filter_t
+i40e_find_parse_filter_func(struct rte_flow_item *pattern)
+{
+	parse_filter_t parse_filter = NULL;
+	uint8_t i = 0;
+
+	for (; i < RTE_DIM(i40e_supported_patterns); i++) {
+		if (i40e_match_pattern(i40e_supported_patterns[i].items,
+					pattern)) {
+			parse_filter = i40e_supported_patterns[i].parse_filter;
+			break;
+		}
+	}
+
+	return parse_filter;
+}
+
+/* Parse attributes */
+static int
+i40e_flow_parse_attr(const struct rte_flow_attr *attr,
+		     struct rte_flow_error *error)
+{
+	/* Must be input direction */
+	if (!attr->ingress) {
+		rte_flow_error_set(error, EINVAL,
+				   RTE_FLOW_ERROR_TYPE_ATTR_INGRESS,
+				   attr, "Only support ingress.");
+		return -rte_errno;
+	}
+
+	/* Not supported */
+	if (attr->egress) {
+		rte_flow_error_set(error, EINVAL,
+				   RTE_FLOW_ERROR_TYPE_ATTR_EGRESS,
+				   attr, "Not support egress.");
+		return -rte_errno;
+	}
+
+	/* Not supported */
+	if (attr->priority) {
+		rte_flow_error_set(error, EINVAL,
+				   RTE_FLOW_ERROR_TYPE_ATTR_PRIORITY,
+				   attr, "Not support priority.");
+		return -rte_errno;
+	}
+
+	/* Not supported */
+	if (attr->group) {
+		rte_flow_error_set(error, EINVAL,
+				   RTE_FLOW_ERROR_TYPE_ATTR_GROUP,
+				   attr, "Not support group.");
+		return -rte_errno;
+	}
+
+	return 0;
+}
+
+static uint16_t
+i40e_get_outer_vlan(struct rte_eth_dev *dev)
+{
+	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+	int qinq = dev->data->dev_conf.rxmode.hw_vlan_extend;
+	uint64_t reg_r = 0;
+	uint16_t reg_id;
+	uint16_t tpid;
+
+	if (qinq)
+		reg_id = 2;
+	else
+		reg_id = 3;
+
+	i40e_aq_debug_read_register(hw, I40E_GL_SWT_L2TAGCTRL(reg_id),
+				    &reg_r, NULL);
+
+	tpid = (reg_r >> I40E_GL_SWT_L2TAGCTRL_ETHERTYPE_SHIFT) & 0xFFFF;
+
+	return tpid;
+}
+
+/* 1. Last in item should be NULL as range is not supported.
+ * 2. Supported filter types: MAC_ETHTYPE and ETHTYPE.
+ * 3. SRC mac_addr mask should be 00:00:00:00:00:00.
+ * 4. DST mac_addr mask should be 00:00:00:00:00:00 or
+ *    FF:FF:FF:FF:FF:FF
+ * 5. Ether_type mask should be 0xFFFF.
+ */
+static int
+i40e_flow_parse_ethertype_pattern(struct rte_eth_dev *dev,
+				  const struct rte_flow_item *pattern,
+				  struct rte_flow_error *error,
+				  struct rte_eth_ethertype_filter *filter)
+{
+	const struct rte_flow_item *item = pattern;
+	const struct rte_flow_item_eth *eth_spec;
+	const struct rte_flow_item_eth *eth_mask;
+	enum rte_flow_item_type item_type;
+	uint16_t outer_tpid;
+
+	outer_tpid = i40e_get_outer_vlan(dev);
+
+	for (; item->type != RTE_FLOW_ITEM_TYPE_END; item++) {
+		if (item->last) {
+			rte_flow_error_set(error, EINVAL,
+					   RTE_FLOW_ERROR_TYPE_ITEM,
+					   item,
+					   "Not support range");
+			return -rte_errno;
+		}
+		item_type = item->type;
+		switch (item_type) {
+		case RTE_FLOW_ITEM_TYPE_ETH:
+			eth_spec = (const struct rte_flow_item_eth *)item->spec;
+			eth_mask = (const struct rte_flow_item_eth *)item->mask;
+			/* Get the MAC info. */
+			if (!eth_spec || !eth_mask) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "NULL ETH spec/mask");
+				return -rte_errno;
+			}
+
+			/* Mask bits of source MAC address must be full of 0.
+			 * Mask bits of destination MAC address must be full
+			 * of 1 or full of 0.
+			 */
+			if (!is_zero_ether_addr(&eth_mask->src) ||
+			    (!is_zero_ether_addr(&eth_mask->dst) &&
+			     !is_broadcast_ether_addr(&eth_mask->dst))) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid MAC_addr mask");
+				return -rte_errno;
+			}
+
+			if ((eth_mask->type & UINT16_MAX) != UINT16_MAX) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid ethertype mask");
+				return -rte_errno;
+			}
+
+			/* If mask bits of destination MAC address
+			 * are full of 1, set RTE_ETHTYPE_FLAGS_MAC.
+			 */
+			if (is_broadcast_ether_addr(&eth_mask->dst)) {
+				filter->mac_addr = eth_spec->dst;
+				filter->flags |= RTE_ETHTYPE_FLAGS_MAC;
+			} else {
+				filter->flags &= ~RTE_ETHTYPE_FLAGS_MAC;
+			}
+			filter->ether_type = rte_be_to_cpu_16(eth_spec->type);
+
+			if (filter->ether_type == ETHER_TYPE_IPv4 ||
+			    filter->ether_type == ETHER_TYPE_IPv6 ||
+			    filter->ether_type == outer_tpid) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Unsupported ether_type in"
+						   " control packet filter.");
+				return -rte_errno;
+			}
+			break;
+		default:
+			break;
+		}
+	}
+
+	return 0;
+}
+
+/* Ethertype action only supports QUEUE or DROP. */
+static int
+i40e_flow_parse_ethertype_action(struct rte_eth_dev *dev,
+				 const struct rte_flow_action *actions,
+				 struct rte_flow_error *error,
+				 struct rte_eth_ethertype_filter *filter)
+{
+	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
+	const struct rte_flow_action *act;
+	const struct rte_flow_action_queue *act_q;
+	uint32_t index = 0;
+
+	/* Check if the first non-void action is QUEUE or DROP. */
+	NEXT_ITEM_OF_ACTION(act, actions, index);
+	if (act->type != RTE_FLOW_ACTION_TYPE_QUEUE &&
+	    act->type != RTE_FLOW_ACTION_TYPE_DROP) {
+		rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION,
+				   act, "Not supported action.");
+		return -rte_errno;
+	}
+
+	if (act->type == RTE_FLOW_ACTION_TYPE_QUEUE) {
+		act_q = (const struct rte_flow_action_queue *)act->conf;
+		filter->queue = act_q->index;
+		if (filter->queue >= pf->dev_data->nb_rx_queues) {
+			rte_flow_error_set(error, EINVAL,
+					   RTE_FLOW_ERROR_TYPE_ACTION,
+					   act, "Invalid queue ID for"
+					   " ethertype_filter.");
+			return -rte_errno;
+		}
+	} else {
+		filter->flags |= RTE_ETHTYPE_FLAGS_DROP;
+	}
+
+	/* Check if the next non-void item is END */
+	index++;
+	NEXT_ITEM_OF_ACTION(act, actions, index);
+	if (act->type != RTE_FLOW_ACTION_TYPE_END) {
+		rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION,
+				   act, "Not supported action.");
+		return -rte_errno;
+	}
+
+	return 0;
+}
+
+static int
+i40e_flow_parse_ethertype_filter(struct rte_eth_dev *dev,
+				 const struct rte_flow_attr *attr,
+				 const struct rte_flow_item pattern[],
+				 const struct rte_flow_action actions[],
+				 struct rte_flow_error *error,
+				 union i40e_filter_t *filter)
+{
+	struct rte_eth_ethertype_filter *ethertype_filter =
+		&filter->ethertype_filter;
+	int ret;
+
+	ret = i40e_flow_parse_ethertype_pattern(dev, pattern, error,
+						ethertype_filter);
+	if (ret)
+		return ret;
+
+	ret = i40e_flow_parse_ethertype_action(dev, actions, error,
+					       ethertype_filter);
+	if (ret)
+		return ret;
+
+	ret = i40e_flow_parse_attr(attr, error);
+	if (ret)
+		return ret;
+
+	return ret;
+}
+
+static int
+i40e_flow_validate(struct rte_eth_dev *dev,
+		   const struct rte_flow_attr *attr,
+		   const struct rte_flow_item pattern[],
+		   const struct rte_flow_action actions[],
+		   struct rte_flow_error *error)
+{
+	struct rte_flow_item *items; /* internal pattern w/o VOID items */
+	parse_filter_t parse_filter;
+	uint32_t item_num = 0; /* non-void item number of pattern*/
+	uint32_t i = 0;
+	int ret;
+
+	if (!pattern) {
+		rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM_NUM,
+				   NULL, "NULL pattern.");
+		return -rte_errno;
+	}
+
+	if (!actions) {
+		rte_flow_error_set(error, EINVAL,
+				   RTE_FLOW_ERROR_TYPE_ACTION_NUM,
+				   NULL, "NULL action.");
+		return -rte_errno;
+	}
+
+	if (!attr) {
+		rte_flow_error_set(error, EINVAL,
+				   RTE_FLOW_ERROR_TYPE_ATTR,
+				   NULL, "NULL attribute.");
+		return -rte_errno;
+	}
+
+	memset(&cons_filter, 0, sizeof(cons_filter));
+
+	/* Get the non-void item number of pattern */
+	while ((pattern + i)->type != RTE_FLOW_ITEM_TYPE_END) {
+		if ((pattern + i)->type != RTE_FLOW_ITEM_TYPE_VOID)
+			item_num++;
+		i++;
+	}
+	item_num++;
+
+	items = rte_zmalloc("i40e_pattern",
+			    item_num * sizeof(struct rte_flow_item), 0);
+	if (!items) {
+		rte_flow_error_set(error, ENOMEM, RTE_FLOW_ERROR_TYPE_ITEM_NUM,
+				   NULL, "No memory for PMD internal items.");
+		return -ENOMEM;
+	}
+
+	i40e_pattern_skip_void_item(items, pattern);
+
+	/* Find if there's matched parse filter function */
+	parse_filter = i40e_find_parse_filter_func(items);
+	if (!parse_filter) {
+		rte_flow_error_set(error, EINVAL,
+				   RTE_FLOW_ERROR_TYPE_ITEM,
+				   pattern, "Unsupported pattern");
+		return -rte_errno;
+	}
+
+	ret = parse_filter(dev, attr, items, actions, error, &cons_filter);
+
+	rte_free(items);
+
+	return ret;
+}
-- 
2.5.5

^ permalink raw reply related

* [PATCH v6 08/17] net/i40e: parse flow director filter
From: Beilei Xing @ 2017-01-05 15:46 UTC (permalink / raw)
  To: jingjing.wu, helin.zhang; +Cc: dev
In-Reply-To: <1483631170-16681-1-git-send-email-beilei.xing@intel.com>

This patch adds i40e_flow_parse_fdir_filter to check
if a rule is a flow director rule according to the
flow pattern, and the function also gets the flow
director info.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c |  56 +---
 drivers/net/i40e/i40e_ethdev.h |  55 ++++
 drivers/net/i40e/i40e_flow.c   | 623 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 679 insertions(+), 55 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 01338ca..81ed13e 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -139,60 +139,6 @@
 #define I40E_DEFAULT_DCB_APP_NUM    1
 #define I40E_DEFAULT_DCB_APP_PRIO   3
 
-#define I40E_INSET_NONE            0x00000000000000000ULL
-
-/* bit0 ~ bit 7 */
-#define I40E_INSET_DMAC            0x0000000000000001ULL
-#define I40E_INSET_SMAC            0x0000000000000002ULL
-#define I40E_INSET_VLAN_OUTER      0x0000000000000004ULL
-#define I40E_INSET_VLAN_INNER      0x0000000000000008ULL
-#define I40E_INSET_VLAN_TUNNEL     0x0000000000000010ULL
-
-/* bit 8 ~ bit 15 */
-#define I40E_INSET_IPV4_SRC        0x0000000000000100ULL
-#define I40E_INSET_IPV4_DST        0x0000000000000200ULL
-#define I40E_INSET_IPV6_SRC        0x0000000000000400ULL
-#define I40E_INSET_IPV6_DST        0x0000000000000800ULL
-#define I40E_INSET_SRC_PORT        0x0000000000001000ULL
-#define I40E_INSET_DST_PORT        0x0000000000002000ULL
-#define I40E_INSET_SCTP_VT         0x0000000000004000ULL
-
-/* bit 16 ~ bit 31 */
-#define I40E_INSET_IPV4_TOS        0x0000000000010000ULL
-#define I40E_INSET_IPV4_PROTO      0x0000000000020000ULL
-#define I40E_INSET_IPV4_TTL        0x0000000000040000ULL
-#define I40E_INSET_IPV6_TC         0x0000000000080000ULL
-#define I40E_INSET_IPV6_FLOW       0x0000000000100000ULL
-#define I40E_INSET_IPV6_NEXT_HDR   0x0000000000200000ULL
-#define I40E_INSET_IPV6_HOP_LIMIT  0x0000000000400000ULL
-#define I40E_INSET_TCP_FLAGS       0x0000000000800000ULL
-
-/* bit 32 ~ bit 47, tunnel fields */
-#define I40E_INSET_TUNNEL_IPV4_DST       0x0000000100000000ULL
-#define I40E_INSET_TUNNEL_IPV6_DST       0x0000000200000000ULL
-#define I40E_INSET_TUNNEL_DMAC           0x0000000400000000ULL
-#define I40E_INSET_TUNNEL_SRC_PORT       0x0000000800000000ULL
-#define I40E_INSET_TUNNEL_DST_PORT       0x0000001000000000ULL
-#define I40E_INSET_TUNNEL_ID             0x0000002000000000ULL
-
-/* bit 48 ~ bit 55 */
-#define I40E_INSET_LAST_ETHER_TYPE 0x0001000000000000ULL
-
-/* bit 56 ~ bit 63, Flex Payload */
-#define I40E_INSET_FLEX_PAYLOAD_W1 0x0100000000000000ULL
-#define I40E_INSET_FLEX_PAYLOAD_W2 0x0200000000000000ULL
-#define I40E_INSET_FLEX_PAYLOAD_W3 0x0400000000000000ULL
-#define I40E_INSET_FLEX_PAYLOAD_W4 0x0800000000000000ULL
-#define I40E_INSET_FLEX_PAYLOAD_W5 0x1000000000000000ULL
-#define I40E_INSET_FLEX_PAYLOAD_W6 0x2000000000000000ULL
-#define I40E_INSET_FLEX_PAYLOAD_W7 0x4000000000000000ULL
-#define I40E_INSET_FLEX_PAYLOAD_W8 0x8000000000000000ULL
-#define I40E_INSET_FLEX_PAYLOAD \
-	(I40E_INSET_FLEX_PAYLOAD_W1 | I40E_INSET_FLEX_PAYLOAD_W2 | \
-	I40E_INSET_FLEX_PAYLOAD_W3 | I40E_INSET_FLEX_PAYLOAD_W4 | \
-	I40E_INSET_FLEX_PAYLOAD_W5 | I40E_INSET_FLEX_PAYLOAD_W6 | \
-	I40E_INSET_FLEX_PAYLOAD_W7 | I40E_INSET_FLEX_PAYLOAD_W8)
-
 /**
  * Below are values for writing un-exposed registers suggested
  * by silicon experts
@@ -7627,7 +7573,7 @@ i40e_validate_input_set(enum i40e_filter_pctype pctype,
 }
 
 /* default input set fields combination per pctype */
-static uint64_t
+uint64_t
 i40e_get_default_input_set(uint16_t pctype)
 {
 	static const uint64_t default_inset_table[] = {
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h
index 00c2a0a..4597615 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -195,6 +195,60 @@ enum i40e_flxpld_layer_idx {
 #define I40E_GL_SWT_L2TAGCTRL_ETHERTYPE_MASK  \
 	I40E_MASK(0xFFFF, I40E_GL_SWT_L2TAGCTRL_ETHERTYPE_SHIFT)
 
+#define I40E_INSET_NONE            0x00000000000000000ULL
+
+/* bit0 ~ bit 7 */
+#define I40E_INSET_DMAC            0x0000000000000001ULL
+#define I40E_INSET_SMAC            0x0000000000000002ULL
+#define I40E_INSET_VLAN_OUTER      0x0000000000000004ULL
+#define I40E_INSET_VLAN_INNER      0x0000000000000008ULL
+#define I40E_INSET_VLAN_TUNNEL     0x0000000000000010ULL
+
+/* bit 8 ~ bit 15 */
+#define I40E_INSET_IPV4_SRC        0x0000000000000100ULL
+#define I40E_INSET_IPV4_DST        0x0000000000000200ULL
+#define I40E_INSET_IPV6_SRC        0x0000000000000400ULL
+#define I40E_INSET_IPV6_DST        0x0000000000000800ULL
+#define I40E_INSET_SRC_PORT        0x0000000000001000ULL
+#define I40E_INSET_DST_PORT        0x0000000000002000ULL
+#define I40E_INSET_SCTP_VT         0x0000000000004000ULL
+
+/* bit 16 ~ bit 31 */
+#define I40E_INSET_IPV4_TOS        0x0000000000010000ULL
+#define I40E_INSET_IPV4_PROTO      0x0000000000020000ULL
+#define I40E_INSET_IPV4_TTL        0x0000000000040000ULL
+#define I40E_INSET_IPV6_TC         0x0000000000080000ULL
+#define I40E_INSET_IPV6_FLOW       0x0000000000100000ULL
+#define I40E_INSET_IPV6_NEXT_HDR   0x0000000000200000ULL
+#define I40E_INSET_IPV6_HOP_LIMIT  0x0000000000400000ULL
+#define I40E_INSET_TCP_FLAGS       0x0000000000800000ULL
+
+/* bit 32 ~ bit 47, tunnel fields */
+#define I40E_INSET_TUNNEL_IPV4_DST       0x0000000100000000ULL
+#define I40E_INSET_TUNNEL_IPV6_DST       0x0000000200000000ULL
+#define I40E_INSET_TUNNEL_DMAC           0x0000000400000000ULL
+#define I40E_INSET_TUNNEL_SRC_PORT       0x0000000800000000ULL
+#define I40E_INSET_TUNNEL_DST_PORT       0x0000001000000000ULL
+#define I40E_INSET_TUNNEL_ID             0x0000002000000000ULL
+
+/* bit 48 ~ bit 55 */
+#define I40E_INSET_LAST_ETHER_TYPE 0x0001000000000000ULL
+
+/* bit 56 ~ bit 63, Flex Payload */
+#define I40E_INSET_FLEX_PAYLOAD_W1 0x0100000000000000ULL
+#define I40E_INSET_FLEX_PAYLOAD_W2 0x0200000000000000ULL
+#define I40E_INSET_FLEX_PAYLOAD_W3 0x0400000000000000ULL
+#define I40E_INSET_FLEX_PAYLOAD_W4 0x0800000000000000ULL
+#define I40E_INSET_FLEX_PAYLOAD_W5 0x1000000000000000ULL
+#define I40E_INSET_FLEX_PAYLOAD_W6 0x2000000000000000ULL
+#define I40E_INSET_FLEX_PAYLOAD_W7 0x4000000000000000ULL
+#define I40E_INSET_FLEX_PAYLOAD_W8 0x8000000000000000ULL
+#define I40E_INSET_FLEX_PAYLOAD \
+	(I40E_INSET_FLEX_PAYLOAD_W1 | I40E_INSET_FLEX_PAYLOAD_W2 | \
+	I40E_INSET_FLEX_PAYLOAD_W3 | I40E_INSET_FLEX_PAYLOAD_W4 | \
+	I40E_INSET_FLEX_PAYLOAD_W5 | I40E_INSET_FLEX_PAYLOAD_W6 | \
+	I40E_INSET_FLEX_PAYLOAD_W7 | I40E_INSET_FLEX_PAYLOAD_W8)
+
 struct i40e_adapter;
 
 /**
@@ -717,6 +771,7 @@ i40e_sw_tunnel_filter_lookup(struct i40e_tunnel_rule *tunnel_rule,
 			     const struct i40e_tunnel_filter_input *input);
 int i40e_sw_tunnel_filter_del(struct i40e_pf *pf,
 			      struct i40e_tunnel_filter_input *input);
+uint64_t i40e_get_default_input_set(uint16_t pctype);
 
 #define I40E_DEV_TO_PCI(eth_dev) \
 	RTE_DEV_TO_PCI((eth_dev)->device)
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 5ca7a42..2eead93 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -52,6 +52,10 @@
 #include "base/i40e_prototype.h"
 #include "i40e_ethdev.h"
 
+#define I40E_IPV4_TC_SHIFT	4
+#define I40E_IPV6_TC_MASK	(0x00FF << I40E_IPV4_TC_SHIFT)
+#define I40E_IPV6_FRAG_HEADER	44
+
 static int i40e_flow_validate(struct rte_eth_dev *dev,
 			      const struct rte_flow_attr *attr,
 			      const struct rte_flow_item pattern[],
@@ -66,6 +70,14 @@ static int i40e_flow_parse_ethertype_action(struct rte_eth_dev *dev,
 				    const struct rte_flow_action *actions,
 				    struct rte_flow_error *error,
 				    struct rte_eth_ethertype_filter *filter);
+static int i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
+					const struct rte_flow_item *pattern,
+					struct rte_flow_error *error,
+					struct rte_eth_fdir_filter *filter);
+static int i40e_flow_parse_fdir_action(struct rte_eth_dev *dev,
+				       const struct rte_flow_action *actions,
+				       struct rte_flow_error *error,
+				       struct rte_eth_fdir_filter *filter);
 static int i40e_flow_parse_attr(const struct rte_flow_attr *attr,
 				struct rte_flow_error *error);
 static int i40e_flow_parse_ethertype_filter(struct rte_eth_dev *dev,
@@ -74,6 +86,12 @@ static int i40e_flow_parse_ethertype_filter(struct rte_eth_dev *dev,
 				    const struct rte_flow_action actions[],
 				    struct rte_flow_error *error,
 				    union i40e_filter_t *filter);
+static int i40e_flow_parse_fdir_filter(struct rte_eth_dev *dev,
+				       const struct rte_flow_attr *attr,
+				       const struct rte_flow_item pattern[],
+				       const struct rte_flow_action actions[],
+				       struct rte_flow_error *error,
+				       union i40e_filter_t *filter);
 
 const struct rte_flow_ops i40e_flow_ops = {
 	.validate = i40e_flow_validate,
@@ -87,9 +105,127 @@ static enum rte_flow_item_type pattern_ethertype[] = {
 	RTE_FLOW_ITEM_TYPE_END,
 };
 
+/* Pattern matched flow director filter */
+static enum rte_flow_item_type pattern_fdir_ipv4[] = {
+	RTE_FLOW_ITEM_TYPE_IPV4,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+static enum rte_flow_item_type pattern_fdir_ipv4_ext[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV4,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+static enum rte_flow_item_type pattern_fdir_ipv4_udp[] = {
+	RTE_FLOW_ITEM_TYPE_IPV4,
+	RTE_FLOW_ITEM_TYPE_UDP,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+static enum rte_flow_item_type pattern_fdir_ipv4_udp_ext[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV4,
+	RTE_FLOW_ITEM_TYPE_UDP,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+static enum rte_flow_item_type pattern_fdir_ipv4_tcp[] = {
+	RTE_FLOW_ITEM_TYPE_IPV4,
+	RTE_FLOW_ITEM_TYPE_TCP,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+static enum rte_flow_item_type pattern_fdir_ipv4_tcp_ext[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV4,
+	RTE_FLOW_ITEM_TYPE_TCP,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+static enum rte_flow_item_type pattern_fdir_ipv4_sctp[] = {
+	RTE_FLOW_ITEM_TYPE_IPV4,
+	RTE_FLOW_ITEM_TYPE_SCTP,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+static enum rte_flow_item_type pattern_fdir_ipv4_sctp_ext[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV4,
+	RTE_FLOW_ITEM_TYPE_SCTP,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+static enum rte_flow_item_type pattern_fdir_ipv6[] = {
+	RTE_FLOW_ITEM_TYPE_IPV6,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+static enum rte_flow_item_type pattern_fdir_ipv6_ext[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV6,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+static enum rte_flow_item_type pattern_fdir_ipv6_udp[] = {
+	RTE_FLOW_ITEM_TYPE_IPV6,
+	RTE_FLOW_ITEM_TYPE_UDP,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+static enum rte_flow_item_type pattern_fdir_ipv6_udp_ext[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV6,
+	RTE_FLOW_ITEM_TYPE_UDP,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+static enum rte_flow_item_type pattern_fdir_ipv6_tcp[] = {
+	RTE_FLOW_ITEM_TYPE_IPV6,
+	RTE_FLOW_ITEM_TYPE_TCP,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+static enum rte_flow_item_type pattern_fdir_ipv6_tcp_ext[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV6,
+	RTE_FLOW_ITEM_TYPE_TCP,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+static enum rte_flow_item_type pattern_fdir_ipv6_sctp[] = {
+	RTE_FLOW_ITEM_TYPE_IPV6,
+	RTE_FLOW_ITEM_TYPE_SCTP,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
+static enum rte_flow_item_type pattern_fdir_ipv6_sctp_ext[] = {
+	RTE_FLOW_ITEM_TYPE_ETH,
+	RTE_FLOW_ITEM_TYPE_IPV6,
+	RTE_FLOW_ITEM_TYPE_SCTP,
+	RTE_FLOW_ITEM_TYPE_END,
+};
+
 static struct i40e_valid_pattern i40e_supported_patterns[] = {
 	/* Ethertype */
 	{ pattern_ethertype, i40e_flow_parse_ethertype_filter },
+	/* FDIR */
+	{ pattern_fdir_ipv4, i40e_flow_parse_fdir_filter },
+	{ pattern_fdir_ipv4_ext, i40e_flow_parse_fdir_filter },
+	{ pattern_fdir_ipv4_udp, i40e_flow_parse_fdir_filter },
+	{ pattern_fdir_ipv4_udp_ext, i40e_flow_parse_fdir_filter },
+	{ pattern_fdir_ipv4_tcp, i40e_flow_parse_fdir_filter },
+	{ pattern_fdir_ipv4_tcp_ext, i40e_flow_parse_fdir_filter },
+	{ pattern_fdir_ipv4_sctp, i40e_flow_parse_fdir_filter },
+	{ pattern_fdir_ipv4_sctp_ext, i40e_flow_parse_fdir_filter },
+	{ pattern_fdir_ipv6, i40e_flow_parse_fdir_filter },
+	{ pattern_fdir_ipv6_ext, i40e_flow_parse_fdir_filter },
+	{ pattern_fdir_ipv6_udp, i40e_flow_parse_fdir_filter },
+	{ pattern_fdir_ipv6_udp_ext, i40e_flow_parse_fdir_filter },
+	{ pattern_fdir_ipv6_tcp, i40e_flow_parse_fdir_filter },
+	{ pattern_fdir_ipv6_tcp_ext, i40e_flow_parse_fdir_filter },
+	{ pattern_fdir_ipv6_sctp, i40e_flow_parse_fdir_filter },
+	{ pattern_fdir_ipv6_sctp_ext, i40e_flow_parse_fdir_filter },
 };
 
 #define NEXT_ITEM_OF_ACTION(act, actions, index)                        \
@@ -422,6 +558,493 @@ i40e_flow_parse_ethertype_filter(struct rte_eth_dev *dev,
 	return ret;
 }
 
+/* 1. Last in item should be NULL as range is not supported.
+ * 2. Supported flow type and input set: refer to array
+ *    default_inset_table in i40e_ethdev.c.
+ * 3. Mask of fields which need to be matched should be
+ *    filled with 1.
+ * 4. Mask of fields which needn't to be matched should be
+ *    filled with 0.
+ */
+static int
+i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
+			     const struct rte_flow_item *pattern,
+			     struct rte_flow_error *error,
+			     struct rte_eth_fdir_filter *filter)
+{
+	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
+	const struct rte_flow_item *item = pattern;
+	const struct rte_flow_item_eth *eth_spec, *eth_mask;
+	const struct rte_flow_item_ipv4 *ipv4_spec, *ipv4_mask;
+	const struct rte_flow_item_ipv6 *ipv6_spec, *ipv6_mask;
+	const struct rte_flow_item_tcp *tcp_spec, *tcp_mask;
+	const struct rte_flow_item_udp *udp_spec, *udp_mask;
+	const struct rte_flow_item_sctp *sctp_spec, *sctp_mask;
+	const struct rte_flow_item_vf *vf_spec;
+	uint32_t flow_type = RTE_ETH_FLOW_UNKNOWN;
+	enum i40e_filter_pctype pctype;
+	uint64_t input_set = I40E_INSET_NONE;
+	uint16_t flag_offset;
+	enum rte_flow_item_type item_type;
+	enum rte_flow_item_type l3 = RTE_FLOW_ITEM_TYPE_END;
+	uint32_t j;
+
+	for (; item->type != RTE_FLOW_ITEM_TYPE_END; item++) {
+		if (item->last) {
+			rte_flow_error_set(error, EINVAL,
+					   RTE_FLOW_ERROR_TYPE_ITEM,
+					   item,
+					   "Not support range");
+			return -rte_errno;
+		}
+		item_type = item->type;
+		switch (item_type) {
+		case RTE_FLOW_ITEM_TYPE_ETH:
+			eth_spec = (const struct rte_flow_item_eth *)item->spec;
+			eth_mask = (const struct rte_flow_item_eth *)item->mask;
+			if (eth_spec || eth_mask) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid ETH spec/mask");
+				return -rte_errno;
+			}
+			break;
+		case RTE_FLOW_ITEM_TYPE_IPV4:
+			l3 = RTE_FLOW_ITEM_TYPE_IPV4;
+			ipv4_spec =
+				(const struct rte_flow_item_ipv4 *)item->spec;
+			ipv4_mask =
+				(const struct rte_flow_item_ipv4 *)item->mask;
+			if (!ipv4_spec || !ipv4_mask) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "NULL IPv4 spec/mask");
+				return -rte_errno;
+			}
+
+			/* Check IPv4 mask and update input set */
+			if (ipv4_mask->hdr.version_ihl ||
+			    ipv4_mask->hdr.total_length ||
+			    ipv4_mask->hdr.packet_id ||
+			    ipv4_mask->hdr.fragment_offset ||
+			    ipv4_mask->hdr.hdr_checksum) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid IPv4 mask.");
+				return -rte_errno;
+			}
+
+			if (ipv4_mask->hdr.src_addr == UINT32_MAX)
+				input_set |= I40E_INSET_IPV4_SRC;
+			if (ipv4_mask->hdr.dst_addr == UINT32_MAX)
+				input_set |= I40E_INSET_IPV4_DST;
+			if (ipv4_mask->hdr.type_of_service == UINT8_MAX)
+				input_set |= I40E_INSET_IPV4_TOS;
+			if (ipv4_mask->hdr.time_to_live == UINT8_MAX)
+				input_set |= I40E_INSET_IPV4_TTL;
+			if (ipv4_mask->hdr.next_proto_id == UINT8_MAX)
+				input_set |= I40E_INSET_IPV4_PROTO;
+
+			/* Get filter info */
+			flow_type = RTE_ETH_FLOW_NONFRAG_IPV4_OTHER;
+			/* Check if it is fragment. */
+			flag_offset =
+			      rte_be_to_cpu_16(ipv4_spec->hdr.fragment_offset);
+			if (flag_offset & IPV4_HDR_OFFSET_MASK ||
+			    flag_offset & IPV4_HDR_MF_FLAG)
+				flow_type = RTE_ETH_FLOW_FRAG_IPV4;
+
+			/* Get the filter info */
+			filter->input.flow.ip4_flow.proto =
+				ipv4_spec->hdr.next_proto_id;
+			filter->input.flow.ip4_flow.tos =
+				ipv4_spec->hdr.type_of_service;
+			filter->input.flow.ip4_flow.ttl =
+				ipv4_spec->hdr.time_to_live;
+			filter->input.flow.ip4_flow.src_ip =
+				ipv4_spec->hdr.src_addr;
+			filter->input.flow.ip4_flow.dst_ip =
+				ipv4_spec->hdr.dst_addr;
+
+			break;
+		case RTE_FLOW_ITEM_TYPE_IPV6:
+			l3 = RTE_FLOW_ITEM_TYPE_IPV6;
+			ipv6_spec =
+				(const struct rte_flow_item_ipv6 *)item->spec;
+			ipv6_mask =
+				(const struct rte_flow_item_ipv6 *)item->mask;
+			if (!ipv6_spec || !ipv6_mask) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "NULL IPv6 spec/mask");
+				return -rte_errno;
+			}
+
+			/* Check IPv6 mask and update input set */
+			if (ipv6_mask->hdr.payload_len) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid IPv6 mask");
+				return -rte_errno;
+			}
+
+			/* SCR and DST address of IPv6 shouldn't be masked */
+			for (j = 0; j < RTE_DIM(ipv6_mask->hdr.src_addr); j++) {
+				if (ipv6_mask->hdr.src_addr[j] != UINT8_MAX ||
+				    ipv6_mask->hdr.dst_addr[j] != UINT8_MAX) {
+					rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid IPv6 mask");
+					return -rte_errno;
+				}
+			}
+
+			input_set |= I40E_INSET_IPV6_SRC;
+			input_set |= I40E_INSET_IPV6_DST;
+
+			if ((ipv6_mask->hdr.vtc_flow &
+			     rte_cpu_to_be_16(I40E_IPV6_TC_MASK))
+			    == rte_cpu_to_be_16(I40E_IPV6_TC_MASK))
+				input_set |= I40E_INSET_IPV6_TC;
+			if (ipv6_mask->hdr.proto == UINT8_MAX)
+				input_set |= I40E_INSET_IPV6_NEXT_HDR;
+			if (ipv6_mask->hdr.hop_limits == UINT8_MAX)
+				input_set |= I40E_INSET_IPV6_HOP_LIMIT;
+
+			/* Get filter info */
+			filter->input.flow.ipv6_flow.tc =
+				(uint8_t)(ipv6_spec->hdr.vtc_flow <<
+					  I40E_IPV4_TC_SHIFT);
+			filter->input.flow.ipv6_flow.proto =
+				ipv6_spec->hdr.proto;
+			filter->input.flow.ipv6_flow.hop_limits =
+				ipv6_spec->hdr.hop_limits;
+
+			rte_memcpy(filter->input.flow.ipv6_flow.src_ip,
+				   ipv6_spec->hdr.src_addr, 16);
+			rte_memcpy(filter->input.flow.ipv6_flow.dst_ip,
+				   ipv6_spec->hdr.dst_addr, 16);
+
+			/* Check if it is fragment. */
+			if (ipv6_spec->hdr.proto == I40E_IPV6_FRAG_HEADER)
+				flow_type = RTE_ETH_FLOW_FRAG_IPV6;
+			else
+				flow_type = RTE_ETH_FLOW_NONFRAG_IPV6_OTHER;
+			break;
+		case RTE_FLOW_ITEM_TYPE_TCP:
+			tcp_spec = (const struct rte_flow_item_tcp *)item->spec;
+			tcp_mask = (const struct rte_flow_item_tcp *)item->mask;
+			if (!tcp_spec || !tcp_mask) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "NULL TCP spec/mask");
+				return -rte_errno;
+			}
+
+			/* Check TCP mask and update input set */
+			if (tcp_mask->hdr.sent_seq ||
+			    tcp_mask->hdr.recv_ack ||
+			    tcp_mask->hdr.data_off ||
+			    tcp_mask->hdr.tcp_flags ||
+			    tcp_mask->hdr.rx_win ||
+			    tcp_mask->hdr.cksum ||
+			    tcp_mask->hdr.tcp_urp) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid TCP mask");
+				return -rte_errno;
+			}
+
+			if (tcp_mask->hdr.src_port != UINT16_MAX ||
+			    tcp_mask->hdr.dst_port != UINT16_MAX) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid TCP mask");
+				return -rte_errno;
+			}
+
+			input_set |= I40E_INSET_SRC_PORT;
+			input_set |= I40E_INSET_DST_PORT;
+
+			/* Get filter info */
+			if (l3 == RTE_FLOW_ITEM_TYPE_IPV4)
+				flow_type = RTE_ETH_FLOW_NONFRAG_IPV4_TCP;
+			else if (l3 == RTE_FLOW_ITEM_TYPE_IPV6)
+				flow_type = RTE_ETH_FLOW_NONFRAG_IPV6_TCP;
+
+			if (l3 == RTE_FLOW_ITEM_TYPE_IPV4) {
+				filter->input.flow.tcp4_flow.src_port =
+					tcp_spec->hdr.src_port;
+				filter->input.flow.tcp4_flow.dst_port =
+					tcp_spec->hdr.dst_port;
+			} else if (l3 == RTE_FLOW_ITEM_TYPE_IPV6) {
+				filter->input.flow.tcp6_flow.src_port =
+					tcp_spec->hdr.src_port;
+				filter->input.flow.tcp6_flow.dst_port =
+					tcp_spec->hdr.dst_port;
+			}
+			break;
+		case RTE_FLOW_ITEM_TYPE_UDP:
+			udp_spec = (const struct rte_flow_item_udp *)item->spec;
+			udp_mask = (const struct rte_flow_item_udp *)item->mask;
+			if (!udp_spec || !udp_mask) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "NULL UDP spec/mask");
+				return -rte_errno;
+			}
+
+			/* Check UDP mask and update input set*/
+			if (udp_mask->hdr.dgram_len ||
+			    udp_mask->hdr.dgram_cksum) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid UDP mask");
+				return -rte_errno;
+			}
+
+			if (udp_mask->hdr.src_port != UINT16_MAX ||
+			    udp_mask->hdr.dst_port != UINT16_MAX) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid UDP mask");
+				return -rte_errno;
+			}
+
+			input_set |= I40E_INSET_SRC_PORT;
+			input_set |= I40E_INSET_DST_PORT;
+
+			/* Get filter info */
+			if (l3 == RTE_FLOW_ITEM_TYPE_IPV4)
+				flow_type =
+					RTE_ETH_FLOW_NONFRAG_IPV4_UDP;
+			else if (l3 == RTE_FLOW_ITEM_TYPE_IPV6)
+				flow_type =
+					RTE_ETH_FLOW_NONFRAG_IPV6_UDP;
+
+			if (l3 == RTE_FLOW_ITEM_TYPE_IPV4) {
+				filter->input.flow.udp4_flow.src_port =
+					udp_spec->hdr.src_port;
+				filter->input.flow.udp4_flow.dst_port =
+					udp_spec->hdr.dst_port;
+			} else if (l3 == RTE_FLOW_ITEM_TYPE_IPV6) {
+				filter->input.flow.udp6_flow.src_port =
+					udp_spec->hdr.src_port;
+				filter->input.flow.udp6_flow.dst_port =
+					udp_spec->hdr.dst_port;
+			}
+			break;
+		case RTE_FLOW_ITEM_TYPE_SCTP:
+			sctp_spec =
+				(const struct rte_flow_item_sctp *)item->spec;
+			sctp_mask =
+				(const struct rte_flow_item_sctp *)item->mask;
+			if (!sctp_spec || !sctp_mask) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "NULL SCTP spec/mask");
+				return -rte_errno;
+			}
+
+			/* Check SCTP mask and update input set */
+			if (sctp_mask->hdr.cksum) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid UDP mask");
+				return -rte_errno;
+			}
+
+			if (sctp_mask->hdr.src_port != UINT16_MAX ||
+			    sctp_mask->hdr.dst_port != UINT16_MAX ||
+			    sctp_mask->hdr.tag != UINT32_MAX) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid UDP mask");
+				return -rte_errno;
+			}
+			input_set |= I40E_INSET_SRC_PORT;
+			input_set |= I40E_INSET_DST_PORT;
+			input_set |= I40E_INSET_SCTP_VT;
+
+			/* Get filter info */
+			if (l3 == RTE_FLOW_ITEM_TYPE_IPV4)
+				flow_type = RTE_ETH_FLOW_NONFRAG_IPV4_SCTP;
+			else if (l3 == RTE_FLOW_ITEM_TYPE_IPV6)
+				flow_type = RTE_ETH_FLOW_NONFRAG_IPV6_SCTP;
+
+			if (l3 == RTE_FLOW_ITEM_TYPE_IPV4) {
+				filter->input.flow.sctp4_flow.src_port =
+					sctp_spec->hdr.src_port;
+				filter->input.flow.sctp4_flow.dst_port =
+					sctp_spec->hdr.dst_port;
+				filter->input.flow.sctp4_flow.verify_tag =
+					sctp_spec->hdr.tag;
+			} else if (l3 == RTE_FLOW_ITEM_TYPE_IPV6) {
+				filter->input.flow.sctp6_flow.src_port =
+					sctp_spec->hdr.src_port;
+				filter->input.flow.sctp6_flow.dst_port =
+					sctp_spec->hdr.dst_port;
+				filter->input.flow.sctp6_flow.verify_tag =
+					sctp_spec->hdr.tag;
+			}
+			break;
+		case RTE_FLOW_ITEM_TYPE_VF:
+			vf_spec = (const struct rte_flow_item_vf *)item->spec;
+			filter->input.flow_ext.is_vf = 1;
+			filter->input.flow_ext.dst_id = vf_spec->id;
+			if (filter->input.flow_ext.is_vf &&
+			    filter->input.flow_ext.dst_id >= pf->vf_num) {
+				rte_flow_error_set(error, EINVAL,
+						   RTE_FLOW_ERROR_TYPE_ITEM,
+						   item,
+						   "Invalid VF ID for FDIR.");
+				return -rte_errno;
+			}
+			break;
+		default:
+			break;
+		}
+	}
+
+	pctype = i40e_flowtype_to_pctype(flow_type);
+	if (pctype == 0 || pctype > I40E_FILTER_PCTYPE_L2_PAYLOAD) {
+		rte_flow_error_set(error, EINVAL,
+				   RTE_FLOW_ERROR_TYPE_ITEM, item,
+				   "Unsupported flow type");
+		return -rte_errno;
+	}
+
+	if (input_set != i40e_get_default_input_set(pctype)) {
+		rte_flow_error_set(error, EINVAL,
+				   RTE_FLOW_ERROR_TYPE_ITEM, item,
+				   "Invalid input set.");
+		return -rte_errno;
+	}
+	filter->input.flow_type = flow_type;
+
+	return 0;
+}
+
+/* Parse to get the action info of a FDIR filter.
+ * FDIR action supports QUEUE or (QUEUE + MARK).
+ */
+static int
+i40e_flow_parse_fdir_action(struct rte_eth_dev *dev,
+			    const struct rte_flow_action *actions,
+			    struct rte_flow_error *error,
+			    struct rte_eth_fdir_filter *filter)
+{
+	struct i40e_pf *pf = I40E_DEV_PRIVATE_TO_PF(dev->data->dev_private);
+	const struct rte_flow_action *act;
+	const struct rte_flow_action_queue *act_q;
+	const struct rte_flow_action_mark *mark_spec;
+	uint32_t index = 0;
+
+	/* Check if the first non-void action is QUEUE or DROP. */
+	NEXT_ITEM_OF_ACTION(act, actions, index);
+	if (act->type != RTE_FLOW_ACTION_TYPE_QUEUE &&
+	    act->type != RTE_FLOW_ACTION_TYPE_DROP) {
+		rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION,
+				   act, "Invalid action.");
+		return -rte_errno;
+	}
+
+	act_q = (const struct rte_flow_action_queue *)act->conf;
+	filter->action.flex_off = 0;
+	if (act->type == RTE_FLOW_ACTION_TYPE_QUEUE)
+		filter->action.behavior = RTE_ETH_FDIR_ACCEPT;
+	else
+		filter->action.behavior = RTE_ETH_FDIR_REJECT;
+
+	filter->action.report_status = RTE_ETH_FDIR_REPORT_ID;
+	filter->action.rx_queue = act_q->index;
+
+	if (filter->action.rx_queue >= pf->dev_data->nb_rx_queues) {
+		rte_flow_error_set(error, EINVAL,
+				   RTE_FLOW_ERROR_TYPE_ACTION, act,
+				   "Invalid queue ID for FDIR.");
+		return -rte_errno;
+	}
+
+	/* Check if the next non-void item is MARK or END. */
+	index++;
+	NEXT_ITEM_OF_ACTION(act, actions, index);
+	if (act->type != RTE_FLOW_ACTION_TYPE_MARK &&
+	    act->type != RTE_FLOW_ACTION_TYPE_END) {
+		rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION,
+				   act, "Invalid action.");
+		return -rte_errno;
+	}
+
+	if (act->type == RTE_FLOW_ACTION_TYPE_MARK) {
+		mark_spec = (const struct rte_flow_action_mark *)act->conf;
+		filter->soft_id = mark_spec->id;
+
+		/* Check if the next non-void item is END */
+		index++;
+		NEXT_ITEM_OF_ACTION(act, actions, index);
+		if (act->type != RTE_FLOW_ACTION_TYPE_END) {
+			rte_flow_error_set(error, EINVAL,
+					   RTE_FLOW_ERROR_TYPE_ACTION,
+					   act, "Invalid action.");
+			return -rte_errno;
+		}
+	}
+
+	return 0;
+}
+
+static int
+i40e_flow_parse_fdir_filter(struct rte_eth_dev *dev,
+			    const struct rte_flow_attr *attr,
+			    const struct rte_flow_item pattern[],
+			    const struct rte_flow_action actions[],
+			    struct rte_flow_error *error,
+			    union i40e_filter_t *filter)
+{
+	struct rte_eth_fdir_filter *fdir_filter =
+		&filter->fdir_filter;
+	int ret;
+
+	ret = i40e_flow_parse_fdir_pattern(dev, pattern, error, fdir_filter);
+	if (ret)
+		return ret;
+
+	ret = i40e_flow_parse_fdir_action(dev, actions, error, fdir_filter);
+	if (ret)
+		return ret;
+
+	ret = i40e_flow_parse_attr(attr, error);
+	if (ret)
+		return ret;
+
+	if (dev->data->dev_conf.fdir_conf.mode !=
+	    RTE_FDIR_MODE_PERFECT) {
+		rte_flow_error_set(error, ENOTSUP,
+				   RTE_FLOW_ERROR_TYPE_UNSPECIFIED,
+				   NULL,
+				   "Check the mode in fdir_conf.");
+		return -rte_errno;
+	}
+
+	return 0;
+}
+
 static int
 i40e_flow_validate(struct rte_eth_dev *dev,
 		   const struct rte_flow_attr *attr,
-- 
2.5.5

^ permalink raw reply related


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